diff --git a/tasks/setupacdc.yml b/tasks/setupacdc.yml index 7e8f739..b2037c9 100644 --- a/tasks/setupacdc.yml +++ b/tasks/setupacdc.yml @@ -1,6 +1,10 @@ - hosts: localhost gather_facts: yes + vars: + addc_hostname: "DC1" + mac_address: "8E:90:31:DE:31:36" + tasks: - name: Install 'proxmoxer' and 'requests' Python libraries for the ansible controller ansible.builtin.pip: @@ -10,17 +14,10 @@ state: present become: no -- hosts: node0 - - vars: - addc_hostname: "DC1" - mac_address: "8E:90:31:DE:31:36" - - tasks: - name: Create lxc container community.proxmox.proxmox: vmid: 200 - node: node0 + node: "{{ hostvars['node0']['ansible_host'] }}" api_user: root@pam api_password: "{{ proxmox_password }}" api_host: node0