From 878a7727b9d019c0520edb88c020e4eb740271f9 Mon Sep 17 00:00:00 2001 From: Marius Cornea Date: Wed, 1 May 2019 16:53:26 -0400 Subject: [PATCH] bootstrap: install network-scripts if EL8 network-scripts is required by the network service which is enabled in tasks/main.yml. Also run this block of tasks on EL8 only, where it's actually needed. Change-Id: I2e43de001938bcdec96875ede0ef52d4742dc01c Closes-bug: 1827277 --- roles/tripleo-bootstrap/tasks/main.yml | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/roles/tripleo-bootstrap/tasks/main.yml b/roles/tripleo-bootstrap/tasks/main.yml index ddfe21769..6cd8b2f99 100644 --- a/roles/tripleo-bootstrap/tasks/main.yml +++ b/roles/tripleo-bootstrap/tasks/main.yml @@ -27,8 +27,16 @@ # Note that we don't try to start the service since this is a one shot script # which can fail if someone tries to starts it a second time. # See https://bugzilla.redhat.com/show_bug.cgi?id=1701866 for context. -- name: Ensure network service is enabled - service: - name: network - enabled: yes - become: true +- name: Deploy and enable network service + when: ansible_distribution_major_version == '8' + block: + - name: Deploy network-scripts required for deprecated network service + package: + name: network-scripts + become: true + ignore_errors: true + - name: Ensure network service is enabled + service: + name: network + enabled: yes + become: true