- set yum::versionlock to be only for redhat family - set puppet-agent require statement to use apt or yum - remove requirement of downloading puppet7-release-$dist.deb - create all paths in $base_path for vault certificate - set correct $PATH for update-ca-certificates - dynamically set debian release name - split packages to install from common.yaml to os-specific - create groups profile to manage local groups - change sysadmin to be a member of admins group - setup admins sudo rules
51 lines
1.6 KiB
Puppet
51 lines
1.6 KiB
Puppet
# This class manages the installation and configuration of Puppet 7
|
|
#
|
|
# Parameters:
|
|
# - $managed_repos: An array of additional repositories to manage (optional)
|
|
# - $mirror: The base URL of the repository mirror
|
|
# - $repo: The repository name
|
|
# - $release: The release name
|
|
#
|
|
# Dependencies:
|
|
# - Puppet facts: The class relies on certain facts about the target system,
|
|
# including the OS release, architecture, and distribution codename.
|
|
#
|
|
# Description:
|
|
# This class installs Puppet 7 on the target system by managing the repository
|
|
# configuration and installing the appropriate package. It also supports the
|
|
# management of additional repositories specified in the $managed_repos parameter.
|
|
# The class retrieves necessary information from Puppet facts, such as the OS
|
|
# release version, architecture, and distribution codename. It downloads the
|
|
# Puppet release deb file from the specified mirror and installs it using dpkg.
|
|
# Additionally, it configures the main Puppet repository using the apt::source resource.
|
|
#
|
|
# Example usage:
|
|
# class { 'profiles::apt::puppet7':
|
|
# managed_repos => ['extra-repo'],
|
|
# mirror => 'http://mirror.example.com',
|
|
# release => 'puppet7',
|
|
# repo => 'bullseye',
|
|
# }
|
|
class profiles::apt::puppet7 (
|
|
Array[String] $managed_repos,
|
|
String $mirror,
|
|
String $repo,
|
|
) {
|
|
|
|
$codename = $facts['os']['distro']['codename']
|
|
|
|
if 'puppet7' in $managed_repos {
|
|
|
|
# deb http://apt.puppet.com bullseye puppet7
|
|
apt::source { 'puppet7':
|
|
location => $mirror,
|
|
repos => $repo,
|
|
release => $codename,
|
|
include => {
|
|
'src' => false,
|
|
'deb' => true,
|
|
},
|
|
}
|
|
}
|
|
}
|