summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2022-02-28 22:35:46 +0100
committerHugo Hörnquist <hugo@lysator.liu.se>2022-03-01 00:03:01 +0100
commit7e2b8e0934a8bcaca2f07e4d69e6a8ee6f006e4f (patch)
tree5c80a5e4219f3d765fef047cb8fd23b11cf5faa4
parentForce short hostname in /etc/hostname. (diff)
downloadprofiles-7e2b8e0934a8bcaca2f07e4d69e6a8ee6f006e4f.tar.gz
profiles-7e2b8e0934a8bcaca2f07e4d69e6a8ee6f006e4f.tar.xz
Transient config to unhost ourself.
-rw-r--r--manifests/common.pp7
1 files changed, 7 insertions, 0 deletions
diff --git a/manifests/common.pp b/manifests/common.pp
index 8b933fe..ff801e5 100644
--- a/manifests/common.pp
+++ b/manifests/common.pp
@@ -8,6 +8,13 @@ class profiles::common (
content => "${::hostname}\n",
}
+ file_line { 'transient config to unhost ourself':
+ ensure => absent,
+ match => $::fqdn,
+ path => '/etc/hosts',
+ multiple => true,
+ match_for_absence => true,
+ } ->
file_line { 'hosts ourself':
ensure => present,
line => "::1\t${::fqdn}\t${::hostname}",