From a57120eb6b3076ccffed40abfb36708de9e666c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Wed, 29 Dec 2021 19:56:53 +0100 Subject: Setup new site.pp. --- manifests/site.pp | 84 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 manifests/site.pp (limited to 'manifests/site.pp') diff --git a/manifests/site.pp b/manifests/site.pp new file mode 100644 index 0000000..430e3c6 --- /dev/null +++ b/manifests/site.pp @@ -0,0 +1,84 @@ +node 'gandalf.adrift.space' { + notify { 'anything': + message => 'Will this be shown', + } +} + +node 'hornquist.se' { + notify { 'anything': + message => 'Hello, World!', + } +} + +node 'busting.adrift.space' { + + file_line { 'hosts ourself': + ensure => present, + line => "::1\t${::fqdn}\t${facts['name']}", + path => '/etc/hosts', + } + + ensure_packages(['ruby']) + + class { 'puppet': + server => true, + # agent => false, + server_foreman => false, + # server_reports => 'puppetdb', + server_reports => 'store', + server_storeconfigs => false, + server_git_repo => true, + server_git_repo_path => '/var/lib/puppet.git', + server_external_nodes => '', + } + + # class { 'puppet::server::puppetdb': + # port => 8080, + # } + + # exec { 'puppetdb ssl-setup': + # creates => '/etc/puppetlabs/puppetdb/ssl/{ca,private,public}.pem' + # } + + class { 'puppetdb': + listen_address => '::', + disable_ssl => false, + } + # class { 'puppetdb::master::config': } + + # https://forge.puppet.com/modules/puppet/puppetboard/readme + # Configure Apache + class { 'apache': + default_vhost => false, + purge_configs => true, + } + + $wsgi = $facts['os']['family'] ? { + 'Debian' => { + package_name => 'libapache2-mod-wsgi-py3', + mod_path => '/usr/lib/apache2/modules/mod_wsgi.so', + }, + default => {} + } + + class { 'apache::mod::wsgi': + * => $wsgi, + } + + # Configure puppetboard + + class { 'puppetboard': + manage_git => true, + manage_virtualenv => true, + require => Class['puppetdb'], + puppetdb_port => 8080, + python_loglevel => 'debug', + } + + + class { 'puppetboard::apache::vhost': + vhost_name => $::fqdn, + port => 80, + } + +} -- cgit v1.2.3