mirror of https://github.com/ansible/ansible.git
prepare_vmware_tests: use module_defaults (#63209)
parent
bdd0fac606
commit
73febd4ea6
@ -1,23 +1,15 @@
|
||||
- name: Add ESXi Hosts to vCenter
|
||||
vmware_host:
|
||||
hostname: '{{ vcenter_hostname }}'
|
||||
username: '{{ vcenter_username }}'
|
||||
password: '{{ vcenter_password }}'
|
||||
datacenter_name: '{{ dc1 }}'
|
||||
cluster_name: '{{ ccr1 }}'
|
||||
esxi_hostname: '{{ item }}'
|
||||
esxi_username: '{{ esxi_user }}'
|
||||
esxi_password: '{{ esxi_password }}'
|
||||
state: present
|
||||
validate_certs: no
|
||||
with_items: "{{ esxi_hosts }}"
|
||||
|
||||
- name: Disable the Maintenance Mode
|
||||
vmware_maintenancemode:
|
||||
validate_certs: no
|
||||
hostname: "{{ vcenter_hostname }}"
|
||||
username: "{{ vcenter_username }}"
|
||||
password: "{{ vcenter_password }}"
|
||||
esxi_hostname: '{{ item }}'
|
||||
state: absent
|
||||
with_items: "{{ esxi_hosts }}"
|
||||
|
@ -1,9 +1,5 @@
|
||||
- name: Create a category for cluster
|
||||
vmware_category:
|
||||
hostname: '{{ vcenter_hostname }}'
|
||||
username: '{{ vcenter_username }}'
|
||||
password: '{{ vcenter_password }}'
|
||||
validate_certs: False
|
||||
category_name: '{{ cluster_category }}'
|
||||
category_description: '{{ cluster_category }} description'
|
||||
state: present
|
||||
|
@ -1,11 +1,7 @@
|
||||
- name: Create Content Library
|
||||
vmware_content_library_manager:
|
||||
hostname: '{{ vcenter_hostname }}'
|
||||
username: '{{ vcenter_username }}'
|
||||
password: '{{ vcenter_password }}'
|
||||
library_name: test-content-lib
|
||||
library_description: 'Library created by the prepare_vmware_tests role'
|
||||
library_type: local
|
||||
datastore_name: '{{ ds2 }}'
|
||||
validate_certs: False
|
||||
state: present
|
||||
|
Loading…
Reference in New Issue