Puppet version: 4.5.2
In the site manifest file, ntp module is included to install ntp service:
class { '::ntp':
servers => [
'0.au.pool.ntp.org',
'1.au.pool.ntp.org',
'2.au.pool.ntp.org',
'3.au.pool.ntp.org'
],
disable_monitor => true,
package_ensure => 'present',
service_ensure => 'running',
service_enable => true,
restrict => [
'default kod nomodify notrap nopeer noquery',
'-6 default kod nomodify notrap nopeer noquery',
'127.0.0.1',
'-6 ::1',
]
}
The command of Puppet run is configured in the user data of the EC2 instance, puppet runs when the EC2 instance boot up and log to the file I specified so that I can check what's wrong there with the ntp service install, here is what I found in the log related to ntp:
^[[0;32mInfo: Caching catalog for nfs.demo-project2.com^[[0m
^[[0;36mDebug: /Package[ntp]: Provider apt does not support features virtual_packages; not managing attribute allow_virtual^[[0m
^[[0;32mInfo: Applying configuration version '1481067287'^[[0m
^[[0;36mDebug: /Stage[main]/Ntp/Anchor[ntp::begin]/before: subscribes to Class[Ntp::Install]^[[0m
^[[0;36mDebug: /Stage[main]/Ntp::Install/before: subscribes to Class[Ntp::Config]^[[0m
^[[0;36mDebug: /Stage[main]/Ntp::Config/notify: subscribes to Class[Ntp::Service]^[[0m
^[[0;36mDebug: /Stage[main]/Ntp::Service/before: subscribes to Anchor[ntp::end]^[[0m
^[[mNotice: Bella::debug::pkgname:ntp^[[0m
^[[mNotice: /Stage[main]/Ntp::Install/Notify[Bella::debug::pkgname:ntp]/message: defined 'message' as 'Bella::debug::pkgname:ntp'^[[0m
^[[0;36mDebug: /Stage[main]/Ntp::Install/Notify[Bella::debug::pkgname:ntp]: The container Class[Ntp::Install] will propagate my refresh event^[[0m
^[[0;36mDebug: Prefetching apt resources for package^[[0m
^[[0;36mDebug: Executing '/usr/bin/dpkg-query -W --showformat '${Status} ${Package} ${Version}\n''^[[0m
^[[0;36mDebug: Executing: '/usr/bin/dpkg-query -W --showformat '${Status} ${Package} ${Version}\n' ntp'^[[0m
^[[0;36mDebug: Executing: '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install ntp'^[[0m
^[[0;36mDebug: Class[Ntp::Install]: Resource is being skipped, unscheduling all events^[[0m
^[[0;32mInfo: Class[Ntp::Install]: Unscheduling all events on Class[Ntp::Install]^[[0m
^[[0;36mDebug: Class[Ntp::Config]: Resource is being skipped, unscheduling all events^[[0m
^[[mNotice: /Stage[main]/Ntp::Config/File[/etc/ntp.conf]: Dependency Package[ntp] has failures: true^[[0m
^[[0;36mDebug: /Stage[main]/Ntp::Config/File[/etc/ntp.conf]: Resource is being skipped, unscheduling all events^[[0m
^[[0;36mDebug: Class[Ntp::Config]: Resource is being skipped, unscheduling all events^[[0m
^[[0;36mDebug: Class[Ntp::Service]: Resource is being skipped, unscheduling all events^[[0m
^[[mNotice: /Stage[main]/Ntp::Service/Service[ntp]: Dependency Package[ntp] has failures: true^[[0m
^[[0;36mDebug: /Stage[main]/Ntp::Service/Service[ntp]: Resource is being skipped, unscheduling all events^[[0m
^[[0;36mDebug: Class[Ntp::Service]: Resource is being skipped, unscheduling all events^[[0m
^[[mNotice: /Stage[main]/Ntp/Anchor[ntp::end]: Dependency Package[ntp] has failures: true^[[0m
^[[0;36mDebug: /Stage[main]/Ntp/Anchor[ntp::end]: Resource is being skipped, unscheduling all events^[[0m
^[[0;36mDebug: Class[Ntp]: Resource is being skipped, unscheduling all events^[[0m
When I log in the server, and run puppet agent -t manually, all the services get installed. And when I run manually run this command which appeared in the log: /usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install ntp, it also succeeded.
Can anyone help out here why the ntp package does not install in this case?
↧