[ansible-project] Ansible parallel block execution

2019-01-16 Thread Tony Chia
You can try adding —fork some-large-number  to your ansible playbook command to 
force it execute in parallel 

-- 
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 group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/c33ea68b-6443-4202-b155-f7fd755487dd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Automating firmware upgrades on Dell Networking 7048P Switches

2019-01-16 Thread 'Nathan' via Ansible Project
Hello all,

I currently have 100 Dell Networking 7048P Switches that will need to be 
upgraded to the latest firmware and was hoping for some assistance on 
finding either an existing script or creating one for the Dell series 
switches.

I am relatively new to Ansible and keen to learn so any guidance would be 
greatly appreciated.


Kind Regards,
Nathan

(WeChat ID: Errorz0r)

-- 
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 group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/026e4624-f891-4072-9e10-04d3b19331f8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] skip_unreachable ?

2019-01-16 Thread Adam E
thanks for the reply Brian.  Yes, it sounds like clear_host_errors i think 
will be too big of a hammer, I just want to ignore unreachable.

I'll have to figure something else out then, have a couple other scenarios 
in mind anyways, gonna also look at 
 something like  https://github.com/openstack/ara to have better 
logging/reporting on playbook runs so I can more easily find the failed 
hosts and rerun.

ultimately just looking for a nice clean way to monitor and re-run failed 
executions, as well as easily distinguish things like connection failures 
vs actual failures where you know that running it again when the connection 
is up will work.   I don't find AWX gives me a good enough view into this 
and am looking for a better overall strategy.

On Wednesday, January 16, 2019 at 3:21:24 PM UTC-8, Brian Coca wrote:
>
> So what you are asking would be the 'default' way ansible operates, it 
> removes 'unreachable' hosts from the rest of the play and then 
> continues with the rest of the hosts. 
> > - any future tasks in the play against that host will not be run (no 
> point as they will all fail as host unreachable). 
>   this is the default 
> > - the playbook will continue run all tasks against the other hosts that 
> are reachable 
>also the default 
> > - the playbook run will report success (return code = 0) 
>   this is not the default, but you can have a `meta: 
> clear_host_errors` as your last task .. but this might be too big of a 
> hammer. 
>
> There are some cases in which the above is not true, for example, 
> using serial, if all hosts in a 'serial batch' fail (unreachable 
> counts) then the whole play fails, you also have max_fail_percentage 
> to manage how many failures you tolerate. 
>
>
> -- 
> 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 group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/842756e0-0741-4af3-8f74-cf75cb0a8464%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Need Clloudera prerequisite Ansible Scripts

2019-01-16 Thread Jonathan Lozada De La Matta
You can create some by looking at the cloudera  requirements.

On Wed, Jan 16, 2019 at 5:37 PM ashok kumar penumudi 
wrote:

> Hi,we are planning to automate cloudera installation by using Ansible
> scripts. Could you please share scripts asap.
>
> --
> 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 group, send email to ansible-project@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/383dc7b4-046c-4823-affa-971ef2a4ddc9%40googlegroups.com
> .
> For more options, visit https://groups.google.com/d/optout.
>
-- 

Jonathan lozada de la matta

AUTOMATION PRACTICE

-- 
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 group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAFYJA%2BLUznOnAN2iq0vH7KJoXh3goyhc2kWNVG_s662gyJndkw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] skip_unreachable ?

2019-01-16 Thread Brian Coca
So what you are asking would be the 'default' way ansible operates, it
removes 'unreachable' hosts from the rest of the play and then
continues with the rest of the hosts.
> - any future tasks in the play against that host will not be run (no point as 
> they will all fail as host unreachable).
  this is the default
> - the playbook will continue run all tasks against the other hosts that are 
> reachable
   also the default
> - the playbook run will report success (return code = 0)
  this is not the default, but you can have a `meta:
clear_host_errors` as your last task .. but this might be too big of a
hammer.

There are some cases in which the above is not true, for example,
using serial, if all hosts in a 'serial batch' fail (unreachable
counts) then the whole play fails, you also have max_fail_percentage
to manage how many failures you tolerate.


