Add new VM's to Ansible inventory
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
144c3604d5
commit
dc69cd87d4
10
playbook.yml
10
playbook.yml
@ -10,7 +10,7 @@
|
||||
url: "https://{{ repo_username }}:{{ repo_password }}@{{ image.ova_url }}"
|
||||
dest: /scratch/image.ova
|
||||
|
||||
- name: Deploy VMs from OVF-template
|
||||
- name: Deploy VM's from OVF-template
|
||||
community.vmware.vmware_deploy_ovf:
|
||||
hostname: "{{ hv.hostname }}"
|
||||
username: "{{ hv.username }}"
|
||||
@ -51,5 +51,9 @@
|
||||
delay: 100
|
||||
until: job_poll.finished
|
||||
|
||||
- ansible.builtin.debug:
|
||||
var: job_poll
|
||||
- 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[*]') }}"
|
||||
|
Loading…
Reference in New Issue
Block a user