promote develop to master #6
@ -38,8 +38,9 @@ profiles::puppet::g10k::cfg_path: '/etc/puppetlabs/r10k/r10k.yaml'
|
|||||||
profiles::puppet::g10k::environments_path: '/etc/puppetlabs/code/environments'
|
profiles::puppet::g10k::environments_path: '/etc/puppetlabs/code/environments'
|
||||||
profiles::puppet::g10k::default_environment: 'develop'
|
profiles::puppet::g10k::default_environment: 'develop'
|
||||||
profiles::puppet::puppetdb::puppetdb_host: prodinf01n04.main.unkin.net
|
profiles::puppet::puppetdb::puppetdb_host: prodinf01n04.main.unkin.net
|
||||||
|
profiles::puppet::puppetdb::postgres_host: prodinf01n05.main.unkin.net
|
||||||
puppetdb::master::config::create_puppet_service_resource: false
|
puppetdb::master::config::create_puppet_service_resource: false
|
||||||
puppetdb::master::config::puppetdb_host: "%{lookup('profiles::puppet::puppetdb::puppetdb_host')}"
|
#puppetdb::master::config::puppetdb_host: "%{lookup('profiles::puppet::puppetdb::puppetdb_host')}"
|
||||||
|
|
||||||
profiles::accounts::sysadmin::sshkeys:
|
profiles::accounts::sysadmin::sshkeys:
|
||||||
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDZ8SRLlPiDylBpdWR9LpvPg4fDVD+DZst4yRPFwMMhta4mnB1H9XuvZkptDhXywWQ7QIcqa2WbhCen0OQJCtwn3s7EYtacmF5MxmwBYocPoK2AArGuh6NA9rwTdLrPdzhZ+gwe88PAzRLNzjm0ZBR+mA9saMbPJdqpKp0AWeAM8QofRQAWuCzQg9i0Pn1KDMvVDRHCZof4pVlHSTyHNektq4ifovn0zhKC8jD/cYu95mc5ftBbORexpGiQWwQ3HZw1IBe0ZETB1qPIPwsoJpt3suvMrL6T2//fcIIUE3TcyJKb/yhztja4TZs5jT8370G/vhlT70He0YPxqHub8ZfBv0khlkY93VBWYpNGJwM1fVqlw7XbfBNdOuJivJac8eW317ZdiDnKkBTxapThpPG3et9ib1HoPGKRsd/fICzNz16h2R3tddSdihTFL+bmTCa6Lo+5t5uRuFjQvhSLSgO2/gRAprc3scYOB4pY/lxOFfq3pU2VvSJtRgLNEYMUYKk= ben@unkin.net
|
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDZ8SRLlPiDylBpdWR9LpvPg4fDVD+DZst4yRPFwMMhta4mnB1H9XuvZkptDhXywWQ7QIcqa2WbhCen0OQJCtwn3s7EYtacmF5MxmwBYocPoK2AArGuh6NA9rwTdLrPdzhZ+gwe88PAzRLNzjm0ZBR+mA9saMbPJdqpKp0AWeAM8QofRQAWuCzQg9i0Pn1KDMvVDRHCZof4pVlHSTyHNektq4ifovn0zhKC8jD/cYu95mc5ftBbORexpGiQWwQ3HZw1IBe0ZETB1qPIPwsoJpt3suvMrL6T2//fcIIUE3TcyJKb/yhztja4TZs5jT8370G/vhlT70He0YPxqHub8ZfBv0khlkY93VBWYpNGJwM1fVqlw7XbfBNdOuJivJac8eW317ZdiDnKkBTxapThpPG3et9ib1HoPGKRsd/fICzNz16h2R3tddSdihTFL+bmTCa6Lo+5t5uRuFjQvhSLSgO2/gRAprc3scYOB4pY/lxOFfq3pU2VvSJtRgLNEYMUYKk= ben@unkin.net
|
||||||
@ -58,3 +59,7 @@ profiles::base::hosts::additional_hosts:
|
|||||||
aliases:
|
aliases:
|
||||||
- prodinf01n04
|
- prodinf01n04
|
||||||
- puppetdb
|
- puppetdb
|
||||||
|
- ip: 198.18.17.5
|
||||||
|
hostname: prodinf01n05.main.unkin.net
|
||||||
|
aliases:
|
||||||
|
- prodinf01n05
|
||||||
|
|||||||
@ -1,39 +0,0 @@
|
|||||||
# profiles::puppet::puppetdb
|
|
||||||
#
|
|
||||||
# This class manages the installation and configuration of PuppetDB
|
|
||||||
# and its underlying PostgreSQL database on a single node.
|
|
||||||
#
|
|
||||||
# It makes use of the puppetlabs-puppetdb module to manage both the
|
|
||||||
# PuppetDB service and its PostgreSQL backend.
|
|
||||||
#
|
|
||||||
class profiles::puppet::puppetdb(
|
|
||||||
String $puppetdb_host,
|
|
||||||
String $listen_address = $facts['networking']['ip'],
|
|
||||||
) {
|
|
||||||
|
|
||||||
# disable the postgresql dnf module for el8+
|
|
||||||
if $facts['os']['family'] == 'RedHat' and $facts['os']['release']['major'] >= '8' {
|
|
||||||
# based on https://github.com/puppetlabs/puppetlabs-postgresql/blob/main/manifests/dnfmodule.pp
|
|
||||||
package { 'postgresql dnf module':
|
|
||||||
ensure => 'disabled',
|
|
||||||
name => 'postgresql',
|
|
||||||
provider => 'dnfmodule',
|
|
||||||
before => Class['puppetdb::database::postgresql'],
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# Install and configure PostgreSQL for PuppetDB
|
|
||||||
class { 'puppetdb::database::postgresql':
|
|
||||||
listen_addresses => $listen_address,
|
|
||||||
postgresql_ssl_on => false,
|
|
||||||
postgres_version => '15',
|
|
||||||
puppetdb_server => $puppetdb_host,
|
|
||||||
before => Class['puppetdb::server'],
|
|
||||||
}
|
|
||||||
|
|
||||||
class { 'puppetdb::server':
|
|
||||||
database_host => $listen_address,
|
|
||||||
postgresql_ssl_on => false,
|
|
||||||
manage_firewall => false,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
16
site/profiles/manifests/puppet/puppetdb_api.pp
Normal file
16
site/profiles/manifests/puppet/puppetdb_api.pp
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
# configure the puppetdb api service
|
||||||
|
class profiles::puppet::puppetdb_api (
|
||||||
|
String $postgres_host = lookup('profiles::puppet::puppetdb::postgres_host'),
|
||||||
|
String $listen_address = $facts['networking']['ip'],
|
||||||
|
) {
|
||||||
|
|
||||||
|
class { 'puppetdb::server':
|
||||||
|
database_host => $postgres_host,
|
||||||
|
manage_firewall => false,
|
||||||
|
ssl_listen_address => $listen_address,
|
||||||
|
listen_address => $listen_address,
|
||||||
|
}
|
||||||
|
|
||||||
|
contain ::puppetdb::server
|
||||||
|
|
||||||
|
}
|
||||||
27
site/profiles/manifests/puppet/puppetdb_sql.pp
Normal file
27
site/profiles/manifests/puppet/puppetdb_sql.pp
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
# configure the puppetdb sql service
|
||||||
|
class profiles::puppet::puppetdb_sql (
|
||||||
|
String $puppetdb_host = lookup('profiles::puppet::puppetdb::puppetdb_host'),
|
||||||
|
String $listen_address = $facts['networking']['ip'],
|
||||||
|
) {
|
||||||
|
|
||||||
|
# disable the postgresql dnf module for el8+
|
||||||
|
if $facts['os']['family'] == 'RedHat' and $facts['os']['release']['major'] >= '8' {
|
||||||
|
# based on https://github.com/puppetlabs/puppetlabs-postgresql/blob/main/manifests/dnfmodule.pp
|
||||||
|
package { 'postgresql dnf module':
|
||||||
|
ensure => 'disabled',
|
||||||
|
name => 'postgresql',
|
||||||
|
provider => 'dnfmodule',
|
||||||
|
before => Class['puppetdb::database::postgresql'],
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# Install and configure PostgreSQL for PuppetDB
|
||||||
|
class { 'puppetdb::database::postgresql':
|
||||||
|
listen_addresses => $listen_address,
|
||||||
|
postgres_version => '15',
|
||||||
|
puppetdb_server => $puppetdb_host,
|
||||||
|
}
|
||||||
|
|
||||||
|
contain ::puppetdb::database::postgresql
|
||||||
|
|
||||||
|
}
|
||||||
@ -31,16 +31,17 @@ class profiles::puppet::puppetmaster (
|
|||||||
include profiles::puppet::autosign
|
include profiles::puppet::autosign
|
||||||
|
|
||||||
class { 'puppetdb::master::config':
|
class { 'puppetdb::master::config':
|
||||||
puppetdb_server => $puppetdb_host,
|
puppetdb_server => $puppetdb_host,
|
||||||
|
manage_storeconfigs => false,
|
||||||
}
|
}
|
||||||
|
|
||||||
class { 'profiles::puppet::server':
|
class { 'profiles::puppet::server':
|
||||||
vardir => '/opt/puppetlabs/server/data/puppetserver',
|
vardir => '/opt/puppetlabs/server/data/puppetserver',
|
||||||
logdir => '/var/log/puppetlabs/puppetserver',
|
logdir => '/var/log/puppetlabs/puppetserver',
|
||||||
rundir => '/var/run/puppetlabs/puppetserver',
|
rundir => '/var/run/puppetlabs/puppetserver',
|
||||||
pidfile => '/var/run/puppetlabs/puppetserver/puppetserver.pid',
|
pidfile => '/var/run/puppetlabs/puppetserver/puppetserver.pid',
|
||||||
codedir => '/etc/puppetlabs/code',
|
codedir => '/etc/puppetlabs/code',
|
||||||
dns_alt_names => [
|
dns_alt_names => [
|
||||||
'prodinf01n01.main.unkin.net',
|
'prodinf01n01.main.unkin.net',
|
||||||
'puppet.main.unkin.net',
|
'puppet.main.unkin.net',
|
||||||
'puppetca.main.unkin.net',
|
'puppetca.main.unkin.net',
|
||||||
@ -49,11 +50,13 @@ class profiles::puppet::puppetmaster (
|
|||||||
'puppetca',
|
'puppetca',
|
||||||
'puppetmaster',
|
'puppetmaster',
|
||||||
],
|
],
|
||||||
server => 'prodinf01n01.main.unkin.net',
|
server => 'prodinf01n01.main.unkin.net',
|
||||||
node_terminus => 'exec',
|
node_terminus => 'exec',
|
||||||
external_nodes => '/opt/puppetlabs/bin/enc',
|
external_nodes => '/opt/puppetlabs/bin/enc',
|
||||||
autosign => '/etc/puppetlabs/puppet/autosign.conf',
|
autosign => '/etc/puppetlabs/puppet/autosign.conf',
|
||||||
default_manifest => '/etc/puppetlabs/code/environments/develop/manifests',
|
default_manifest => '/etc/puppetlabs/code/environments/develop/manifests',
|
||||||
default_environment => 'develop',
|
default_environment => 'develop',
|
||||||
|
storeconfigs => true,
|
||||||
|
storeconfigs_backend => 'puppetdb',
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -27,6 +27,8 @@ class profiles::puppet::server (
|
|||||||
String $autosign,
|
String $autosign,
|
||||||
String $default_manifest,
|
String $default_manifest,
|
||||||
String $default_environment,
|
String $default_environment,
|
||||||
|
Boolean $storeconfigs,
|
||||||
|
String $storeconfigs_backend,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
file { '/etc/puppetlabs/puppet/puppet.conf':
|
file { '/etc/puppetlabs/puppet/puppet.conf':
|
||||||
@ -35,18 +37,20 @@ class profiles::puppet::server (
|
|||||||
group => 'root',
|
group => 'root',
|
||||||
mode => '0644',
|
mode => '0644',
|
||||||
content => epp('profiles/puppet/server/puppet.conf.epp', {
|
content => epp('profiles/puppet/server/puppet.conf.epp', {
|
||||||
'vardir' => $vardir,
|
'vardir' => $vardir,
|
||||||
'logdir' => $logdir,
|
'logdir' => $logdir,
|
||||||
'rundir' => $rundir,
|
'rundir' => $rundir,
|
||||||
'pidfile' => $pidfile,
|
'pidfile' => $pidfile,
|
||||||
'codedir' => $codedir,
|
'codedir' => $codedir,
|
||||||
'dns_alt_names' => join($dns_alt_names, ','),
|
'dns_alt_names' => join($dns_alt_names, ','),
|
||||||
'server' => $server,
|
'server' => $server,
|
||||||
'node_terminus' => $node_terminus,
|
'node_terminus' => $node_terminus,
|
||||||
'external_nodes' => $external_nodes,
|
'external_nodes' => $external_nodes,
|
||||||
'autosign' => $autosign,
|
'autosign' => $autosign,
|
||||||
'default_manifest' => $default_manifest,
|
'default_manifest' => $default_manifest,
|
||||||
'default_environment' => $default_environment,
|
'default_environment' => $default_environment,
|
||||||
|
'storeconfigs' => $storeconfigs,
|
||||||
|
'storeconfigs_backend' => $storeconfigs_backend,
|
||||||
}),
|
}),
|
||||||
notify => Service['puppetserver'],
|
notify => Service['puppetserver'],
|
||||||
}
|
}
|
||||||
|
|||||||
@ -17,3 +17,5 @@ external_nodes = <%= $external_nodes %>
|
|||||||
autosign = <%= $autosign %>
|
autosign = <%= $autosign %>
|
||||||
default_manifest = <%= $default_manifest %>
|
default_manifest = <%= $default_manifest %>
|
||||||
default_environment = <%= $default_environment %>
|
default_environment = <%= $default_environment %>
|
||||||
|
storeconfigs = <%= $storeconfigs %>
|
||||||
|
storeconfigs_backend = <%= $storeconfigs_backend %>
|
||||||
|
|||||||
6
site/roles/manifests/puppet/puppetdb_api.pp
Normal file
6
site/roles/manifests/puppet/puppetdb_api.pp
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
# a role to deploy the puppetdb api service
|
||||||
|
class roles::puppet::puppetdb_api {
|
||||||
|
include profiles::defaults
|
||||||
|
include profiles::base
|
||||||
|
include profiles::puppet::puppetdb_api
|
||||||
|
}
|
||||||
6
site/roles/manifests/puppet/puppetdb_sql.pp
Normal file
6
site/roles/manifests/puppet/puppetdb_sql.pp
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
# a role to deploy the puppetdb postgresql service
|
||||||
|
class roles::puppet::puppetdb_sql {
|
||||||
|
include profiles::defaults
|
||||||
|
include profiles::base
|
||||||
|
include profiles::puppet::puppetdb_sql
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user