Re: [ansible-project] Send playbook output to Logstash/Elasticsearch

2016-12-16 Thread dubravko sever
Hi David This post is quite old, but can you share your experience with me, because I'm trying to build something like you have done. I'me trying to build environment that is able to track security policies applied at server level, and than I cold create pretty reports from Elastic/Kibana, and

Re: [ansible-project] Re: How to perform tasks only one host, based on previous output

2016-12-16 Thread Kai Stian Olstad
On 16. des. 2016 19:12, Kevin Csuka wrote: Here is a playbook to test it locally. --- - hosts: my-3-nodes tasks: - stat: path: /tmp/hi register: me - shell: echo when: me.stat.exists == true and ... On node 2 and 3 perform: $: touch /tmp/hi tasks: -

Re: [ansible-project] Re: setting ansible_connection=winrm overrides connection: local in play

2016-12-16 Thread Brian Coca
The host specific connection variables trump the general settings and directives, this is on purpose as the hosts can require specifics that plays are unaware of. That said, there are several ways to override in command line and play. I recommend using either `local_action` or `delegate_to:

[ansible-project] Re: setting ansible_connection=winrm overrides connection: local in play

2016-12-16 Thread DS Morse
Yes I'm still seeing this error even with ansible 2.2.0 Once ansible_connection is set in the inventory, I can not override it in a playbook nor from the command line. It feels like the inverse of the desired behavior as the closer settings are being ignored based on a config that is further

RE: [ansible-project] HELP using group_vars and roles

2016-12-16 Thread Eric Marquez
That was it. Thanks for the help. From: ansible-project@googlegroups.com [mailto:ansible-project@googlegroups.com] On Behalf Of Brian Coca Sent: Friday, December 16, 2016 1:25 PM To: ansible-project@googlegroups.com Subject: Re: [ansible-project] HELP using group_vars and roles string vs

Re: [ansible-project] Re: How to perform tasks only one host, based on previous output

2016-12-16 Thread Brian Coca
last time i explain this: - script: myscript register: myreturn failed_when: not myreturn.stdout|bool # ^ this will remove host 1 from the host list so the next task only chooses 'first host' from 2 and 3 - command: othertask run_once: true # ^ this task runs against ONLY 2 OR 3

[ansible-project] Re: Another warning after update to version 2.2

2016-12-16 Thread Dimitri Yioulos
Thanks, Toshio. Ansible is running on a CentOS 6 box. The latest available python-xmpp package is installed. As, I don't like to go outside of the "normal" update path, I guess I'll have to wait until this package update is available. On Friday, December 16, 2016 at 2:54:27 PM UTC-5,

[ansible-project] Re: Another warning after update to version 2.2

2016-12-16 Thread tkuratomi
This one is not a bug in ansible. It may be something you can fix. The files mentioned in the traceback show that it's the xmpp python module using an old interface instead of the new one. So you may be able to upgrade the python xmpp package to address that. -Toshio On Friday, December

Re: [ansible-project] Re: How to perform tasks only one host, based on previous output

2016-12-16 Thread Kevin Csuka
No it does not. run_once will only perform a task on node1, therefor skip the task. Please re-check in a local environment. -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it,

Re: [ansible-project] Re: How to perform tasks only one host, based on previous output

2016-12-16 Thread Brian Coca
run_once prevents that -- Brian Coca -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscr...@googlegroups.com. To post to this

[ansible-project] Another warning after update to version 2.2

2016-12-16 Thread Dimitri Yioulos
After updating to version 2.2, I see the following warning appear immediately when running playbooks (the playbooks run successfully, though): /usr/lib/python2.6/site-packages/xmpp/auth.py:24: DeprecationWarning: the sha module is deprecated; use the hashlib module instead import

Re: [ansible-project] Re: How to perform tasks only one host, based on previous output

2016-12-16 Thread Kevin Csuka
Not what I desire, because it will perform the task on both 2 and 3. I only desire to perform a task on 2 OR 3. -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email

Re: [ansible-project] HELP using group_vars and roles

2016-12-16 Thread Brian Coca
Your output does not seem to match what you are saying: `{{ portmap.HPE.5900.Port.46.Type }}` ​btw, you can remove the useless with_dict entry to get cleaner output -- Brian Coca -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To

Re: [ansible-project] Re: How to perform tasks only one host, based on previous output

2016-12-16 Thread Brian Coca
Then my first suggestion works for that case. -- Brian Coca -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to

Re: [ansible-project] Re: How to perform tasks only one host, based on previous output

2016-12-16 Thread Kevin Csuka
That would still perform it only on host 2 and 3. Goal: perform task only one node 2 or 3 where the output is, in this case, true. Thank you so much for your support :) -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from

RE: [ansible-project] HELP using group_vars and roles

2016-12-16 Thread Eric Marquez
I updated my msg to the following. - debug: msg: "name: {{ inventory_hostname }} {{ portmap['HPE']['5900']['Port']['46']['Port'] }}" verbosity: 4 with_dict: "{{ portmap }}" TASK [basebmc : debug] * task path:

Re: [ansible-project] HELP using group_vars and roles

2016-12-16 Thread Brian Coca
try: msg: "name: {{ inventory_hostname }} {{ portmap['HPE']['5900']['Port']['46']['Port'] }}" -- Brian Coca -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send

Re: [ansible-project] Re: How to perform tasks only one host, based on previous output

2016-12-16 Thread Brian Coca
You keep changing the goalpost, now you want it to execute on every node? then when: me.stat.exists == False is all you need. -- Brian Coca -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop

Re: [ansible-project] Dynamic Group Var Name

2016-12-16 Thread Chanaka Samarajeewa
Hello Brian, Can you please help me figure out how to iterate over this registered variable? Please see my question as follows: https://groups.google.com/forum/#!searchin/ansible-project/iterate%7Csort:relevance/ansible-project/C9fSSQGq8pM/Pcjng6yeDAAJ Thanks Chanaka On Tue, May 3, 2016 at

Re: [ansible-project] Re: How to perform tasks only one host, based on previous output

2016-12-16 Thread Kevin Csuka
Here is a playbook to test it locally. --- - hosts: my-3-nodes tasks: - stat: path: /tmp/hi register: me - shell: echo when: me.stat.exists == true and ... On node 2 and 3 perform: $: touch /tmp/hi -- You received this message because you are subscribed to

Re: [ansible-project] Re: How to perform tasks only one host, based on previous output

2016-12-16 Thread Kevin Csuka
Nodes are excluded from a play when they fail. This is not the desired output. I don't want to fail a task, I want it set-up as it should. -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving

[ansible-project] HELP using group_vars and roles

2016-12-16 Thread Eric Marquez
I have a question about the use of group_vars in Ansible. I would like to use the data dictionaries values from swtich.json, I also need it to be global set of values almost like all. When I call it in Ansible it becomes unknown... Is there a way to do it? Ansible debug output: TASK [basebmc

Re: [ansible-project] Re: How to perform tasks only one host, based on previous output

2016-12-16 Thread Brian Coca
not in my example, as the first node is removed from the play. -- Brian Coca -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to

Re: [ansible-project] New module and supporting utils

2016-12-16 Thread Brian Coca
Pull requests should always point at devel. If the code needs to be together to function, it should be in same PR. More info here http://docs.ansible.com/ansible/dev_guide/index.html -- -- Brian Coca -- You received this message because you are subscribed to the Google Groups

Re: [ansible-project] ansible caches playbook

2016-12-16 Thread Brian Coca
There is no playbook cache in Ansible. -- Brian Coca -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscr...@googlegroups.com.

[ansible-project] ansible caches playbook

2016-12-16 Thread Ilia Ternovich
Hi, I'm using vagrant + ansible for proof of concept of IoT solution. I have successfully executed ansible playbook and destroyed virtual machine (e.g. vagrant destroy 'slave'). But when I recreate 'slave' ansible doesn't execute my playbook but instead caches results of the previous

[ansible-project] Re: How to change the IP and Hostname After create a guest VM through VMware vSphere with vsphere_guest - need help or advice

2016-12-16 Thread raid . rohana
hi @Wemer I saw your answer -- I'm hoping you can help me the vmware_vm_shell module is throwing an error: * "msg": "Permission to perform this operation was denied."* I'm pretty sure I used the correct credentials and even add new ones, still nothing. Do you have any workaround ? On

[ansible-project] New module and supporting utils

2016-12-16 Thread Ted
Should a new module be committed in a new branch (or devel)? Should supporting code such as utils be committed separately? -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it,

Re: [ansible-project] Re: How to perform tasks only one host, based on previous output

2016-12-16 Thread Kevin Csuka
Hihi, you're right. My bad, meant run_once will always run on the 1st node. Anyway... On Thursday, December 15, 2016 at 5:12:03 PM UTC+1, Brian Coca wrote: > > >How can I configure ansible to perform only a task on the second node, > where the stdout is false. Not the third node > > Run_once

[ansible-project] bastion host type connection to ansible

2016-12-16 Thread Oğuz Yarımtepe
How can use ansible with the below ssh.cfg Host test Hostname 10.35.74.241 User oyarimtepe@syslnx#host.foo@machine1.host.foo.com I am trying to connect machine1. The above settings let me connect with ssh test 10.35.74.241 is working like a jump host. I created ansible.cfg as