You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible/test/integration/targets/vmware_guest/tasks/mac_address_d1_c1_f0.yml

38 lines
1.1 KiB
YAML

# Test code for the vmware_guest module.
# Copyright: (c) 2017, Abhijeet Kasurde <akasurde@redhat.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
- name: create new VMs with manual MAC address
vmware_guest:
validate_certs: False
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
name: DC0_H0_VM12
guest_id: centos64Guest
datacenter: "{{ dc1 }}"
hardware:
num_cpus: 1
memory_mb: 512
disk:
- size: 1gb
type: thin
autoselect_datastore: True
networks:
- name: VM Network
ip: 192.168.10.12
netmask: 255.255.255.0
gateway: 192.168.10.254
mac: aa:bb:cc:dd:aa:42
state: poweredoff
folder: vm
register: clone_d1_c1_f0
- debug: var=clone_d1_c1_f0
- name: assert that changes were made
assert:
that:
- "clone_d1_c1_f0['instance']['hw_eth0']['addresstype'] == 'manual'"
- "clone_d1_c1_f0['instance']['hw_eth0']['macaddress'] == 'aa:bb:cc:dd:aa:42'"