diff --git a/playbook.yml b/playbook.yml index d192718..f556563 100644 --- a/playbook.yml +++ b/playbook.yml @@ -61,7 +61,7 @@ nodes: "{{ nodes | default([]) + [ {'name': item.instance.hw_name, 'ip': item.item.item.ip | ansible.utils.ipaddr('address')} ] }}" loop: "{{ job_poll | json_query('results[*]') }}" loop_control: - label: "{{ { 'name': item.item.name, 'ip': item.item.ip } }}" + label: "{{ { 'name': item.instance.hw_name, 'ip': item.item.item.ip } }}" - name: Register new VM's in inventory ansible.builtin.add_host: @@ -83,7 +83,7 @@ register: publickeys loop: "{{ nodes }}" loop_control: - label: "{{ { 'name': item.name, 'ip': item.ip } }}" + label: "{{ item.ip }}" - name: Store public keys ansible.builtin.known_hosts: @@ -93,7 +93,7 @@ path: ~/.ssh/known_hosts loop: "{{ publickeys.results }}" loop_control: - label: "{{ { 'name': item.name, 'ip': item.ip } }}" + label: "{{ item.item.name, 'ip': item.item.ip } }}" - name: Provision Kubernetes hosts: k3s_ha