Finetune loop_control #2
Some checks reported errors
continuous-integration/drone/push Build encountered an error

This commit is contained in:
Danny Bessems 2022-04-22 23:37:58 +02:00
parent ae49bffb2d
commit f103dd9e0d

View File

@ -61,7 +61,7 @@
nodes: "{{ nodes | default([]) + [ {'name': item.instance.hw_name, 'ip': item.item.item.ip | ansible.utils.ipaddr('address')} ] }}" nodes: "{{ nodes | default([]) + [ {'name': item.instance.hw_name, 'ip': item.item.item.ip | ansible.utils.ipaddr('address')} ] }}"
loop: "{{ job_poll | json_query('results[*]') }}" loop: "{{ job_poll | json_query('results[*]') }}"
loop_control: 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 - name: Register new VM's in inventory
ansible.builtin.add_host: ansible.builtin.add_host:
@ -83,7 +83,7 @@
register: publickeys register: publickeys
loop: "{{ nodes }}" loop: "{{ nodes }}"
loop_control: loop_control:
label: "{{ { 'name': item.name, 'ip': item.ip } }}" label: "{{ item.ip }}"
- name: Store public keys - name: Store public keys
ansible.builtin.known_hosts: ansible.builtin.known_hosts:
@ -93,7 +93,7 @@
path: ~/.ssh/known_hosts path: ~/.ssh/known_hosts
loop: "{{ publickeys.results }}" loop: "{{ publickeys.results }}"
loop_control: loop_control:
label: "{{ { 'name': item.name, 'ip': item.ip } }}" label: "{{ item.item.name, 'ip': item.item.ip } }}"
- name: Provision Kubernetes - name: Provision Kubernetes
hosts: k3s_ha hosts: k3s_ha