Commit f2402321 authored by Simon's avatar Simon

Initial copy from old SVN

parent d7b8ae1d
Pipeline #7 skipped
class clocksync {
include "clocksync::ntp"
}
\ No newline at end of file
class clocksync::ntp {
package { 'ntp':
ensure => installed,
}
service { 'ntp':
name => ntpd,
ensure => hiera(clocksync::status),
enable => true,
subscribe => [File['ntp.conf'],File['ntpsysconf']],
}
file { 'ntp.conf':
path => '/etc/ntp.conf',
ensure => file,
owner => root,
group => root,
mode => '0644',
require => Package['ntp'],
source => [
"puppet:///modules/ntp/$fqdn.conf",
"puppet:///modules/ntp/ntp.conf",
],
sourceselect => first,
}
file { "ntpsysconf":
path => $operatingsystem ? {
default => "/etc/sysconfig/ntpd",
},
owner => root,
group => root,
mode => "644",
source => "puppet:///modules/ntp/sysconfig",
}
case hiera(clocksync::timezone) {
IST: { $tzconfig = 'IST' }
UTC: { $tzconfig = 'UTC' }
default: { $tzconfig = 'IST'}
}
file { "timezone":
path => "/etc/sysconfig/clock",
ensure => file,
force => true,
owner => root,
group => root,
mode => "644",
source => "puppet:///modules/ntp/clock/$tzconfig",
}
file { "tzlink":
path => $operatingsystem ? {
default => "/etc/localtime",
},
ensure => link,
target => $tzconfig ? {
"IST" => "/usr/share/zoneinfo/Europe/Dublin",
"UTC" => "/usr/share/zoneinfo/UTC",
default => "/usr/share/zoneinfo/Europe/Dublin",
},
}
}
\ No newline at end of file
{
"author": "simon-gitpub@think.io",
"dependencies": [],
"license": "MIT",
"name": "Simon/clocksync",
"operatingsystem_support": [],
"project_page": "",
"requirements": [],
"source": "https://git.think.io/Simon/puppet-clocksync.git",
"summary": "Module for dealing with NTP/Chrony",
"tags": [],
"version": "0.1.0"
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment