[ansible-project] Windows folks: help test the new pywinrm beta!

2017-12-08 Thread mattdavi
We're pleased to announce the release of pywinrm 0.3.0 beta 1, and hoping our friends that manage Windows with Ansible will put it through its paces... The marquee feature on this release enables HTTP message encryption on NTLM, Kerberos, and CredSSP (in conjunction with updates to several

[ansible-project] How to provide prompt inputs

2017-12-08 Thread Vishal Bhargava
HI, I am trying to write an ansible playbook which will run some command on a remote server, but the problem is when this command is run, it asks for user and password which I cannot provide from the command line. I am prompted to enter these values, any idea how this can be done with Ansible?

[ansible-project] unable to create directory

2017-12-08 Thread coach . rhca
I am trying to clone a git repository using the git clone command but it is unable to create the directory structure and copies the entire files in the parent directory. example when i do the - git: repo=http://pathtothegit/container.git dest=/data/config recursive=yes > it only copies

[ansible-project] Re: Shortcut for making Ansible groups from EC2 tags

2017-12-08 Thread ddrake2012
Thanks for the posts, very helpful. A couple things a year and a half later: The dynamic inventory script (ec2.py) now returns ec2_tag_Name so for a lot of things you can use the when parameter to say something like "when: ec2_tag_Name == your_tag_name" However, this doesn't work if you want

Re: [ansible-project] Run once with when statement causes only skipped action to run

2017-12-08 Thread ddrake2012
Thanks for the help, Josh. I actually am trying to run a command once on a certain set of EC2 instances I'm managing that match a specific tag. This seems like a very reasonable thing to do and yet the run_once skipping functionality makes this quite difficult. I managed to find two similar

Re: [ansible-project] Run once with when statement causes only skipped action to run

2017-12-08 Thread ddrake2012
Thanks for the help, Josh. I actually am trying to run a command once on a certain set of EC2 instances I'm managing that match a specific tag. This seems like a very reasonable thing to do and yet the run_once skipping functionality makes this quite difficult. I managed to find two similar

Re: [ansible-project] do post_tasks execute when a role fails?

2017-12-08 Thread Niels Bertram
Hmm if I had to develop specific error handling around roles, I would use the block statement . Have not been able to come up with something that I could not handle. N tasks: - block: - include_role: name:

Re: [ansible-project] docker run --net ... --ip

2017-12-08 Thread Fernando González
El 26 nov. 2017 1:49 p. m., "Teresa e Junior" escribió: > I am trying to give my pi-hole container a static IP address. The > following works the way I want: > > # docker network create --subnet=172.18.0.0/16 docker1 > # docker run -d --name pihole -p 53:53/tcp -p

[ansible-project] INFO: Does each ansible task ssh before performing the task

2017-12-08 Thread Chandan Javaregowda
Each task in my playbook is taking longer. That is because the remote host is in a different DC. I want to understand if each ansible task ssh'es to the remote host. -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this

[ansible-project] How to make -vvvv the default for ansible-playbook in ansible.cfg

2017-12-08 Thread Tony Chia
I read through the document at http://docs.ansible.com/ansible/latest/intro_configuration.html, and I didn't find any setting that can make - the default if ansible-playbook is ran outout -. For example, ansible-playbook has --user=REMOTE_USER on the command line and the equivalent

[ansible-project] Help on vmware_vm_shell module

2017-12-08 Thread A.PRADEEP ANNAMALAI
Hi I am using vmware_vm_shell module as below to execute commands in VMs in ESXI hosts . if it is a matter of 2 or 3 esxi servers , it is easier to prepare a yaml list or dictionary as a vars file and use it in the module . What if there are 100 ESXI hosts and 300+ VMs to execute any

Re: [ansible-project] Run once with when statement causes only skipped action to run

2017-12-08 Thread Josh Smift
> Weirdly, when I try to create an in-memory host group using when and > add_host the task only gets executed one time (on a skipped host). I > don't have run_once on this task so I'm not sure why all my nodes aren't > executing it. Any ideas? add_host is implicitly run_once; there's a note about

Re: [ansible-project] Run once with when statement causes only skipped action to run

