From 1b95e02b98ffd6529ffcf28fc54d4f2b0f34d444 Mon Sep 17 00:00:00 2001 From: Till Maas Date: Mon, 15 Apr 2019 17:35:08 +0200 Subject: [PATCH] tasks/initscripts: Create /etc/sysconfig/network The initscripts network service requires /etc/sysconfig/network to be present. The file might be missing in container images, for example currently in CentOS 7. It seems to be created by anaconda usually. Therefore just create it if necessary as it can be empty. References: https://bugs.centos.org/view.php?id=16010 --- tasks/main.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tasks/main.yml b/tasks/main.yml index ddb8602..035fbe6 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -38,6 +38,12 @@ when: - network_provider == "initscripts" +- name: Ensure initscripts network file dependency is present + copy: + dest: /etc/sysconfig/network + content: "# Created by network system role" + force: false + - name: Configure networking connection profiles network_connections: provider: "{{ network_provider | mandatory }}"