refactor(global_defaults): consolidate hypervisor auth into shared credential dicts
This commit is contained in:
@@ -10,6 +10,31 @@
|
||||
- name: Normalize hypervisor inputs
|
||||
ansible.builtin.include_tasks: hypervisor.yml
|
||||
|
||||
- name: Set VMware module auth defaults
|
||||
when: hypervisor_type == 'vmware'
|
||||
ansible.builtin.set_fact:
|
||||
_vmware_auth:
|
||||
hostname: "{{ hypervisor_cfg.url }}"
|
||||
username: "{{ hypervisor_cfg.username }}"
|
||||
password: "{{ hypervisor_cfg.password }}"
|
||||
validate_certs: "{{ hypervisor_cfg.certs | bool }}"
|
||||
datacenter: "{{ hypervisor_cfg.datacenter }}"
|
||||
no_log: true
|
||||
|
||||
- name: Set Proxmox module auth defaults
|
||||
when: hypervisor_type == 'proxmox'
|
||||
ansible.builtin.set_fact:
|
||||
_proxmox_auth:
|
||||
api_host: "{{ hypervisor_cfg.url }}"
|
||||
api_user: "{{ hypervisor_cfg.username }}"
|
||||
api_password: "{{ hypervisor_cfg.password }}"
|
||||
_proxmox_auth_node:
|
||||
api_host: "{{ hypervisor_cfg.url }}"
|
||||
api_user: "{{ hypervisor_cfg.username }}"
|
||||
api_password: "{{ hypervisor_cfg.password }}"
|
||||
node: "{{ hypervisor_cfg.host }}"
|
||||
no_log: true
|
||||
|
||||
- name: Normalize system inputs
|
||||
ansible.builtin.include_tasks: system.yml
|
||||
|
||||
|
||||
Reference in New Issue
Block a user