Merge "Limit hostfile generation to control nodes"
This commit is contained in:
commit
5f0ea5847f
@ -2,12 +2,12 @@
|
|||||||
- name: get real node hostname
|
- name: get real node hostname
|
||||||
shell: echo $(hostname)
|
shell: echo $(hostname)
|
||||||
register: real_node_hostname
|
register: real_node_hostname
|
||||||
delegate_to: "{{ baremetal_node }}"
|
delegate_to: "{{ control_node }}"
|
||||||
|
|
||||||
- name: get real node ip
|
- name: get real node ip
|
||||||
shell: ip -4 addr show "{{ hostvars[baremetal_node]['baremetal_nic'] }}" | grep -oP "(?<=inet )[\d\.]+(?=/)"
|
shell: ip -4 addr show "{{ hostvars[control_node]['baremetal_nic'] }}" | grep -oP "(?<=inet )[\d\.]+(?=/)"
|
||||||
register: real_node_ip
|
register: real_node_ip
|
||||||
delegate_to: "{{ baremetal_node }}"
|
delegate_to: "{{ control_node }}"
|
||||||
|
|
||||||
- name: Insert hosts entries for all kolla-ansible hosts
|
- name: Insert hosts entries for all kolla-ansible hosts
|
||||||
lineinfile:
|
lineinfile:
|
||||||
|
@ -39,9 +39,9 @@
|
|||||||
when: customize_etc_hosts | bool == True
|
when: customize_etc_hosts | bool == True
|
||||||
|
|
||||||
- include: append_to_etc_hosts.yml
|
- include: append_to_etc_hosts.yml
|
||||||
with_inventory_hostnames: baremetal
|
with_inventory_hostnames: control
|
||||||
loop_control:
|
loop_control:
|
||||||
loop_var: baremetal_node
|
loop_var: control_node
|
||||||
become: True
|
become: True
|
||||||
when: customize_etc_hosts | bool == True
|
when: customize_etc_hosts | bool == True
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user