DS
https://puppet.com/docs/pe/2019.8/osp/the_roles_and_profiles_method.html
и использовать hiera
А от всех этих node 'node01' избавиться
Size: a a a
DS
DS
A
DS
A
A
- name: Install packages
apt:
pkg:
- puppet-agent
- curl
- wget
-blah-blah-blah
state: latest
force_apt_get: yes
update_cache: yes
cache_valid_time: 3600
register: apt_output
- debug:
var: apt_output
A
A
A
$mytimeout = 3600
if $facts['apt_update_last_success'] and Integer($facts['apt_update_last_success']) < (Integer(Timestamp().strftime('%s')) - $mytimeout) {
$_apt_update = 'always'
}
else {
$_apt_update = 'reluctantly'
}
class { 'apt':
update => {
frequency => $_apt_update,
},
}
A
DS
class { 'apt':
update => {
frequency => 'daily',
},
}
Class['apt::update'] -> ensure_packages(['curl','wget'])
```A
A
DS
A
DS
VL
VL
A
VL