summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2021-12-30 00:45:02 +0100
committerHugo Hörnquist <hugo@lysator.liu.se>2021-12-30 00:45:02 +0100
commit0e25f429d2c4721a9083589283e51375c0354d9d (patch)
treeb349fce29908d9e8b1918f267f2349ce6b7ec347
parentMove cgit setup to module. (diff)
downloadwebdav_server-0e25f429d2c4721a9083589283e51375c0354d9d.tar.gz
webdav_server-0e25f429d2c4721a9083589283e51375c0354d9d.tar.xz
Common puppet setup.
-rw-r--r--manifests/site.pp8
-rw-r--r--modules/profiles/manifests/common.pp28
2 files changed, 31 insertions, 5 deletions
diff --git a/manifests/site.pp b/manifests/site.pp
index 34ed9a7..09cbca3 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -1,10 +1,6 @@
node 'busting.adrift.space' {
- file_line { 'hosts ourself':
- ensure => present,
- line => "::1\t${::fqdn}\t${facts['name']}",
- path => '/etc/hosts',
- }
+ include ::profiles::common
class { 'ssh':
permit_root_login => true,
@@ -79,6 +75,7 @@ node 'gandalf.adrift.space' {
addr => '3',
}
+ include ::profiles::common
include ::losetup
include ::profiles::xmonad
include ::profiles::workstation
@@ -138,6 +135,7 @@ node 'gandalf.adrift.space' {
node 'hornquist.se' {
+ include ::profiles::common
include ::profiles::firewall
ensure_packages([
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,
+ }
+}