[ansible-project] Re: Use of vmware_guest module

2018-08-16 Thread Dimitri Yioulos
Doing this"

---

- hosts: localhost
  gather_facts: false
  *serial: 1*

  vars:
  ~

doesn't seem to help.  Any help would be appreciated.

On Tuesday, August 14, 2018 at 3:38:03 PM UTC-4, Dimitri Yioulos wrote:
>
> Hello, all.
>
> I need to create a playbook which will include shutting down, then 
> restarting, six virtual machines.  The shut-downs/start-ups must be done on 
> the machines in specific order (start-ups in reverse order of shut-downs).  
> Since they are virtual, I was thinking of using the vmware_guest module.  I 
> know that it works for a single machine at a time, such as:
>
> ---
>
> - hosts: localhost
>   gather_facts: false
>
>   vars:
> vsphere_host: 10.0.101.17
> vsphere_username: user
> vsphere_password: password
> vsphere_guestname: vmname
> vm_state: restarted #poweredon shutdownguest restarted
>
>   tasks:
> - name: boot vmware guest
>   vmware_guest:
>  hostname: "{{ vsphere_host }}"
>  username: "{{ vsphere_username }}"
>  password: "{{ vsphere_password }}"
>  validate_certs: no
>  name: "{{ vsphere_guestname }}"
>  wait_for_ip_address: no
>  state: "{{ vm_state }}"
>
> But, is there a way to specify all the machines to be shut down/brought 
> up, in the order that I'd like that to happen?  If so, how?
>
> Thanks.
>

-- 
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/c8484469-9e9e-4875-90b8-83b118720a17%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: Use of vmware_guest module

2018-08-15 Thread Dimitri Yioulos
Further question:

With the play written as follows:

---

- hosts: localhost
  gather_facts: false

  vars:
vsphere_host: 10.0.101.17
vsphere_username: user
vsphere_password: password
vm_state: poweredon #poweredon shutdownguest restarted

  tasks:
- name: Boot VMWare Guest
  with_items: ["vm1", "vm2"]
  vmware_guest:
 hostname: "{{ vsphere_host }}"
 username: "{{ vsphere_username }}"
 password: "{{ vsphere_password }}"
 validate_certs: no
 name: "{{ item }}"
 wait_for_ip_address: no
 state: "{{ vm_state }}"

How might I get vm1 to complete it's start prior to vm2 beginning its 
restart?  It's important that this be accomplished.

Thanks.

On Tuesday, August 14, 2018 at 3:38:03 PM UTC-4, Dimitri Yioulos wrote:
>
> Hello, all.
>
> I need to create a playbook which will include shutting down, then 
> restarting, six virtual machines.  The shut-downs/start-ups must be done on 
> the machines in specific order (start-ups in reverse order of shut-downs).  
> Since they are virtual, I was thinking of using the vmware_guest module.  I 
> know that it works for a single machine at a time, such as:
>
> ---
>
> - hosts: localhost
>   gather_facts: false
>
>   vars:
> vsphere_host: 10.0.101.17
> vsphere_username: user
> vsphere_password: password
> vsphere_guestname: vmname
> vm_state: restarted #poweredon shutdownguest restarted
>
>   tasks:
> - name: boot vmware guest
>   vmware_guest:
>  hostname: "{{ vsphere_host }}"
>  username: "{{ vsphere_username }}"
>  password: "{{ vsphere_password }}"
>  validate_certs: no
>  name: "{{ vsphere_guestname }}"
>  wait_for_ip_address: no
>  state: "{{ vm_state }}"
>
> But, is there a way to specify all the machines to be shut down/brought 
> up, in the order that I'd like that to happen?  If so, how?
>
> Thanks.
>

-- 
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/e09957c3-7fbe-4bd1-b08f-921715528c3d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: Use of vmware_guest module

2018-08-14 Thread Dimitri Yioulos
I'll answer my own question - yes "with_items" works, and in the order in 
which the items are listed.

On Tuesday, August 14, 2018 at 3:38:03 PM UTC-4, Dimitri Yioulos wrote:
>
> Hello, all.
>
> I need to create a playbook which will include shutting down, then 
> restarting, six virtual machines.  The shut-downs/start-ups must be done on 
> the machines in specific order (start-ups in reverse order of shut-downs).  
> Since they are virtual, I was thinking of using the vmware_guest module.  I 
> know that it works for a single machine at a time, such as:
>
> ---
>
> - hosts: localhost
>   gather_facts: false
>
>   vars:
> vsphere_host: 10.0.101.17
> vsphere_username: user
> vsphere_password: password
> vsphere_guestname: vmname
> vm_state: restarted #poweredon shutdownguest restarted
>
>   tasks:
> - name: boot vmware guest
>   vmware_guest:
>  hostname: "{{ vsphere_host }}"
>  username: "{{ vsphere_username }}"
>  password: "{{ vsphere_password }}"
>  validate_certs: no
>  name: "{{ vsphere_guestname }}"
>  wait_for_ip_address: no
>  state: "{{ vm_state }}"
>
> But, is there a way to specify all the machines to be shut down/brought 
> up, in the order that I'd like that to happen?  If so, how?
>
> Thanks.
>

-- 
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/b05da423-c7b6-4f5a-89e7-55b3b38d37a0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: Use of vmware_guest module

2018-08-14 Thread Dimitri Yioulos
As in "with_items".  If so, would the shut-downs/start-ups be in the order 
of the "with_items" list?

On Tuesday, August 14, 2018 at 3:38:03 PM UTC-4, Dimitri Yioulos wrote:
>
> Hello, all.
>
> I need to create a playbook which will include shutting down, then 
> restarting, six virtual machines.  The shut-downs/start-ups must be done on 
> the machines in specific order (start-ups in reverse order of shut-downs).  
> Since they are virtual, I was thinking of using the vmware_guest module.  I 
> know that it works for a single machine at a time, such as:
>
> ---
>
> - hosts: localhost
>   gather_facts: false
>
>   vars:
> vsphere_host: 10.0.101.17
> vsphere_username: user
> vsphere_password: password
> vsphere_guestname: vmname
> vm_state: restarted #poweredon shutdownguest restarted
>
>   tasks:
> - name: boot vmware guest
>   vmware_guest:
>  hostname: "{{ vsphere_host }}"
>  username: "{{ vsphere_username }}"
>  password: "{{ vsphere_password }}"
>  validate_certs: no
>  name: "{{ vsphere_guestname }}"
>  wait_for_ip_address: no
>  state: "{{ vm_state }}"
>
> But, is there a way to specify all the machines to be shut down/brought 
> up, in the order that I'd like that to happen?  If so, how?
>
> Thanks.
>

-- 
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/f6cc56f1-5429-4f71-8393-cfbc35364f90%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.