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.
|
|
|
- when: vcsim is not defined
|
|
|
|
block:
|
|
|
|
- import_role:
|
|
|
|
name: prepare_vmware_tests
|
|
|
|
vars:
|
|
|
|
setup_attach_host: true
|
|
|
|
- name: get host facts through a vcenter
|
|
|
|
vmware_host_facts:
|
|
|
|
validate_certs: False
|
|
|
|
hostname: "{{ vcenter_hostname }}"
|
|
|
|
username: "{{ vcenter_username }}"
|
|
|
|
password: "{{ vcenter_password }}"
|
|
|
|
esxi_hostname: '{{ hostvars[esxi1].ansible_host }}'
|
|
|
|
register: facts
|
|
|
|
- debug: var=facts
|
|
|
|
- name: verify some data,like ansible_processor
|
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
- "'ansible_hostname' in facts['ansible_facts']"
|
|
|
|
- "'ansible_processor' in facts['ansible_facts']"
|
|
|
|
|
|
|
|
- name: get host facts through from a host
|
|
|
|
vmware_host_facts:
|
|
|
|
validate_certs: False
|
|
|
|
hostname: '{{ hostvars[esxi1].ansible_host }}'
|
|
|
|
username: '{{ hostvars[esxi1].ansible_user }}'
|
|
|
|
password: '{{ hostvars[esxi1].ansible_password }}'
|
|
|
|
register: facts
|
|
|
|
- debug: var=facts
|
|
|
|
- name: verify some data,like ansible_processor
|
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
- "'ansible_hostname' in facts['ansible_facts']"
|
|
|
|
- "'ansible_processor' in facts['ansible_facts']"
|