Re: [ansible-project] Re: Problem with executing playbook with fetch command.

2015-12-01 Thread Marcel Golus
Hello Paul, Cool it works, I didn't know that this was so much easy :) I tried different ways but not came up with this idea. Thanks and have a nice day! BR, Marcel 2015-12-02 5:12 GMT+01:00 Paul Markham : > Looks like you need single quote around the extra variable: > > ansible-playbook fetch

[ansible-project] Re: Toggle verbosity when running playbooks through the Ansible playbook API.

2015-12-01 Thread John Yeuk Hon Wong
On Saturday, May 9, 2015 at 5:49:22 AM UTC-4, Ayaz Ahmed Khan wrote: > > On Friday, May 8, 2015 at 6:04:35 PM UTC+5, Ayaz Ahmed Khan wrote: >> >> Hi >> >> When I execute a playbook through the playbook Python API, is there a way >> to toggle the verbosity of the output? I have enabled logging for

[ansible-project] Re: Problem with executing playbook with fetch command.

2015-12-01 Thread Paul Markham
Looks like you need single quote around the extra variable: ansible-playbook fetch-conf.yml -e '{"h":"hostname"}' Using key=value also works: ansible-playbook fetch-conf.yml -e 'h=hostname' You also need a space after 'name:' on the first line. -- You received this message because you are

Re: [ansible-project] Raw module and interactive commands

