Merge branch 'develop' into neoloc/prometheus
This commit is contained in:
commit
663b10e5a5
@ -1,7 +1,10 @@
|
|||||||
---
|
---
|
||||||
|
profiles::ntp::client::ntp_role: 'roles::infra::ntp::server'
|
||||||
profiles::ntp::client::peers:
|
profiles::ntp::client::peers:
|
||||||
- ntp01.main.unkin.net
|
- 0.pool.ntp.org
|
||||||
- ntp02.main.unkin.net
|
- 1.pool.ntp.org
|
||||||
|
- 2.pool.ntp.org
|
||||||
|
- 3.pool.ntp.org
|
||||||
|
|
||||||
profiles::base::puppet_servers:
|
profiles::base::puppet_servers:
|
||||||
- 'prodinf01n01.main.unkin.net'
|
- 'prodinf01n01.main.unkin.net'
|
||||||
|
|||||||
1
hieradata/roles/apps.yaml
Normal file
1
hieradata/roles/apps.yaml
Normal file
@ -0,0 +1 @@
|
|||||||
|
---
|
||||||
@ -18,6 +18,13 @@ profiles::dns::resolver::zones:
|
|||||||
forwarders:
|
forwarders:
|
||||||
- 10.10.8.1
|
- 10.10.8.1
|
||||||
forward: 'only'
|
forward: 'only'
|
||||||
|
17.18.198.in-addr.arpa-forward:
|
||||||
|
domain: '17.18.198.in-addr.arpa'
|
||||||
|
zone_type: 'forward'
|
||||||
|
forwarders:
|
||||||
|
- 198.18.17.23
|
||||||
|
- 198.18.17.24
|
||||||
|
forward: 'only'
|
||||||
|
|
||||||
profiles::dns::resolver::views:
|
profiles::dns::resolver::views:
|
||||||
openforwarder:
|
openforwarder:
|
||||||
@ -25,5 +32,6 @@ profiles::dns::resolver::views:
|
|||||||
zones:
|
zones:
|
||||||
- main.unkin.net-forward
|
- main.unkin.net-forward
|
||||||
- prod.unkin.net-forward
|
- prod.unkin.net-forward
|
||||||
|
- 17.18.198.in-addr.arpa-forward
|
||||||
match_clients:
|
match_clients:
|
||||||
- acl-main.unkin.net
|
- acl-main.unkin.net
|
||||||
|
|||||||
@ -9,8 +9,6 @@ profiles::puppet::autosign::domains:
|
|||||||
# - 'somenode.main.unkin.net'
|
# - 'somenode.main.unkin.net'
|
||||||
|
|
||||||
profiles::puppet::enc::repo: https://git.unkin.net/unkinben/puppet-enc.git
|
profiles::puppet::enc::repo: https://git.unkin.net/unkinben/puppet-enc.git
|
||||||
profiles::puppet::enc::release: '0.7'
|
|
||||||
profiles::puppet::enc::force: true
|
|
||||||
profiles::puppet::r10k::r10k_repo: https://git.unkin.net/unkinben/puppet-r10k.git
|
profiles::puppet::r10k::r10k_repo: https://git.unkin.net/unkinben/puppet-r10k.git
|
||||||
profiles::puppet::g10k::bin_path: '/opt/puppetlabs/bin/g10k'
|
profiles::puppet::g10k::bin_path: '/opt/puppetlabs/bin/g10k'
|
||||||
profiles::puppet::g10k::cfg_path: '/etc/puppetlabs/r10k/r10k.yaml'
|
profiles::puppet::g10k::cfg_path: '/etc/puppetlabs/r10k/r10k.yaml'
|
||||||
@ -2,6 +2,10 @@
|
|||||||
# use exported resources from profiles::ntp::server if they are available
|
# use exported resources from profiles::ntp::server if they are available
|
||||||
class profiles::ntp::client (
|
class profiles::ntp::client (
|
||||||
Array $peers,
|
Array $peers,
|
||||||
|
Variant[
|
||||||
|
String,
|
||||||
|
Undef
|
||||||
|
] $ntp_role = undef,
|
||||||
Boolean $wait_enable = true,
|
Boolean $wait_enable = true,
|
||||||
Enum[
|
Enum[
|
||||||
'running',
|
'running',
|
||||||
@ -14,16 +18,23 @@ class profiles::ntp::client (
|
|||||||
# through the profiles::ntp::server class.
|
# through the profiles::ntp::server class.
|
||||||
if $client_only {
|
if $client_only {
|
||||||
|
|
||||||
|
# if ntp_role is set, find all hosts matching that enc_role
|
||||||
|
if $ntp_role == undef {
|
||||||
|
$ntpserver_array = $peers
|
||||||
|
}else{
|
||||||
|
$ntpserver_array = query_nodes("enc_role='${ntp_role}'", 'networking.fqdn')
|
||||||
|
}
|
||||||
|
|
||||||
# Define the client configuration based on OS family
|
# Define the client configuration based on OS family
|
||||||
if $facts['os']['family'] == 'RedHat' {
|
if $facts['os']['family'] == 'RedHat' {
|
||||||
class { 'chrony':
|
class { 'chrony':
|
||||||
servers => $peers,
|
servers => $ntpserver_array,
|
||||||
wait_enable => $wait_enable,
|
wait_enable => $wait_enable,
|
||||||
wait_ensure => $wait_ensure,
|
wait_ensure => $wait_ensure,
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
class { 'chrony':
|
class { 'chrony':
|
||||||
servers => $peers,
|
servers => $ntpserver_array,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,7 +19,7 @@ class profiles::ntp::server (
|
|||||||
|
|
||||||
# check the enc_role has been set, it can take two puppet runs to do this
|
# check the enc_role has been set, it can take two puppet runs to do this
|
||||||
# TODO: change away from external fact
|
# TODO: change away from external fact
|
||||||
if $facts['enc_role'] == 'roles::infra::ntpserver' {
|
if $facts['enc_role'] == 'roles::infra::ntp::server' {
|
||||||
|
|
||||||
# define the server
|
# define the server
|
||||||
if $facts['os']['family'] == 'RedHat' {
|
if $facts['os']['family'] == 'RedHat' {
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
# a role to deploy a ntp server
|
# a role to deploy a ntp server
|
||||||
class roles::infra::ntpserver {
|
class roles::infra::ntp::server {
|
||||||
include profiles::defaults
|
include profiles::defaults
|
||||||
include profiles::base
|
include profiles::base
|
||||||
include profiles::ntp::server
|
include profiles::ntp::server
|
||||||
@ -1,6 +1,6 @@
|
|||||||
# a role to deploy the puppetmaster
|
# a role to deploy the puppetmaster
|
||||||
# work in progress
|
# work in progress
|
||||||
class roles::puppet::puppetmaster {
|
class roles::infra::puppet::master {
|
||||||
include profiles::defaults
|
include profiles::defaults
|
||||||
include profiles::base
|
include profiles::base
|
||||||
include profiles::puppet::puppetmaster
|
include profiles::puppet::puppetmaster
|
||||||
@ -1,5 +1,5 @@
|
|||||||
# a role to deploy the puppetboard
|
# a role to deploy the puppetboard
|
||||||
class roles::puppet::puppetboard {
|
class roles::infra::puppetboard::server {
|
||||||
include profiles::defaults
|
include profiles::defaults
|
||||||
include profiles::base
|
include profiles::base
|
||||||
include profiles::puppet::puppetboard
|
include profiles::puppet::puppetboard
|
||||||
@ -1,5 +1,5 @@
|
|||||||
# a role to deploy the puppetdb api service
|
# a role to deploy the puppetdb api service
|
||||||
class roles::puppet::puppetdb_api {
|
class roles::infra::puppetdb::api {
|
||||||
include profiles::defaults
|
include profiles::defaults
|
||||||
include profiles::base
|
include profiles::base
|
||||||
include profiles::puppet::puppetdb_api
|
include profiles::puppet::puppetdb_api
|
||||||
@ -1,5 +1,5 @@
|
|||||||
# a role to deploy the puppetdb postgresql service
|
# a role to deploy the puppetdb postgresql service
|
||||||
class roles::puppet::puppetdb_sql {
|
class roles::infra::puppetdb::sql {
|
||||||
include profiles::defaults
|
include profiles::defaults
|
||||||
include profiles::base
|
include profiles::base
|
||||||
include profiles::puppet::puppetdb_sql
|
include profiles::puppet::puppetdb_sql
|
||||||
@ -1,5 +1,5 @@
|
|||||||
# a role to deploy a packagerepo
|
# a role to deploy a packagerepo
|
||||||
class roles::infra::packagerepo {
|
class roles::infra::reposync::syncer {
|
||||||
include profiles::defaults
|
include profiles::defaults
|
||||||
include profiles::base
|
include profiles::base
|
||||||
include profiles::base::datavol
|
include profiles::base::datavol
|
||||||
@ -1,7 +0,0 @@
|
|||||||
# a role to deploy the puppetdb
|
|
||||||
# work in progress
|
|
||||||
class roles::puppet::puppetdb {
|
|
||||||
include profiles::defaults
|
|
||||||
include profiles::base
|
|
||||||
include profiles::puppet::puppetdb
|
|
||||||
}
|
|
||||||
Loading…
Reference in New Issue
Block a user