--
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 group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CACVha7epawL12Qq58F0WDLBujvYA-qki1w%2BpT8HNNmSPOLYgww%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Need Clloudera prerequisite Ansible Scripts

2019-01-16 Thread ashok kumar penumudi
Hi,we are planning to automate cloudera installation by using Ansible scripts. 
Could you please share scripts asap.

-- 
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 group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/383dc7b4-046c-4823-affa-971ef2a4ddc9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: Exclude match from with_items

2019-01-16 Thread John Harmon

>
>
> I re-read you response Brian I should be able to append to my when 
> statement with an and statement or something similar.  I will have to go 
> and test it out. 
>

Wow, I totally missed that.  That should do exactly what I want to.  Thank 
you! 

-- 
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 group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/297029e5-769a-4750-8b3a-f0ac1901d683%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: Exclude match from with_items

2019-01-16 Thread John Harmon


On Wednesday, January 16, 2019 at 4:14:36 PM UTC-7, John Harmon wrote:
>
> I should clarify a little.  I want to remove all groups except "Domain 
> Users" from the user specified.  I am also already using a when statement:
>   tasks:
> - name: "Disable non-vip user {{ user }}"
>   win_domain_user:
> name: "{{ user }}"
> password: $1$SomeSalt$tNt/ObWy40s.iTT/tmGYV.
> account_locked: yes
> groups: "{{ item }}"
> groups_action: remove
>   with_items:
> - aduser.groups
>   when:
> - not vip
>
>
> I re-read you response Brian I should be able to append to my when 
statement with an and statement or something similar.  I will have to go 
and test it out. 

-- 
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 group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/9d58ad2b-5071-4c73-a5b6-717e645bed7e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Re: Exclude match from with_items

2019-01-16 Thread Brian Coca
well, just reading teh docs on win_domain_user, seems you want`
group_action: replace`

-- 
--
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 group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CACVha7c8Mnu4q08FzXmMirX3U3nxL0f7-MdiW7ek2F_zTwf5RQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: Exclude match from with_items

2019-01-16 Thread John Harmon
I should clarify a little.  I want to remove all groups except "Domain 
Users" from the user specified.  I am also already using a when statement:
  tasks:
- name: "Disable non-vip user {{ user }}"
  win_domain_user:
name: "{{ user }}"
password: $1$SomeSalt$tNt/ObWy40s.iTT/tmGYV.
account_locked: yes
groups: "{{ item }}"
groups_action: remove
  with_items:
- aduser.groups
  when:
- not vip


-- 
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 group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/ca2e0d1c-49aa-4c1c-8fde-54a877efb6fe%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] alternate shadow file?

2019-01-16 Thread Brian Coca
use chroot to /mnt/pxe and then use user module, passwd will then
'work as expected', with ansible this might mean using the 'chroot'
connection plugin


-- 
--
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 group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CACVha7eChuVbdc9MiFvNk8K-o8xzxCrm0-i%3DyKigyKqyMUj-ag%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Exclude match from with_items

2019-01-16 Thread Brian Coca
Im unclear on what you want, but `when` executes PER loop iteration,
so you can check `item` and skip that iteration depending on the
condition you want.

--
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 group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CACVha7c0ux6RxB5a%3DksHAQaafPYhw97mrM0mO6aZy3uY1QYo-g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Exclude match from with_items

2019-01-16 Thread John Harmon
How might I go about excluding one item found under with_items?

