Add intermediate task to reduce output spam
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
dc69cd87d4
commit
485ba68ebb
14
playbook.yml
14
playbook.yml
@ -51,9 +51,15 @@
|
||||
delay: 100
|
||||
until: job_poll.finished
|
||||
|
||||
- name: Parse results into dictionary
|
||||
ansible.builtin.set_fact:
|
||||
nodes: "{{ nodes | default([]) + [ {'name': item.instance.hw_name, 'ip': item.item.item.ip | ansible.utils.ipaddr('address')} ] }}"
|
||||
with_items: "{{ job_poll | json_query('results[*]') }}"
|
||||
no_log: true
|
||||
|
||||
- name: Register new VM's in inventory
|
||||
ansible.builtin.add_host:
|
||||
name: "{{ item.instance.hw_name }}"
|
||||
ansible_host: "{{ item.item.item.ip | ansible.utils.ipaddr('address') }}"
|
||||
groups: k3s-ha
|
||||
with_items: "{{ job_poll | json_query('results[*]') }}"
|
||||
name: "{{ item.name }}"
|
||||
ansible_host: "{{ item.ip }}"
|
||||
groups: k3s_ha
|
||||
with_items: "{{ nodes }}"
|
||||
|
Loading…
Reference in New Issue
Block a user