- update the sudo class from an include to a definition
- set the secure_path variable to include /usr/local/{bin,sbin}
43 lines
984 B
Puppet
43 lines
984 B
Puppet
# this is the base class, which will be used by all servers
|
|
class profiles::base (
|
|
Array $ntp_servers,
|
|
) {
|
|
class { 'chrony':
|
|
servers => $ntp_servers,
|
|
}
|
|
case $facts['os']['family'] {
|
|
'RedHat': {
|
|
include profiles::yum::global
|
|
}
|
|
'Debian': {
|
|
include profiles::apt::global
|
|
}
|
|
default: {
|
|
fail("Unsupported OS family ${facts['os']['family']}")
|
|
}
|
|
}
|
|
|
|
# include the base packages profile
|
|
class { 'profiles::base::packages':
|
|
packages => hiera('profiles::base::packages::common'),
|
|
ensure => 'installed',
|
|
}
|
|
|
|
# include the python class
|
|
class { 'python':
|
|
manage_python_package => true,
|
|
manage_venv_package => true,
|
|
manage_pip_package => true,
|
|
use_epel => false,
|
|
}
|
|
|
|
# all hosts will have sudo applied
|
|
class { 'sudo':
|
|
secure_path => '/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/opt/puppetlabs/bin'
|
|
}
|
|
|
|
# default users
|
|
include profiles::accounts::sysadmin
|
|
|
|
}
|