For example, assume the following:
ok: [mytestserver] => {
"aduser": {
"account_locked": false,
"attempts": 1,
"changed": false,
"city": "Spanish Fork",
"company": "My Test Company",
"country": "US",
"description": "Regular User",
"distinguished_name": "CN=Gomer 
Pyle,OU=Administration,DC=MyTestCo,DC=com",
"email": "gp...@mytestco.com",
"enabled": true,
"failed": false,
"firstname": "Gomer",
"groups": [
"Domain Users",
"IT Admins",
"Citrix",
"Misc"

I would like to remove the above user from all groups, except for "Domain 
Users" Unsure how to approach it in this scenario:
  tasks:
- name: "Disable non-vip user {{ user }}"
  win_domain_user:
name: "{{ user }}"
password: $1$SomeSalt$tNt/ObWy40s.iTT/tmGYV.
account_locked: yes
groups: "{{ item }}"
groups_action: remove
  with_items:
- aduser.groups


-- 
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 group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/77c7b36a-fbf3-4087-ad2a-8e469be0e063%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Use of Ansible under PowerVC

2019-01-16 Thread Hugo Gonzalez

Hello Bernard,

On 1/16/19 4:19 PM, Bernard Tremblay wrote:

Hi,

We are trying to use ansible in a PowerVC environment.
We have a cluster of Power machines connected to a SAN box, we run 
SLES linux and Windows server to use SAP stuff.
I would like to find any resources/documentation/Playbooks/Roles about 
using ansible in that context.


Anybody knows if it is possible to create VM using the REST API of  
PowerVC and is there any documentation somewhere in this galaxy ?


From 
https://www.ibm.com/support/knowledgecenter/en/SSVSPA_1.3.2/com.ibm.powervc.cloud.help.doc/powervc_pg_kickoff_cloud.html


"You can use several types of interfaces to build solutions on top of 
PowerVC:
Supported OpenStack APIs - These APIs are a subset of the APIs provided 
by OpenStack and can be used with PowerVC without any modifications.
Extended OpenStack APIs - These APIs are a subset of the APIs provided 
by OpenStack, but their functions are extended by PowerVC.
PowerVC APIs - These APIs do not exist in OpenStack and are exclusive to 
PowerVC."



I suggest you start by browsing through the OpenStack modules in Ansible.:

https://docs.openstack.org/openstack-ansible/latest/

https://docs.ansible.com/ansible/latest/modules/list_of_cloud_modules.html#openstack


--
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 group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/913aa7a4-b6c2-3edb-2b1f-20be7f3776ed%40redhat.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Use of Ansible under PowerVC

2019-01-16 Thread Bernard Tremblay
Hi,

We are trying to use ansible in a PowerVC environment.   
We have a cluster of Power machines connected to a SAN box, we run SLES 
linux and Windows server to use SAP stuff.  
I would like to find any resources/documentation/Playbooks/Roles about 
using ansible in that context.

Anybody knows if it is possible to create VM using the REST API of  PowerVC 
and is there any documentation somewhere in this galaxy ?

Don't be rude, I'm new to this list and a newbie trying to move old stuff 
to Devops.

Any pointers are welcome,

   Thank you BT.

-- 
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 group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/333100f4-273d-4f54-89af-c5705ef8b819%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Windows Remote Desktop Access for Users using Ansible

2019-01-16 Thread Subhi Andrews
add the people to remote desktop users group using win_group_membership
module. That's the solution.

On Tue, Jan 15, 2019 at 9:29 AM Subhi Andrews  wrote:

> Hi folks,
>
> I am trying to configure RDP access to users who need to access to certain
> hosts. Is there a way to automate this using Ansible?
>
> Thanks,
> Subhi.
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Ansible Project" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/ansible-project/ndUuwwSq9i4/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> ansible-project+unsubscr...@googlegroups.com.
> To post to this group, send email to ansible-project@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/a2bd4828-df41-4297-9dec-93908f4406db%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAPkR6y12RG3J_f-Wsr96Uq1DCFY_Q19-unvfwDVvndRVRqnnGA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] alternate shadow file?

2019-01-16 Thread eric.b.hymowitz via Ansible Project
Greetings.

I would like to use the "user" module to change my password, but the shadow 
file is not located in /etc/shadow .  It's in an alternate location, 
specifically, /mnt/pxe/etc/shadow .  Is there a way to accomplish this?

I have a bad feeling that the answer is "only if the underlying passwd 
command allows this option," which it doesn't.

I suppose the "lineinfile" module will accomplish this with a little bit of 
extra effort, but it would be nice if the standard "user" module would 
allow this.

Maybe somebody has a better idea?

Thanks.

--EbH

-- 
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 group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/e1b08699-09ab-4ae8-b8dc-7ebe3aef0bdb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: Possible to update target OS from an ISO?

2019-01-16 Thread Todd Sampson
Hi Benjamin,
Thanks for pointing me in the right direction.  Our goal is to update a few 
hundred hosts at different customer's sites all over the country.  We're 
hoping to not have to have any physical presence.

I've been looking at a program called FOG. One problem I'm seeing is that 
the bios of our target machines are not set up for PXE booting which FOG 
needs.  I don't think the bios can be changed without physical presence.  I 
could be wrong.

Our target machines are Ubuntu 12.04 installations on a normal PC without 
any kind of out-of-band management provisions.  They were initially set up 
at our factory.

I'll keep looking at the possibility of creating a new partition in the 
target hosts and installing a lite OS, booting into the new OS (can it be 
done remotely?), installing Ubuntu 18.04 in the original partition, fix 
network and grub settings, and booting into the new 18.04 OS.  Our targets 
are not on the internet so I'll have to create an Ubuntu repository with 
all the dependencies and make it available on the customer's networks.

We have two things going for us: The target host hardware is all the same 
and they are configured all the same.  And we have SSH access into all the 
targets.

If you have any more thoughts, I'd appreciate any ideas!

Thanks,
Todd

On Tuesday, January 8, 2019 at 2:04:49 PM UTC-5, Todd Sampson wrote:
>
> We have several remote target machines running Ubuntu 12.04.  Is it 
> possible for Ansible to install Ubuntu 18.04 on the target machines from an 
> ISO?  I'm trying to avoid an update to 14.04 and then 16.04 and then 
> 18.04.  I'd like to avoid any updates at all and just do a fresh install of 
> 18.04.
>
> If it's possible, could you briefly tell me the procedure?
>
> Thanks!
> Todd
>

-- 
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 group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/153e708a-85e7-4fc0-b5e0-dbbc104efc0f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: Generating Quagga iBGP and eBGP conf files using Ansible

2019-01-16 Thread nchakrab
Hello Shahrooz,

Currently, this scenario is not supported. However, we are actively working 
on BGP automation (including FRR) and there's a proposal in place for it 
(https://github.com/ansible-network/network-proposals/issues/5). It would 
be great if you can add your suggestions/views to it.

Thanks!

Regards,
Nilashish Chakraborty
Associate Software Engineer, Ansible by Red Hat
Red Hat Bangalore, India

On Friday, January 11, 2019 at 6:10:55 AM UTC+5:30, Shahrooz Pooryousef 
wrote:
>
> Hi guys,
>
> I am going to do an experiment for iBGP and eBGP routers. The tool I am 
> using is Quagga routing software which is a open source routing tool. 
>
> For each router in Quagga I need to have a conf files which explain its 
> neighbors, routing policies etc. I need to generate these conf files for 
> internet topologies with different nodes. In another word, I like to use 
> CAIDA and another data set which showing the iBGP topology of the ASes and 
> generate the conf files for Quagga. 
>
> Is Ansible can generate these conf files for me? If yes, how can I give my 
> data sets and how can I be sure that the generated conf files are 
> compatible with Quagga?
>
> Best,
> Shahrooz
>

-- 
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 group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/f131f811-88a2-4fe9-a487-fde61e378819%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Ansible parallel block execution

2019-01-16 Thread Raoul
Hi Steve,

thanks for the hint, I'll give this module a try.

Kind regards,
Raoul

On Wednesday, January 16, 2019 at 1:57:08 PM UTC+1, Steve R wrote:
>
> There is now a "reboot" module (showed up in 2.7?) that will reboot 
> the host and wait for it to come back. 
>
> --Steve 
>
> On Wed, Jan 16, 2019 at 3:26 AM Raoul > 
> wrote: 
> > 
> > Hi, 
> > 
> > I am using in an Ansible playbook blocks to execute reboots on hosts 
> when required after applying updates. I have to ensure that the hosts are 
> back online after reboot. 
> > Using 'strategy: free' so that all defined tasks aren't executed in 
> linear order and it is not waited for a task to finish, but it looks like 
> the wait_for_connection inside the block definition is blocking the whole 
> playbook until ended. 
> > 
> > My current block looks like this: 
> > 
> > - when: reboot_required.rc != 0 
> >   block: 
> >   - name: Rebooting host 
> > become: true 
> > shell: 'shutdown -r +1 "Reboot required by Server Updates"' 
> > ignore_errors: true 
> > 
> >   - name: wait for server to come back 
> > wait_for_connection: 
> >   delay: 90 
> >   timeout: 800 
> > register: reboot_result 
> > 
> >   - debug: var=reboot_result 
> > 
> > 
> > How can I execute more reboots or wait_for_connection in parallel? 
> > 
> > Thanks for any hints, 
> > Raoul 
> > 
> > 
> > 
> > -- 
> > 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-proje...@googlegroups.com . 
> > To post to this group, send email to ansible...@googlegroups.com 
> . 
> > To view this discussion on the web visit 
> https://groups.google.com/d/msgid/ansible-project/6f1ecc99-61f9-4eb0-b237-600b7f0a6fc7%40googlegroups.com.
>  
>
> > For more options, visit https://groups.google.com/d/optout. 
>

-- 
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 group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/3f4405e1-bb67-4cae-a26b-edfda8bdc761%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Ansible parallel block execution

2019-01-16 Thread S C Rigler
There is now a "reboot" module (showed up in 2.7?) that will reboot
the host and wait for it to come back.

--Steve

On Wed, Jan 16, 2019 at 3:26 AM Raoul  wrote:
>
> Hi,
>
> I am using in an Ansible playbook blocks to execute reboots on hosts when 
> required after applying updates. I have to ensure that the hosts are back 
> online after reboot.
> Using 'strategy: free' so that all defined tasks aren't executed in linear 
> order and it is not waited for a task to finish, but it looks like the 
> wait_for_connection inside the block definition is blocking the whole 
> playbook until ended.
>
> My current block looks like this:
>
> - when: reboot_required.rc != 0
>   block:
>   - name: Rebooting host
> become: true
> shell: 'shutdown -r +1 "Reboot required by Server Updates"'
> ignore_errors: true
>
>   - name: wait for server to come back
> wait_for_connection:
>   delay: 90
>   timeout: 800
> register: reboot_result
>
>   - debug: var=reboot_result
>
>
> How can I execute more reboots or wait_for_connection in parallel?
>
> Thanks for any hints,
> Raoul
>
>
>
> --
> 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 group, send email to ansible-project@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/ansible-project/6f1ecc99-61f9-4eb0-b237-600b7f0a6fc7%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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 group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAFbiokc0fkudDiAZPGOjCMJzYOrnQB2y5E0xpcgY2ZiGDYsg1g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Ansible parallel block execution

2019-01-16 Thread Raoul
Hi,

I am using in an Ansible playbook blocks to execute reboots on hosts when 
required after applying updates. I have to ensure that the hosts are back 
online after reboot.
Using 'strategy: free' so that all defined tasks aren't executed in linear 
order and it is not waited for a task to finish, but it looks like the 
wait_for_connection inside the block definition is blocking the whole 
playbook until ended.

My current block looks like this:

- when: reboot_required.rc != 0
  block:
  - name: Rebooting host
become: true
shell: 'shutdown -r +1 "Reboot required by Server Updates"'
ignore_errors: true

  - name: wait for server to come back
wait_for_connection:
  delay: 90
  timeout: 800
register: reboot_result

  - debug: var=reboot_result


How can I execute more reboots or wait_for_connection in parallel?

Thanks for any hints,
Raoul



-- 
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 group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/6f1ecc99-61f9-4eb0-b237-600b7f0a6fc7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.