From 0e25f429d2c4721a9083589283e51375c0354d9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Thu, 30 Dec 2021 00:45:02 +0100 Subject: Common puppet setup. --- modules/profiles/manifests/common.pp | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 modules/profiles/manifests/common.pp (limited to 'modules/profiles') diff --git a/modules/profiles/manifests/common.pp b/modules/profiles/manifests/common.pp new file mode 100644 index 0000000..73c4bd1 --- /dev/null +++ b/modules/profiles/manifests/common.pp @@ -0,0 +1,28 @@ +class profiles::common { + + file_line { 'hosts ourself': + ensure => present, + line => "::1\t${::fqdn}\t${facts['name']}", + path => '/etc/hosts', + } + + # extlib__puppet_config contains our current settings. + # This saves whatever was passed in the --server flag + # to disk + ini_setting { 'Puppet Server': + ensure => present, + path => '/etc/puppetlabs/puppet/puppet.conf', + section => 'main', + setting => 'server', + indent_char => ' ', + indent_width => 4, + value => $facts['extlib__puppet_config']['main']['server'], + } + + # Manage puppet manually, instead of through theforeman/puppet, + # since they haven't bothered to document their module. + service { 'puppet': + ensure => running, + enable => true, + } +} -- cgit v1.2.3