2017-12-08 Thread ddrake2012
I can't think of a clever way to use delegate_to, I really need the run_once functionality since these are all running in parallel. Weirdly, when I try to create an in-memory host group using when and add_host the task only gets executed one time (on a skipped host). I don't have run_once on

[ansible-project] Ansible web directory

2017-12-08 Thread RB BR
I'm looking to move the default web directory for ansible to a sub directory or even create an alias to push to a sub directory. I have figured out how to do this with a base nginx config file. Is this possible with the ansible configuration. I can't seem to locate where I would place a

Re: [ansible-project] Re: Ansible fails to connect to newly provisioned EC2 on 3rd task after successful running first 2 tasks

2017-12-08 Thread ddrake2012
Yes, I use the wait parameter in the ec2 module. And the weirdest thing is that two of the tasks work before the third fails, so the connection is up and working and then just stops working. I've seen this when uploading files as well with messages like "the sftp file transfer mechansi failed",

Re: [ansible-project] Run once with when statement causes only skipped action to run

2017-12-08 Thread ddrake2012
Thanks for the replies. That's an interesting idea about using delegate_to, perhaps I can use a jinja2 filter to only delegate_to a host matching the criteria in the when. I was considering creating an in-memory group of only the hosts that matched the when but that sounds a bit verbose and a

[ansible-project] Run once with when statement causes only skipped action to run

2017-12-08 Thread Josh Smift
There's a bunch of tickets about run_once and skipped hosts; https://github.com/ansible/ansible/issues/19966 is my personal favorite. -Josh (j...@care.com) (apologies for the automatic corporate disclaimer that follows) This email is intended for the

Re: [ansible-project] Run once with when statement causes only skipped action to run

2017-12-08 Thread Matt Martz
By default `run_once` only executes the task against the 1st host in the list of hosts in the play batch. As such, the `when` statement only uses the variables from that 1 host. Effectively it is doing: run_once: true delegate_to: "{{ ansible_play_batch[0] }}" So you will either need to ensure

[ansible-project] Run once with when statement causes only skipped action to run

2017-12-08 Thread ddrake2012
Hey, I'm seeing some weird behavior that does not seem intuitive when trying to use run_once with when. Intuitively I think this should run an action one time when the conditional is met, however what I'm seeing is that a skipped action is ran (because the conditional is false) and nothing

Re: [ansible-project] Re: vmware modules

2017-12-08 Thread Kai Stian Olstad
On Friday, 8 December 2017 15.57.11 CET phrant...@gmail.com wrote: > Thanks for your prompt response ! > > I have just found out that I need to add "connection: local" and that > fixed the issue. Since you are using delegate_to: localhost you shouldn't need that. The connection for localhost

[ansible-project] How to hot deploy to tomcat with ansible?

2017-12-08 Thread Michael Hoeller
Hello Currently I build my app with maven and use the tomcat manager to hot deploy the war file (both on windows servers). Now I want to use ansible to move away from the manual process. 1. 1. Would it make sense to build with ansible? My assumption is, that id does not. 2. 2. How

[ansible-project] Re: vmware modules

2017-12-08 Thread phrantic7
Thanks for your prompt response ! I have just found out that I need to add "connection: local" and that fixed the issue. --- - host: vcenter connection: local task: - name: registered vms vmware_vm_facts: hostname: vcenter username: test password:

Re: [ansible-project] vmware modules

2017-12-08 Thread Kai Stian Olstad
On 08.12.2017 13:55, phrant...@gmail.com wrote: Hello Guys, I am new in Ansible but I like and I am eager to dig deeper in it. Anyway, I am trying to use vmware_vm_facts module in order get any VM list from vCenter however I got "Failed to connect to the host via ssh:..." Is always

Re: [ansible-project] Re: ansible 2.4 reports an error when extra var is passed

2017-12-08 Thread Kai Stian Olstad
On 08.12.2017 14:06, cmoul...@redhat.com wrote: Which strategy do you propose then to be able to override a key=value defined within a yaml ? Instead of using dict, flatten it and use key value. istio: dest: something release_tab_name: 0.2.12 Becomes istio_dest: something

[ansible-project] Email & Jinja2 templates

2017-12-08 Thread Gabriel Forster
Is there a way to easily send email notifications using a template as the email body? If I use a file lookup for the body, will all of the templating aspects work? -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this

