Skip to content

Commit

Permalink
fix path when importing collection vars
Browse files Browse the repository at this point in the history
  • Loading branch information
mikemorency committed Oct 10, 2024
1 parent 0a8aa30 commit 7c8c598
Show file tree
Hide file tree
Showing 15 changed files with 20 additions and 21 deletions.
2 changes: 1 addition & 1 deletion roles/cluster_settings/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
2 changes: 1 addition & 1 deletion roles/content_library/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
2 changes: 1 addition & 1 deletion roles/deploy_ovf/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion roles/esxi_maintenance_mode/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
2 changes: 1 addition & 1 deletion roles/export_vm_as_ovf/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
3 changes: 1 addition & 2 deletions roles/info/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}"

Expand Down
2 changes: 1 addition & 1 deletion roles/info/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion roles/manage_folder/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
2 changes: 1 addition & 1 deletion roles/provision_vcenter/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion roles/provision_virtual_esxi/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
2 changes: 1 addition & 1 deletion roles/provision_vm/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
2 changes: 1 addition & 1 deletion roles/snapshot_management/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
2 changes: 1 addition & 1 deletion roles/system_settings/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion roles/vcenter_host_connection/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
12 changes: 6 additions & 6 deletions vars/main.yml
Original file line number Diff line number Diff line change
@@ -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)) }}"

0 comments on commit 7c8c598

Please sign in to comment.