2015-12-01 Thread psprygada
What switch are you trying to send commands to? We have started to incorporate network device support into the module_utils for connecting to interactive devices over ssh with initial support for IOS based devices. See here for the IOS shared module support (https://github.com/ansible/ansi

Re: [ansible-project] Get facts control machine

2015-12-01 Thread Brian Coca
lookup('env', 'HOME) should give you the home dir of the 'current user executing ansible'. Also ~ and $HOME should work with the fetch module. -- Brian Coca -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and s

Re: [ansible-project] Ansible Tower 2.3.1 inventory limiting for job templates

2015-12-01 Thread Brian Coca
for ansible tower questions post at http://support.ansible.com or email supp...@ansible.com On Tue, Dec 1, 2015 at 4:31 PM, Nicholas McKinney wrote: > I'm trying to limit job runs to specific machines. The Ansible inventory in > Tower has the concept of groups within groups, which is convenient,

[ansible-project] Ansible Tower 2.3.1 inventory limiting for job templates

2015-12-01 Thread Nicholas McKinney
I'm trying to limit job runs to specific machines. The Ansible inventory in Tower has the concept of groups within groups, which is convenient, but I cannot find out how to use that in the "Limit" field during job template creation to do something more specific than choosing top-level groups. To

Re: [ansible-project] Raw module and interactive commands

2015-12-01 Thread Brian Coca
No, its completely batch, you can try the expect module for interactive prompts. -- 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...@g

[ansible-project] Raw module and interactive commands

2015-12-01 Thread theyuseus
Is it possible to use the raw module to interactively enter text? For example, I'm trying to manage a switch and one of the commands ask a yes/no question. Is it possible to enter a "y" right after invoking the command? I tried to create a playlist using raw: "save primary\ny" but that didn't

[ansible-project] Steps to insert data into a database

2015-12-01 Thread Hugh Ma
Currently the playbook runs a task which generates a result file in /tmp/result.out Then it runs a parsing python script I put in common/files/parser.py and passes /tmp/result.out to the script as a parameter. The script prints to STDOUT the parsed results in a JSON format as such { "elapsed

Re: [ansible-project] Is it possible to see all the commands that ansible scripts run?

2015-12-01 Thread Brian Coca
In 2.0, with debug=1 in ansible.cfg, you should see the exact commands on the target machine's syslog, but note that not all modules execute shell commands though and that modules might fail on other lines other than the shell command -- Brian Coca -- You received this message because you are s

[ansible-project] Is it possible to see all the commands that ansible scripts run?

2015-12-01 Thread Brad Smith
When Ansible fails with -vvv, it gives me a big dump of debug info that basically says "I copied an ansible script to the system and ran it", with all the SSH details and whatnot I might need if I was trying to debug the process of copying and running the script. My problem is that most of the

Re: [ansible-project] Re: SSH Error: data could not be sent to the remote host. Make sure this host can be reached over ssh

2015-12-01 Thread Brian Coca
i'm going with 'custom ssh server' that is probably the issue with most switches. -- 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-proj

[ansible-project] Re: {{ inventory_hostname }} variable

2015-12-01 Thread richard kappler
no, indeed it worked as I had hoped, and as Roger and Brian spoke of. By using [servers] name ansible_ssh_host=xx.xx.xx.xx it worked just fine. Ran into some other problems, but that's a different post regards, Richard On Wednesday, November 25, 2015 at 11:45:25 AM UTC-5, richard kappler wro

Re: [ansible-project] Re: SSH Error: data could not be sent to the remote host. Make sure this host can be reached over ssh

2015-12-01 Thread theyuseus
The version on my master computer is: OpenSSL 0.9.8zc 15 Oct 2014. I can't seem to find the version on the the clients, which are switches. What I don't get is why --ask-pass works with OpenSSH but private keys don't. I added this to my ansible.cfg and it made no difference but I'm not sure i

Re: [ansible-project] Re: SSH Error: data could not be sent to the remote host. Make sure this host can be reached over ssh

2015-12-01 Thread Brian Coca
this is probably a control persist issue, try disabling those options (empty ssh_args in ansible.cfg) and see if that also fixes the problem. if so, you can switch to paramiko (its faster than ssh w/o control persist) or play with the timeout settings (default 60s). In some cases it has to do wit

[ansible-project] Re: SSH Error: data could not be sent to the remote host. Make sure this host can be reached over ssh

2015-12-01 Thread theyuseus
Well, I just tried anything and everything I could and it looks like adding "-c paramiko" fixed it. -- 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-p

[ansible-project] Re: SSH Error: data could not be sent to the remote host. Make sure this host can be reached over ssh

2015-12-01 Thread theyuseus
Am I missing a flag or setting? I've got "ansible_ssh_private_key_file" set to the full path to my id_rsa file. Is that all it takes to get Ansible to use private keys? -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from t

[ansible-project] Re: Ansible 2.0 : stable-2.0 branch : cannot import name AnsibleOptionsError

2015-12-01 Thread Karan Singh
Virtualenv worked :) On Tuesday, December 1, 2015 at 2:10:23 AM UTC+2, Mark Chance wrote: > > I have dealt with similar issues. > To see all the places Python might be loading ansible libraries use: > import sys > print (sys.path) > > If you want to switch between Ansible versions, I have had the

[ansible-project] ansible2.0 expect module not working

2015-12-01 Thread Karan Singh
Hello Guys Here is my ansible task - name: Firmware path lookup shell: rpm -ql hp-firmware-"{{ device.stdout }}" | grep '\.scexe' register: FirmwarePath - expect: command: sh "{{ FirmwarePath.stdout }}" responses: "Continue (y/N)": 'y' And it ends up like this. TASK

[ansible-project] 3rd machine fails on moving a tar file...every time, not the same machine

2015-12-01 Thread richard kappler
Good day. We're new to Ansible so we might be missing something obvious. We have a playbook that deploys a splunk forwarder to remote machines: --- - name: deploy splunk forwarder to servers hosts: servers tasks: - name: mkdir /home/engineering/TEAM file: path=/home/engineering/TEAM

[ansible-project] Re: Need help with Jetty restart using ansible

2015-12-01 Thread eric hanzl
I edited my ansible script to use async mode: # restart jetty - name: Restart jetty shell: sudo /sbin/service jetty restart when: service_status.stat.exists async: 300 poll: 0 Now i get the restart and jetty stays up! On Monday, November 30, 2015 at 5:13:34 PM UTC-5, eric hanzl wrote:

[ansible-project] Re: Problem with executing playbook with fetch command.

2015-12-01 Thread Marcel Golus
Hi again, Anybody have idea in this case? Best Regards, Marcel -- 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.

Re: [ansible-project] Help with callback to tower from AWS auto scaling script

2015-12-01 Thread Adrian Black
Actually seemed to be not related to the use of ip. In fact changing it to use domain didnt execute the callback as the new calling machine wasnt in the inventory (we set tower to use to use private ips of AWS instances for inventory) It was proot settings in the ansible tower settings file we h

Re: [ansible-project] --start-at-task seems broken on 2.0.0-stable

2015-12-01 Thread Brian Coca
I think they should 'just work' TM, but this is not a simple one, having dynamic includes makes this an 'interesting' problem, checking with other devs trying to figure this out. -- Brian Coca -- You received this message because you are subscribed to the Google Groups "Ansible Project" group.

Re: [ansible-project] --start-at-task seems broken on 2.0.0-stable

2015-12-01 Thread Brandon Heller
On Nov 30, 2015 11:48 PM, "Brian Coca" wrote: > > My tests included a role and a bunch of debug tasks in 2 plays, all > worked, what did not have is a task include. > > This is probably due to the new 'dynamic' nature of tasks includes in > 2.0, the same reason those tasks don't appear in task lis