[ansible-project] Re: ansible 2.4 reports an error when extra var is passed

2017-12-08 Thread cmoullia
Which strategy do you propose then to be able to override a key=value defined within a yaml ? On Friday, December 8, 2017 at 12:33:09 PM UTC+1, cmou...@redhat.com wrote: > > Hi > > ansible playbook reports an error when one of the value of the yaml config > file imported as var is passed on the

[ansible-project] vmware modules

2017-12-08 Thread phrantic7
Hello Guys, I am new in Ansible but I like and I am eager to dig deeper in it. Anyway, I am trying to use vmware_vm_facts module in order get any VM list from vCenter however I got "Failed to connect to the host via ssh:..." Why does vmware module try ssh connection to vCenter ? I was

Re: [ansible-project] Re: Wont be able to ping Windows Machines Via Linux Ansible Server

2017-12-08 Thread shilpa motghare
Hiii Thanks for your reply [root@ansible-server ansible]# ansible-playbook notepad.yml -vvv Using /etc/ansible/ansible.cfg as config file ERROR! 'win_get_url' is not a valid attribute for a Play The error appears to have been in '/etc/ansible/notepad.yml': line 1, column 3, but may be

Re: [ansible-project] Re: Wont be able to ping Windows Machines Via Linux Ansible Server

2017-12-08 Thread 'J Hawkesworth' via Ansible Project
Not sure what c:\tmp\notepad.exe is in your example, but here is how I install notepad++ {{ deploy_dir }} is a staging location where I keep files to be installed. I guess you could use C:\tmp for that if it makes sense for you. the /S makes the notepad++ installer run in silent, or

Re: [ansible-project] ansible 2.4 reports an error when extra var is passed

2017-12-08 Thread Kai Stian Olstad
On Friday, 8 December 2017 12.33.09 CET cmoul...@redhat.com wrote: > ansible playbook reports an error when one of the value of the yaml config > file imported as var is passed on the command line using -e > > Yaml Config File > > # > # Istio > # > istio: > github_url:

[ansible-project] ansible 2.4 reports an error when extra var is passed

2017-12-08 Thread cmoullia
Hi ansible playbook reports an error when one of the value of the yaml config file imported as var is passed on the command line using -e Yaml Config File # # Istio # istio: github_url: https://api.github.com/repos repo: istio/istio # Could be a tag "0.2.12" version or be empty "", then

Re: [ansible-project] No output from Cisco router

2017-12-08 Thread Kai Stian Olstad
On 08.12.2017 10:10, SK wrote: Excellent! Many thanks for the pointer and it is working now. Is there any link that you could provide me regarding the best practices for indendations? You have the YAML specification that says it must be space and you need to be consistent on the number of

Re: [ansible-project] No output from Cisco router

2017-12-08 Thread SK
Excellent! Many thanks for the pointer and it is working now. Is there any link that you could provide me regarding the best practices for indendations? On Friday, December 8, 2017 at 4:19:41 PM UTC+8, Kai Stian Olstad wrote: > > On Friday, 8 December 2017 09.10.55 CET SK wrote: > > I am

Re: [ansible-project] No output from Cisco router

2017-12-08 Thread Kai Stian Olstad
On Friday, 8 December 2017 09.10.55 CET SK wrote: > I am also facing a similar problem. The output says "register" is not > supported for ios_command module. Any idea on this? I am running the > latest ansible version 2.4.2.0. If I don't use the register command, the > playbook executes

Re: [ansible-project] Re: Write dynmaic variables in variable file and load into playbooks

2017-12-08 Thread Kai Stian Olstad
On Wednesday, 6 December 2017 17.35.48 CET Python Guru wrote: >Whatever you said is working and i'm happy to see that it's working. but > what if i want to load the variable file into a ansible variable and then > start taking out each variable >from the var file. > > My Var file: > >

Re: [ansible-project] No output from Cisco router

2017-12-08 Thread SK
Hi, I am also facing a similar problem. The output says "register" is not supported for ios_command module. Any idea on this? I am running the latest ansible version 2.4.2.0. If I don't use the register command, the playbook executes successfully, so the error is only caused by