need to build the hosts file, too
This commit is contained in:
parent
3917bfd364
commit
2e86c1ed28
@ -121,11 +121,9 @@
|
|||||||
flat: yes
|
flat: yes
|
||||||
when: sshkey_register.ssh_public_key != ""
|
when: sshkey_register.ssh_public_key != ""
|
||||||
register: sshkey_fetch
|
register: sshkey_fetch
|
||||||
|
|
||||||
when: tag.find("infra") != -1 or aio_install | default(false)
|
when: tag.find("infra") != -1 or aio_install | default(false)
|
||||||
tags: infra
|
tags: infra
|
||||||
|
|
||||||
|
|
||||||
- name: Install packages on non-infra hosts
|
- name: Install packages on non-infra hosts
|
||||||
when: tag.find("infra") != -1 or aio_install | default(false)
|
when: tag.find("infra") != -1 or aio_install | default(false)
|
||||||
ansible.builtin.dnf:
|
ansible.builtin.dnf:
|
||||||
@ -146,6 +144,16 @@
|
|||||||
when: tag.find("infra") == -1 and sshkey_fetch
|
when: tag.find("infra") == -1 and sshkey_fetch
|
||||||
tags: sshkey
|
tags: sshkey
|
||||||
|
|
||||||
|
#- name: Setup a hosts file for the static deployment
|
||||||
|
# ansible.builtin.lineinfile:
|
||||||
|
# dest: /etc/hosts
|
||||||
|
# line: "{{ hostvars[ansible_fqdn]['ansible_br_mgmt']['ipv4']['address'] }} {{ ansible_hostname }}"
|
||||||
|
# when:
|
||||||
|
# - hostvars[ansible_fqdn]['ansible_br_mgmt'] is defined
|
||||||
|
# - hostvars[ansible_fqdn]['ansible_br_mgmt']['ipv4']['address'] is defined
|
||||||
|
# tags: debug123
|
||||||
|
|
||||||
|
|
||||||
- name: Disable cloud init from future runs
|
- name: Disable cloud init from future runs
|
||||||
file:
|
file:
|
||||||
path: /etc/cloud/cloud-init.disabled
|
path: /etc/cloud/cloud-init.disabled
|
||||||
|
Loading…
Reference in New Issue
Block a user