Re: [ansible-project] wait_for module

2017-11-07 Thread Kai Stian Olstad
On 08.11.2017 07:20, coach rhca wrote: Thanks Kai for that insight , i have taken out the port=22 and include the timeout=600 option in wait_for module in order to check the services by login to server. Also can we set different timeout values for different host in wait_for module. You can

Re: [ansible-project] wait_for module

2017-11-07 Thread coach rhca
Thanks Kai for that insight , i have taken out the port=22 and include the timeout=600 option in wait_for module in order to check the services by login to server. Also can we set different timeout values for different host in wait_for module.Can you please throw some light as i am created a

Re: [ansible-project] passing --ask-become-pass to task within playbook

2017-11-07 Thread Kai Stian Olstad
On 07.11.2017 23:12, Stephen Tyler wrote: If I have a playbook with -b --become-user=root --ask-become-pass CLI arguments.. and a script/task that cannot be started with root (so I can't use become on a task level) but later asks to sudo, to be able to pass the ask-become-pass to the task?

Re: [ansible-project] How do you register variables from imported playbooks?

2017-11-07 Thread Brian Coca
You are getting an error because you are passing a string, the 'register' keyword is 'host specific' since the host in both plays is 'localhost' it is directly accessible, you should have: vpc_subnet_id: "{{public_subnet}}" -- -- Brian Coca -- You received this message because you

Re: [ansible-project] Modifying local files while targeting a remote system

2017-11-07 Thread EspressoBeanies
Thanks Kai On Tuesday, November 7, 2017 at 2:19:48 PM UTC-5, Kai Stian Olstad wrote: > > On 07. nov. 2017 20:12, EspressoBeanies wrote: > > Is it possible to modify local files while targeting a remote system in > an > > Ansible YAML file? I'm trying to run an Ansible script on a remote >

[ansible-project] passing --ask-become-pass to task within playbook

2017-11-07 Thread Stephen Tyler
Hello. If I have a playbook with -b --become-user=root --ask-become-pass CLI arguments.. and a script/task that cannot be started with root (so I can't use become on a task level) but later asks to sudo, to be able to pass the ask-become-pass to the task? The script i'm referring to is

Re: [ansible-project] regexp multiline

2017-11-07 Thread Dick Visser
There are currently only two flags available for use in regular expression filters in ansible, which appear to be 'ignorecase' and 'multiline': https://github.com/ansible/ansible/blob/devel/lib/ansible/plugins/filter/core.py You're not entirely bound by these restrictions, because it's possible

[ansible-project] Re: fatal: [localhost]: FAILED! when installing IIS on Windows Server 2016 ec2

2017-11-07 Thread Akim Grudzitsky
OMG! Guys, thank you SO much!!! I appreciate your help. On Tuesday, November 7, 2017 at 3:00:48 PM UTC-5, Jordan Borean wrote: > > As Jon is saying you are trying to run the win_feature module on localhost > and not the newly provisioned EC2 server. Here is a very mock playbook that > you need

[ansible-project] Re: fatal: [localhost]: FAILED! when installing IIS on Windows Server 2016 ec2

2017-11-07 Thread Jordan Borean
As Jon is saying you are trying to run the win_feature module on localhost and not the newly provisioned EC2 server. Here is a very mock playbook that you need to follow to get working. Note this is not tested and some things could potentially be wrong --- - name: provision new EC2 server

Re: [ansible-project] Modifying local files while targeting a remote system

2017-11-07 Thread Kai Stian Olstad
On 07. nov. 2017 20:12, EspressoBeanies wrote: > Is it possible to modify local files while targeting a remote system in an > Ansible YAML file? I'm trying to run an Ansible script on a remote machine, > but when everything finishes on that remote machine, I'd like to move that > hostname from one

[ansible-project] Modifying local files while targeting a remote system

2017-11-07 Thread EspressoBeanies
Is it possible to modify local files while targeting a remote system in an Ansible YAML file? I'm trying to run an Ansible script on a remote machine, but when everything finishes on that remote machine, I'd like to move that hostname from one Ansible hosts file to another. Is it possible and

Re: [ansible-project] Errativ behavior when looping over a fileglob

2017-11-07 Thread Kai Stian Olstad
On 07. nov. 2017 19:21, Marc Haber wrote: > Hi, > > I am trying to remove a bunch of files wiht the following code: > > $ cat site.yml > --- > - name: apply common configuration >hosts: all >remote_user: root >become: "yes" >roles: > - common > $ cat

[ansible-project] Errativ behavior when looping over a fileglob

2017-11-07 Thread Marc Haber
Hi, I am trying to remove a bunch of files wiht the following code: $ cat site.yml --- - name: apply common configuration hosts: all remote_user: root become: "yes" roles: - common $ cat roles/common/tasks/repos.yml --- - name: remove extra files that may be on the systems file:

Re: [ansible-project] wait_for module

2017-11-07 Thread Kai Stian Olstad
On 07. nov. 2017 18:22, coach rhca wrote: > Thanks Kai , looking for something like the server is rebooted and looks > for the processes or service and then move to the next server reboots and > check the service and goes to the next hosts and does the same. You can do something like this. -

Re: [ansible-project] wait_for module

2017-11-07 Thread coach rhca
Thanks Kai , looking for something like the server is rebooted and looks for the processes or service and then move to the next server reboots and check the service and goes to the next hosts and does the same. On Mon, Nov 6, 2017 at 8:51 PM, Kai Stian Olstad < ansible-project+l...@olstad.com>

[ansible-project] how to get only and only command output in ansible playbook

2017-11-07 Thread Sameer Modak
Hello Team, Whenever i run my playbook, it gives me below output which i do not want i just want standard output or standard error. --- - hosts: all remote_user: ansible become: yes become_method: sudo gather_facts: no tasks: - name: dislpyname command:

[ansible-project] Re: fatal: [localhost]: FAILED! when installing IIS on Windows Server 2016 ec2

2017-11-07 Thread Akim Grudzitsky
Hi Jon, Thank you very much for the reply. Sincerely, Akim On Tuesday, November 7, 2017 at 4:10:50 AM UTC-5, J Hawkesworth wrote: > > > I don't use ec2 but I think having the 'connection: local' for your > windows hosts is causing you problems, as it appears to be attempting to > use the

Re: [ansible-project] Maximum Failure Percentage - global setting

2017-11-07 Thread Kai Stian Olstad
On 07.11.2017 12:25, Jonathan Nuñez Aguin wrote: I have multiple plays where we need to fail when one of the host has a failure, behaviour that we can configure by using "max_fail_percentage: 0" but we need to add this setting in each play which is really verbose and prone to errors if the

Re: [ansible-project] tower surveys / how to enter a per host variable value

2017-11-07 Thread Kai Stian Olstad
On 07.11.2017 10:31, Ulises Alonso wrote: Hi all again I don't see it is possible to enter a variable value different for each host when using ansible tower surveys Is it not possible? This is the list for Ansible not Tower. Please contact RedHat support for Tower questions / issues. --

[ansible-project] Maximum Failure Percentage - global setting

2017-11-07 Thread Jonathan Nuñez Aguin
Hello, I have multiple plays where we need to fail when one of the host has a failure, behaviour that we can configure by using "max_fail_percentage: 0" but we need to add this setting in each play which is really verbose and prone to errors if the developer miss it in a new play. Is there a

[ansible-project] Hi, can someone help me please ? it's about docker_image is not pushing to docker hub

2017-11-07 Thread Arkan M Gerges Anabi
Hi guys, I'm trying for more than 2 days to make this work, I'm using jenkins with ansible. My ansible role is like this: - name: Login into docker hub docker_login: username: "username" password: "pass" email: "me@myemail" docker_host: "192.168.99.100" tls: true

[ansible-project] Re: Win_command module adds an additional slash to the windows path.

2017-11-07 Thread 'J Hawkesworth' via Ansible Project
You don't mention which ansible version you are using, but I think latest devel version and possible 2.4.1 has some improvements to argument handling for win command. If you are using an older ansible version, I suggest trying win_shell. Make sure groovy is on your PATH (or use the args:

[ansible-project] Re: fatal: [localhost]: FAILED! when installing IIS on Windows Server 2016 ec2

2017-11-07 Thread 'J Hawkesworth' via Ansible Project
I don't use ec2 but I think having the 'connection: local' for your windows hosts is causing you problems, as it appears to be attempting to use the win_feature.py (documentation) instead of the win_feature.ps1 (actual windows module code). The connection type for windows hosts, at the moment

[ansible-project] Re: Get user details

2017-11-07 Thread Soniya panwar
hello, Yes, you can get available users or user details in system by using ansible playbooks. For this you need to use the command / win_command module. "The command module takes the command name followed by a list of space-delimited arguments and executes the given command on all selected