From 5ddee12c16284200d4019d21895e1d4612f81a41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Graber?= Date: Tue, 20 Aug 2024 14:45:36 -0400 Subject: [PATCH] images: Make sure /etc/hosts and /etc/hostname exist in RHEL derivatives MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Stéphane Graber --- images/almalinux.yaml | 7 +++++++ images/amazonlinux.yaml | 7 +++++++ images/centos.yaml | 7 +++++++ images/openeuler.yaml | 7 +++++++ images/oracle.yaml | 7 +++++++ images/rockylinux.yaml | 7 +++++++ images/springdalelinux.yaml | 7 +++++++ 7 files changed, 49 insertions(+) diff --git a/images/almalinux.yaml b/images/almalinux.yaml index 7e9dd0eaf..cc5a182de 100644 --- a/images/almalinux.yaml +++ b/images/almalinux.yaml @@ -373,6 +373,13 @@ packages: - aaarch64 actions: +- trigger: post-unpack + action: |- + #!/bin/sh + # Make sure we have our template targets + touch /etc/hosts + touch /etc/hostname + - trigger: post-unpack action: |- #!/bin/sh diff --git a/images/amazonlinux.yaml b/images/amazonlinux.yaml index f6ff457d8..e9efe4303 100644 --- a/images/amazonlinux.yaml +++ b/images/amazonlinux.yaml @@ -75,6 +75,13 @@ packages: action: install actions: +- trigger: post-unpack + action: |- + #!/bin/sh + # Make sure we have our template targets + touch /etc/hosts + touch /etc/hostname + - trigger: post-packages action: |- #!/bin/sh diff --git a/images/centos.yaml b/images/centos.yaml index 76ff9524f..449d45636 100644 --- a/images/centos.yaml +++ b/images/centos.yaml @@ -643,6 +643,13 @@ packages: - aaarch64 actions: +- trigger: post-unpack + action: |- + #!/bin/sh + # Make sure we have our template targets + touch /etc/hosts + touch /etc/hostname + - trigger: post-unpack action: |- #!/bin/sh diff --git a/images/openeuler.yaml b/images/openeuler.yaml index 4d92d32ce..89d2fa721 100644 --- a/images/openeuler.yaml +++ b/images/openeuler.yaml @@ -308,6 +308,13 @@ packages: - aarch64 actions: +- trigger: post-unpack + action: |- + #!/bin/sh + # Make sure we have our template targets + touch /etc/hosts + touch /etc/hostname + - trigger: post-unpack action: |- #!/bin/sh diff --git a/images/oracle.yaml b/images/oracle.yaml index 253d91a8a..684b84b02 100644 --- a/images/oracle.yaml +++ b/images/oracle.yaml @@ -229,6 +229,13 @@ packages: - cloud actions: +- trigger: post-unpack + action: |- + #!/bin/sh + # Make sure we have our template targets + touch /etc/hosts + touch /etc/hostname + - trigger: post-packages action: |- #!/bin/sh diff --git a/images/rockylinux.yaml b/images/rockylinux.yaml index e8b71ae62..8734c4758 100644 --- a/images/rockylinux.yaml +++ b/images/rockylinux.yaml @@ -329,6 +329,13 @@ packages: - aaarch64 actions: +- trigger: post-unpack + action: |- + #!/bin/sh + # Make sure we have our template targets + touch /etc/hosts + touch /etc/hostname + - trigger: post-unpack action: |- #!/bin/sh diff --git a/images/springdalelinux.yaml b/images/springdalelinux.yaml index da0cdae85..c5525a1fc 100644 --- a/images/springdalelinux.yaml +++ b/images/springdalelinux.yaml @@ -369,6 +369,13 @@ packages: - x86_64 actions: +- trigger: post-unpack + action: |- + #!/bin/sh + # Make sure we have our template targets + touch /etc/hosts + touch /etc/hostname + - trigger: post-unpack action: |- #!/bin/sh