fuel-library/deployment/puppet/osnailyfacter/modular/ntp/ntp-check.pp
Alex Schultz 57752a27fe Connectivity tests for external services
In order to provide better error handling around configured external
services, we are adding additional checks to some deployment tasks
where we know that there are either external services or services
that can be user configurable.

*) Adding a repository connectivity test task to be run after
netconfig to ensure that software repository access is OK before
proceeding with the rest of the deployment.
*) Adding in post connectivity tests before NTP server to ensure that
those services will be able to reach the configured settings.

With this change, we are adding two custom puppet functions
(url_available and ntp_available) to the osnailyfacter module. These
functions will throw a Puppet::Error if unable to properly
communicate with the services.

Change-Id: I6b0302ce403871384d377aceb7e94b09126b885e
Closes-Bug: 1261940
2015-05-12 15:00:46 +00:00

7 lines
323 B
Puppet

notice('MODULAR: ntp-check.pp')
# get the ntp configuration from hiera
$ntp_servers = hiera('external_ntp')
# take the comma seperated list and turn it into an array of servers and then
# pass it to the ntp_available function to check that at least 1 server works
ntp_available(strip(split($ntp_servers['ntp_list'], ',')))