tripleo-quickstart-extras/roles/baremetal-prep-virthost/tasks/main.yml
Sandeep Yadav 48f1cdb604 Update baremetal-prep-virthost for Rhel8/C8
Rhel/Centos8 don't have bridge-utils utility. We have to create
network bridge using nmcli tool. Added template for RHEL8/C8
- add-provisioning-interface-os-major-version-8.sh.j2 and modified
logic in playbook to call relevant template based on OS Version.

We also set the required firewalld commands to allow proper network
traffic flow from undercloud to baremetal overcloud nodes.

Change-Id: I5e56b387283fa8deff857bcf3a39a007a3d876a3
2020-06-16 21:46:15 +05:30

28 lines
910 B
YAML

---
- name: Copy over provisioning nic script template for rhel7 or centos7
template:
src: add-provisioning-interface.sh.j2
dest: "{{ working_dir }}/add-provisioning-interface.sh"
mode: 0755
when:
- ansible_distribution in ['RedHat', 'CentOS']
- ansible_distribution_major_version|int <= 7
- name: Copy over provisioning nic script template for rhel8 or centos8
template:
src: add-provisioning-interface-os-major-version-8.sh.j2
dest: "{{ working_dir }}/add-provisioning-interface.sh"
mode: 0755
when:
- ansible_distribution in ['RedHat', 'CentOS']
- ansible_distribution_major_version|int >= 8
- name: wait for script file to exist
wait_for: path="{{ working_dir }}/add-provisioning-interface.sh"
- name: Add provisioning interface to the "brovc" bridge
become: true
shell: >
"{{ working_dir }}"/add-provisioning-interface.sh
changed_when: true