diff --git a/roles/cluster_settings/tasks/main.yml b/roles/cluster_settings/tasks/main.yml index aac46143..25be6a30 100644 --- a/roles/cluster_settings/tasks/main.yml +++ b/roles/cluster_settings/tasks/main.yml @@ -1,7 +1,7 @@ --- - name: Import Collection Level Vars ansible.builtin.include_vars: - file: "{{ role_path }}/../vars/main.yml" + file: "{{ role_path }}/../../vars/main.yml" - name: Check Mandatory Variables Are Defined ansible.builtin.assert: diff --git a/roles/content_library/tasks/main.yml b/roles/content_library/tasks/main.yml index f705800a..1b391097 100644 --- a/roles/content_library/tasks/main.yml +++ b/roles/content_library/tasks/main.yml @@ -1,7 +1,7 @@ --- - name: Import Collection Level Vars ansible.builtin.include_vars: - file: "{{ role_path }}/../vars/main.yml" + file: "{{ role_path }}/../../vars/main.yml" - name: Check Mandatory Variables Are Defined ansible.builtin.assert: diff --git a/roles/deploy_ovf/tasks/main.yml b/roles/deploy_ovf/tasks/main.yml index d347b97c..c6e32bcc 100644 --- a/roles/deploy_ovf/tasks/main.yml +++ b/roles/deploy_ovf/tasks/main.yml @@ -1,7 +1,7 @@ --- - name: Import Collection Level Vars ansible.builtin.include_vars: - file: "{{ role_path }}/../vars/main.yml" + file: "{{ role_path }}/../../vars/main.yml" - name: Include Input Validation Tasks ansible.builtin.include_tasks: input_validation.yml diff --git a/roles/esxi_maintenance_mode/tasks/main.yml b/roles/esxi_maintenance_mode/tasks/main.yml index be66c038..5a4dc637 100644 --- a/roles/esxi_maintenance_mode/tasks/main.yml +++ b/roles/esxi_maintenance_mode/tasks/main.yml @@ -1,7 +1,7 @@ --- - name: Import Collection Level Vars ansible.builtin.include_vars: - file: "{{ role_path }}/../vars/main.yml" + file: "{{ role_path }}/../../vars/main.yml" - name: Check Mandatory Variables Are Defined ansible.builtin.assert: diff --git a/roles/export_vm_as_ovf/tasks/main.yml b/roles/export_vm_as_ovf/tasks/main.yml index b1c02f9f..1819e58d 100644 --- a/roles/export_vm_as_ovf/tasks/main.yml +++ b/roles/export_vm_as_ovf/tasks/main.yml @@ -1,7 +1,7 @@ --- - name: Import Collection Level Vars ansible.builtin.include_vars: - file: "{{ role_path }}/../vars/main.yml" + file: "{{ role_path }}/../../vars/main.yml" - name: Check Mandatory Variables Are Defined ansible.builtin.assert: diff --git a/roles/info/defaults/main.yml b/roles/info/defaults/main.yml index fe1a165c..0f9d7ff9 100644 --- a/roles/info/defaults/main.yml +++ b/roles/info/defaults/main.yml @@ -2,10 +2,9 @@ info_hostname: "{{ vmware_ops_collection_hostname }}" info_username: "{{ vmware_ops_collection_username }}" info_password: "{{ vmware_ops_collection_password }}" -info_validate_certs: "{{ vmware_ops_collection_validate_certs }}" +info_validate_certs: "{{ vmware_ops_collection_validate_certs | default(true) }}" info_port: "{{ vmware_ops_collection_port }}" -info_validate_certs: true info_expose_outputs_as_variable: true info_hostport: "{{ info_hostname + ':' + info_port if info_port is defined else info_hostname }}" diff --git a/roles/info/tasks/main.yml b/roles/info/tasks/main.yml index f0149ce4..04c47095 100644 --- a/roles/info/tasks/main.yml +++ b/roles/info/tasks/main.yml @@ -1,7 +1,7 @@ --- - name: Import Collection Level Vars ansible.builtin.include_vars: - file: "{{ role_path }}/../vars/main.yml" + file: "{{ role_path }}/../../vars/main.yml" - name: License info ansible.builtin.include_tasks: license_info.yml diff --git a/roles/manage_folder/tasks/main.yml b/roles/manage_folder/tasks/main.yml index 6e14fedb..5a255c8b 100644 --- a/roles/manage_folder/tasks/main.yml +++ b/roles/manage_folder/tasks/main.yml @@ -1,7 +1,7 @@ --- - name: Import Collection Level Vars ansible.builtin.include_vars: - file: "{{ role_path }}/../vars/main.yml" + file: "{{ role_path }}/../../vars/main.yml" - name: Check Mandatory Variables Are Defined ansible.builtin.assert: diff --git a/roles/provision_vcenter/tasks/main.yml b/roles/provision_vcenter/tasks/main.yml index 112aed03..128d0cf4 100644 --- a/roles/provision_vcenter/tasks/main.yml +++ b/roles/provision_vcenter/tasks/main.yml @@ -1,7 +1,7 @@ --- - name: Import Collection Level Vars ansible.builtin.include_vars: - file: "{{ role_path }}/../vars/main.yml" + file: "{{ role_path }}/../../vars/main.yml" - name: Validate Inputs ansible.builtin.include_tasks: validate_inputs.yml diff --git a/roles/provision_virtual_esxi/tasks/main.yml b/roles/provision_virtual_esxi/tasks/main.yml index 70c1ddfd..66cc0bfb 100644 --- a/roles/provision_virtual_esxi/tasks/main.yml +++ b/roles/provision_virtual_esxi/tasks/main.yml @@ -1,7 +1,7 @@ --- - name: Import Collection Level Vars ansible.builtin.include_vars: - file: "{{ role_path }}/../vars/main.yml" + file: "{{ role_path }}/../../vars/main.yml" - name: Check General Mandatory Variables Are Defined ansible.builtin.assert: diff --git a/roles/provision_vm/tasks/main.yml b/roles/provision_vm/tasks/main.yml index 2b9aaec4..1e4f0b4a 100644 --- a/roles/provision_vm/tasks/main.yml +++ b/roles/provision_vm/tasks/main.yml @@ -1,7 +1,7 @@ --- - name: Import Collection Level Vars ansible.builtin.include_vars: - file: "{{ role_path }}/../vars/main.yml" + file: "{{ role_path }}/../../vars/main.yml" - name: Manage VM community.vmware.vmware_guest: diff --git a/roles/snapshot_management/tasks/main.yml b/roles/snapshot_management/tasks/main.yml index 4e31d147..87e9ee62 100644 --- a/roles/snapshot_management/tasks/main.yml +++ b/roles/snapshot_management/tasks/main.yml @@ -1,7 +1,7 @@ --- - name: Import Collection Level Vars ansible.builtin.include_vars: - file: "{{ role_path }}/../vars/main.yml" + file: "{{ role_path }}/../../vars/main.yml" - name: Manages virtual machines snapshots in vCenter community.vmware.vmware_guest_snapshot: diff --git a/roles/system_settings/tasks/main.yml b/roles/system_settings/tasks/main.yml index 19a671c5..042c26ff 100644 --- a/roles/system_settings/tasks/main.yml +++ b/roles/system_settings/tasks/main.yml @@ -1,6 +1,6 @@ - name: Import Collection Level Vars ansible.builtin.include_vars: - file: "{{ role_path }}/../vars/main.yml" + file: "{{ role_path }}/../../vars/main.yml" - name: Configure ntpd ansible.builtin.include_tasks: ntpd.yml diff --git a/roles/vcenter_host_connection/tasks/main.yml b/roles/vcenter_host_connection/tasks/main.yml index ecb73e54..f6a7a6e7 100644 --- a/roles/vcenter_host_connection/tasks/main.yml +++ b/roles/vcenter_host_connection/tasks/main.yml @@ -1,7 +1,7 @@ --- - name: Import Collection Level Vars ansible.builtin.include_vars: - file: "{{ role_path }}/../vars/main.yml" + file: "{{ role_path }}/../../vars/main.yml" - name: Check General Mandatory Variables Are Defined ansible.builtin.assert: diff --git a/vars/main.yml b/vars/main.yml index eeac46fd..a1c4df58 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -1,9 +1,9 @@ --- -vmware_ops_collection_hostname: "{{ vmware_ops_hostname | default(lookup('ansible.builtin.env', 'VMWARE_HOST')) }}" -vmware_ops_collection_username: "{{ vmware_ops_username | default(lookup('ansible.builtin.env', 'VMWARE_USER')) }}" -vmware_ops_collection_password: "{{ vmware_ops_password | default(lookup('ansible.builtin.env', 'VMWARE_PASSWORD')) }}" -vmware_ops_collection_validate_certs: "{{ vmware_ops_validate_certs | default(lookup('ansible.builtin.env', 'VMWARE_VALIDATE_CERTS')) }}" -vmware_ops_collection_port: "{{ vmware_ops_port | default(lookup('ansible.builtin.env', 'VMWARE_PORT')) }}" +vmware_ops_collection_hostname: "{{ vmware_ops_hostname | default(lookup('ansible.builtin.env', 'VMWARE_HOST', default=Undefined)) }}" +vmware_ops_collection_username: "{{ vmware_ops_username | default(lookup('ansible.builtin.env', 'VMWARE_USER', default=Undefined)) }}" +vmware_ops_collection_password: "{{ vmware_ops_password | default(lookup('ansible.builtin.env', 'VMWARE_PASSWORD', default=Undefined)) }}" +vmware_ops_collection_validate_certs: "{{ vmware_ops_validate_certs | default(lookup('ansible.builtin.env', 'VMWARE_VALIDATE_CERTS', default=Undefined)) }}" +vmware_ops_collection_port: "{{ vmware_ops_port | default(lookup('ansible.builtin.env', 'VMWARE_PORT', default=Undefined)) }}" vmware_ops_collection_proxy_host: "{{ vmware_ops_proxy_host | default(lookup('ansible.builtin.env', 'VMWARE_PROXY_HOST', default=Undefined)) }}" -vmware_ops_collection_proxy_port: "{{ vmware_ops_proxy_port | default(lookup('ansible.builtin.env', 'VMWARE_PROXY_PORT')) }}" +vmware_ops_collection_proxy_port: "{{ vmware_ops_proxy_port | default(lookup('ansible.builtin.env', 'VMWARE_PROXY_PORT', default=Undefined)) }}"