promote develop to master #6
@ -30,6 +30,12 @@ lookup_options:
|
|||||||
haproxy::backend:
|
haproxy::backend:
|
||||||
merge:
|
merge:
|
||||||
strategy: deep
|
strategy: deep
|
||||||
|
sudo::configs:
|
||||||
|
merge:
|
||||||
|
strategy: deep
|
||||||
|
profiles::base::groups::local:
|
||||||
|
merge:
|
||||||
|
strategy: deep
|
||||||
|
|
||||||
facts_path: '/opt/puppetlabs/facter/facts.d'
|
facts_path: '/opt/puppetlabs/facter/facts.d'
|
||||||
|
|
||||||
@ -59,7 +65,6 @@ profiles::packages::install:
|
|||||||
- iotop
|
- iotop
|
||||||
- jq
|
- jq
|
||||||
- lz4
|
- lz4
|
||||||
- lzo
|
|
||||||
- mtr
|
- mtr
|
||||||
- ncdu
|
- ncdu
|
||||||
- neovim
|
- neovim
|
||||||
@ -79,7 +84,6 @@ profiles::packages::install:
|
|||||||
- vim
|
- vim
|
||||||
- vnstat
|
- vnstat
|
||||||
- wget
|
- wget
|
||||||
- xz
|
|
||||||
- zsh
|
- zsh
|
||||||
- zstd
|
- zstd
|
||||||
|
|
||||||
@ -111,6 +115,19 @@ profiles::puppet::client::usecacheonfailure: false
|
|||||||
prometheus::node_exporter::export_scrape_job: true
|
prometheus::node_exporter::export_scrape_job: true
|
||||||
prometheus::systemd_exporter::export_scrape_job: true
|
prometheus::systemd_exporter::export_scrape_job: true
|
||||||
|
|
||||||
|
profiles::base::groups::local:
|
||||||
|
admins:
|
||||||
|
ensure: present
|
||||||
|
gid: 10000
|
||||||
|
allowdupe: false
|
||||||
|
forcelocal: true
|
||||||
|
|
||||||
|
sudo::configs:
|
||||||
|
admins:
|
||||||
|
priority: 10
|
||||||
|
content: |
|
||||||
|
%admins ALL=(ALL) NOPASSWD: ALL
|
||||||
|
|
||||||
profiles::accounts::sysadmin::sshkeys:
|
profiles::accounts::sysadmin::sshkeys:
|
||||||
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDZ8SRLlPiDylBpdWR9LpvPg4fDVD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iles::yum::ovirt::baseurl: https://repos.main.unkin.net/centos
|
|||||||
profiles::firewall::firewalld::ensure_package: 'absent'
|
profiles::firewall::firewalld::ensure_package: 'absent'
|
||||||
profiles::firewall::firewalld::ensure_service: 'stopped'
|
profiles::firewall::firewalld::ensure_service: 'stopped'
|
||||||
profiles::firewall::firewalld::enable_service: false
|
profiles::firewall::firewalld::enable_service: false
|
||||||
|
|
||||||
profiles::puppet::agent::puppet_version: '7.26.0'
|
profiles::puppet::agent::puppet_version: '7.26.0'
|
||||||
|
|
||||||
|
profiles::packages::install:
|
||||||
|
- lzo
|
||||||
|
- xz
|
||||||
|
|||||||
@ -1,7 +1,12 @@
|
|||||||
# hieradata/os/debian/all_releases.yaml
|
# hieradata/os/debian/all_releases.yaml
|
||||||
---
|
---
|
||||||
profiles::apt::base::mirrorurl: http://debian.mirror.digitalpacific.com.au/debian
|
profiles::apt::base::mirrorurl: http://repos.main.unkin.net/debian
|
||||||
profiles::apt::base::secureurl: http://security.debian.org/debian-security
|
profiles::apt::base::secureurl: http://security.debian.org/debian-security
|
||||||
profiles::apt::puppet7::mirror: http://apt.puppetlabs.com
|
profiles::apt::puppet7::mirror: http://apt.puppetlabs.com
|
||||||
profiles::apt::puppet7::repo: puppet7
|
profiles::apt::puppet7::repo: puppet7
|
||||||
profiles::apt::puppet7::dist: bullseye
|
profiles::pki::vaultca::ca_cert-path: /usr/local/share/ca-certificates/
|
||||||
|
|
||||||
|
profiles::packages::install:
|
||||||
|
- lzop
|
||||||
|
- python3.11-venv
|
||||||
|
- xz-utils
|
||||||
|
|||||||
@ -7,9 +7,10 @@ class profiles::accounts::sysadmin(
|
|||||||
username => 'sysadmin',
|
username => 'sysadmin',
|
||||||
uid => 1000,
|
uid => 1000,
|
||||||
gid => 1000,
|
gid => 1000,
|
||||||
groups => ['adm', 'wheel', 'systemd-journal'],
|
groups => ['adm', 'admins', 'systemd-journal'],
|
||||||
sshkeys => $sshkeys,
|
sshkeys => $sshkeys,
|
||||||
sudo_rules => ['sysadmin ALL=(ALL) NOPASSWD:ALL'],
|
sudo_rules => ['sysadmin ALL=(ALL) NOPASSWD:ALL'],
|
||||||
password => $password,
|
password => $password,
|
||||||
|
require => Group['admins'],
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -30,27 +30,17 @@ class profiles::apt::puppet7 (
|
|||||||
Array[String] $managed_repos,
|
Array[String] $managed_repos,
|
||||||
String $mirror,
|
String $mirror,
|
||||||
String $repo,
|
String $repo,
|
||||||
String $dist,
|
|
||||||
) {
|
) {
|
||||||
|
|
||||||
$codename = $facts['os']['distro']['codename']
|
$codename = $facts['os']['distro']['codename']
|
||||||
|
|
||||||
if 'puppet7' in $managed_repos {
|
if 'puppet7' in $managed_repos {
|
||||||
$puppet_source = "${mirror}/${repo}-release-${dist}.deb"
|
|
||||||
|
|
||||||
# Install the puppet release using dpkg
|
|
||||||
package { "${repo}-${dist}":
|
|
||||||
ensure => installed,
|
|
||||||
name => "${repo}-release",
|
|
||||||
provider => dpkg,
|
|
||||||
source => $puppet_source,
|
|
||||||
}
|
|
||||||
|
|
||||||
# deb http://apt.puppet.com bullseye puppet7
|
# deb http://apt.puppet.com bullseye puppet7
|
||||||
apt::source { 'puppet7':
|
apt::source { 'puppet7':
|
||||||
location => $mirror,
|
location => $mirror,
|
||||||
repos => $repo,
|
repos => $repo,
|
||||||
release => $dist,
|
release => $codename,
|
||||||
include => {
|
include => {
|
||||||
'src' => false,
|
'src' => false,
|
||||||
'deb' => true,
|
'deb' => true,
|
||||||
|
|||||||
@ -34,6 +34,7 @@ class profiles::base (
|
|||||||
include profiles::base::motd
|
include profiles::base::motd
|
||||||
include profiles::base::scripts
|
include profiles::base::scripts
|
||||||
include profiles::base::hosts
|
include profiles::base::hosts
|
||||||
|
include profiles::base::groups
|
||||||
include profiles::accounts::sysadmin
|
include profiles::accounts::sysadmin
|
||||||
include profiles::ntp::client
|
include profiles::ntp::client
|
||||||
include profiles::dns::base
|
include profiles::dns::base
|
||||||
|
|||||||
12
site/profiles/manifests/base/groups.pp
Normal file
12
site/profiles/manifests/base/groups.pp
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
# profiles::base::groups
|
||||||
|
# simple group management
|
||||||
|
class profiles::base::groups (
|
||||||
|
Hash $local = {},
|
||||||
|
) {
|
||||||
|
$local.each |$group, $data| {
|
||||||
|
group { $group:
|
||||||
|
name => $group,
|
||||||
|
* => $data,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -23,11 +23,25 @@ class profiles::pki::vault (
|
|||||||
$alt_names_file = "${base_path}/alt_names"
|
$alt_names_file = "${base_path}/alt_names"
|
||||||
|
|
||||||
# ensure the base directory exists
|
# ensure the base directory exists
|
||||||
|
file { '/etc/pki':
|
||||||
|
ensure => directory,
|
||||||
|
owner => 'root',
|
||||||
|
group => 'root',
|
||||||
|
mode => '0755',
|
||||||
|
}
|
||||||
|
file { '/etc/pki/tls':
|
||||||
|
ensure => directory,
|
||||||
|
owner => 'root',
|
||||||
|
group => 'root',
|
||||||
|
mode => '0755',
|
||||||
|
require => File['/etc/pki']
|
||||||
|
}
|
||||||
file { $base_path:
|
file { $base_path:
|
||||||
ensure => directory,
|
ensure => directory,
|
||||||
owner => 'root',
|
owner => 'root',
|
||||||
group => 'root',
|
group => 'root',
|
||||||
mode => '0755',
|
mode => '0755',
|
||||||
|
require => File['/etc/pki/tls']
|
||||||
}
|
}
|
||||||
|
|
||||||
# alt_names_file contents
|
# alt_names_file contents
|
||||||
@ -40,6 +54,7 @@ class profiles::pki::vault (
|
|||||||
group => 'root',
|
group => 'root',
|
||||||
mode => '0644',
|
mode => '0644',
|
||||||
content => join($alt_names_content, "\n"),
|
content => join($alt_names_content, "\n"),
|
||||||
|
require => File[$base_path]
|
||||||
}
|
}
|
||||||
|
|
||||||
# compare the sorted arrays of altnames from disk (fact) vs what is intended (this run)
|
# compare the sorted arrays of altnames from disk (fact) vs what is intended (this run)
|
||||||
|
|||||||
@ -30,7 +30,7 @@ class profiles::pki::vaultca {
|
|||||||
# Execute the system command to update the CA trust store
|
# Execute the system command to update the CA trust store
|
||||||
exec { 'update_ca_trust_store':
|
exec { 'update_ca_trust_store':
|
||||||
command => $update_ca_cert_command,
|
command => $update_ca_cert_command,
|
||||||
path => ['/bin', '/usr/bin'],
|
path => ['/bin', '/usr/bin', 'sbin', '/usr/sbin'],
|
||||||
refreshonly => true,
|
refreshonly => true,
|
||||||
require => File[$ca_cert_target_path],
|
require => File[$ca_cert_target_path],
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,12 +4,6 @@ class profiles::puppet::agent (
|
|||||||
String $puppet_version = 'latest',
|
String $puppet_version = 'latest',
|
||||||
) {
|
) {
|
||||||
|
|
||||||
# Ensure the puppet-agent package is installed and locked to a specific version
|
|
||||||
package { 'puppet-agent':
|
|
||||||
ensure => $puppet_version,
|
|
||||||
require => Class['profiles::yum::puppet7'],
|
|
||||||
}
|
|
||||||
|
|
||||||
# if puppet-version is anything other than latest, set a versionlock
|
# if puppet-version is anything other than latest, set a versionlock
|
||||||
$puppet_versionlock_ensure = $puppet_version ? {
|
$puppet_versionlock_ensure = $puppet_version ? {
|
||||||
'latest' => 'absent',
|
'latest' => 'absent',
|
||||||
@ -19,10 +13,30 @@ class profiles::puppet::agent (
|
|||||||
'latest' => undef,
|
'latest' => undef,
|
||||||
default => $puppet_version,
|
default => $puppet_version,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case $facts['os']['family'] {
|
||||||
|
'RedHat': {
|
||||||
|
# Ensure the puppet-agent package is installed and locked to a specific version
|
||||||
|
package { 'puppet-agent':
|
||||||
|
ensure => $puppet_version,
|
||||||
|
require => Class['profiles::yum::puppet7'],
|
||||||
|
}
|
||||||
|
|
||||||
|
# versionlock puppet-agent
|
||||||
yum::versionlock{'puppet-agent':
|
yum::versionlock{'puppet-agent':
|
||||||
ensure => $puppet_versionlock_ensure,
|
ensure => $puppet_versionlock_ensure,
|
||||||
version => $puppet_versionlock_version,
|
version => $puppet_versionlock_version,
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
'Debian': {
|
||||||
|
# Ensure the puppet-agent package is installed and locked to a specific version
|
||||||
|
package { 'puppet-agent':
|
||||||
|
ensure => $puppet_version,
|
||||||
|
require => Class['profiles::apt::puppet7'],
|
||||||
|
}
|
||||||
|
}
|
||||||
|
default: {}
|
||||||
|
}
|
||||||
|
|
||||||
# Ensure the puppet service is running
|
# Ensure the puppet service is running
|
||||||
service { 'puppet':
|
service { 'puppet':
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user