Loading Puppetfile +2 −0 Original line number Diff line number Diff line Loading @@ -2,6 +2,8 @@ forge "https://forgeapi.puppet.com" metadata mod 'camptocamp-augeas' mod 'puppetlabs-mount_core' mod 'puppetlabs-apache' mod 'puppet-systemd' mod 'derdanne-nfs' Loading data/common.yaml +4 −12 Original line number Diff line number Diff line webapp::vhosts: webapp: priority: 1 priority: 10 webapp2: priority: 2 priority: 10 webapp3: priority: 3 priority: 10 proxy-shib: {} axess: {} bar: {} Loading @@ -23,20 +23,14 @@ webapp::vhosts: webproxy: {} localhost: {} webapp::mods: - alias - auth_basic - authn_core - authz_core - authz_host - authz_user - cgid - deflate - dir - env - fastcgi - filter - headers - mime - fcgid - negotiation - proxy - proxy_fcgi Loading @@ -44,8 +38,6 @@ webapp::mods: - rewrite - setenvif - shib2 - socache_shmcb - ssl - status - userdir - webauthldap No newline at end of file hiera.yaml +2 −2 Original line number Diff line number Diff line Loading @@ -6,5 +6,5 @@ defaults: # Used for any hierarchy level that omits these keys. data_hash: yaml_data # Use the built-in YAML backend. hierarchy: - name: 'common' path: 'common.yaml' - name: common path: common.yaml manifests/init.pp +17 −3 Original line number Diff line number Diff line Loading @@ -3,10 +3,9 @@ # @param vhosts - vhost data (from Hiera) # @param mods - modules to install (from Hiera) class webapp ( Array[apache::vhost] $vhosts, Hash $vhosts, Array[String] $mods, ) { Exec['apt_update'] -> Package<| |> file { '/usr/local/bin': ensure => directory, Loading Loading @@ -44,6 +43,19 @@ class webapp ( atboot => true, } package { [ 'php-cli', 'php-curl', 'php-fpm', 'php-json', 'php-mysql', 'php-opcache', ]: ensure => 'present' } class { 'apache': service_enable => false, service_ensure => false, Loading @@ -59,7 +71,9 @@ class webapp ( }, } create_resources(apache::mod, $mods) apache::mod { $mods: } create_resources(webapp::vhost, $vhosts) } Loading
Puppetfile +2 −0 Original line number Diff line number Diff line Loading @@ -2,6 +2,8 @@ forge "https://forgeapi.puppet.com" metadata mod 'camptocamp-augeas' mod 'puppetlabs-mount_core' mod 'puppetlabs-apache' mod 'puppet-systemd' mod 'derdanne-nfs' Loading
data/common.yaml +4 −12 Original line number Diff line number Diff line webapp::vhosts: webapp: priority: 1 priority: 10 webapp2: priority: 2 priority: 10 webapp3: priority: 3 priority: 10 proxy-shib: {} axess: {} bar: {} Loading @@ -23,20 +23,14 @@ webapp::vhosts: webproxy: {} localhost: {} webapp::mods: - alias - auth_basic - authn_core - authz_core - authz_host - authz_user - cgid - deflate - dir - env - fastcgi - filter - headers - mime - fcgid - negotiation - proxy - proxy_fcgi Loading @@ -44,8 +38,6 @@ webapp::mods: - rewrite - setenvif - shib2 - socache_shmcb - ssl - status - userdir - webauthldap No newline at end of file
hiera.yaml +2 −2 Original line number Diff line number Diff line Loading @@ -6,5 +6,5 @@ defaults: # Used for any hierarchy level that omits these keys. data_hash: yaml_data # Use the built-in YAML backend. hierarchy: - name: 'common' path: 'common.yaml' - name: common path: common.yaml
manifests/init.pp +17 −3 Original line number Diff line number Diff line Loading @@ -3,10 +3,9 @@ # @param vhosts - vhost data (from Hiera) # @param mods - modules to install (from Hiera) class webapp ( Array[apache::vhost] $vhosts, Hash $vhosts, Array[String] $mods, ) { Exec['apt_update'] -> Package<| |> file { '/usr/local/bin': ensure => directory, Loading Loading @@ -44,6 +43,19 @@ class webapp ( atboot => true, } package { [ 'php-cli', 'php-curl', 'php-fpm', 'php-json', 'php-mysql', 'php-opcache', ]: ensure => 'present' } class { 'apache': service_enable => false, service_ensure => false, Loading @@ -59,7 +71,9 @@ class webapp ( }, } create_resources(apache::mod, $mods) apache::mod { $mods: } create_resources(webapp::vhost, $vhosts) }