summaryrefslogtreecommitdiff
path: root/test/integration/targets/vmware_guest/tasks/poweroff_d1_c1_f1.yml
blob: cb5ada078f9b2ab31837338e8e2793611b7f1f35 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Test code for the vmware_guest module.
# Copyright: (c) 2017, James Tanner <tanner.jc@gmail.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)

# https://github.com/ansible/ansible/issues/25011
# Sending "-folders 1" to vcsim nests the datacenter under
# the folder so that the path prefix is no longer /vm
#
# /F0/DC0/vm/F0/DC0_H0_VM0

- name: set state to poweredoff on all VMs
  vmware_guest:
    validate_certs: False
    hostname: "{{ vcenter_hostname }}"
    username: "{{ vcenter_username }}"
    password: "{{ vcenter_password }}"
    name: "{{ item.name }}"
    state: poweredoff
    folder: "{{ item.folder }}"
  with_items: "{{ virtual_machines }}"
  register: poweroff_d1_c1_f1
- debug: var=poweroff_d1_c1_f1