Skip to content

Commit a3d0b7f

Browse files
committed
(GH-cat-9) syntax:hiera:yaml fixes
1 parent 31467c0 commit a3d0b7f

File tree

6 files changed

+13
-27
lines changed

6 files changed

+13
-27
lines changed

examples/init.pp

-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
node default {
2-
32
notify { 'enduser-before': }
43
notify { 'enduser-after': }
54

65
class { 'ntp':
76
require => Notify['enduser-before'],
87
before => Notify['enduser-after'],
98
}
10-
119
}

manifests/config.pp

+10-13
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,16 @@
44
# @api private
55
#
66
class ntp::config {
7-
87
#The servers-netconfig file overrides NTP config on SLES 12, interfering with our configuration.
98
if ($facts['operatingsystem'] == 'SLES' and $facts['operatingsystemmajrelease'] == '12') or
10-
($facts['operatingsystem'] == 'OpenSuSE' and $facts['operatingsystemmajrelease'] == '42') {
9+
($facts['operatingsystem'] == 'OpenSuSE' and $facts['operatingsystemmajrelease'] == '42') {
1110
file { '/var/run/ntp/servers-netconfig':
12-
ensure => 'absent'
11+
ensure => 'absent',
1312
}
1413
}
1514

16-
case $::osfamily
17-
{
18-
'redhat':
19-
{
15+
case $::osfamily {
16+
'redhat': {
2017
$daemon_config = '/etc/sysconfig/ntpd'
2118
if $ntp::daemon_extra_opts {
2219
file_line { 'Set NTPD daemon options':
@@ -35,8 +32,7 @@
3532
}
3633
}
3734
}
38-
'Debian':
39-
{
35+
'Debian': {
4036
$daemon_config = '/etc/default/ntp'
4137
if $ntp::daemon_extra_opts {
4238
file_line { 'Set NTPD daemon options':
@@ -55,8 +51,7 @@
5551
}
5652
}
5753
}
58-
'Suse':
59-
{
54+
'Suse': {
6055
$daemon_config = '/etc/sysconfig/ntp'
6156
if $ntp::daemon_extra_opts {
6257
file_line { 'Set NTPD daemon options':
@@ -67,7 +62,9 @@
6762
}
6863
}
6964
}
70-
default: { }
65+
default: {
66+
# Empty
67+
}
7168
}
7269

7370
if $ntp::keys_enable {
@@ -123,7 +120,7 @@
123120
$step_ticker_content = template($ntp::step_tickers_template)
124121
} elsif $::ntp::step_tickers_epp {
125122
$step_ticker_content = epp($::ntp::step_tickers_epp)
126-
} else{
123+
} else {
127124
$step_ticker_content = epp('ntp/step-tickers.epp')
128125
}
129126

manifests/install.pp

-4
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,9 @@
44
# @api private
55
#
66
class ntp::install {
7-
87
if $ntp::package_manage {
9-
108
package { $ntp::package_name:
119
ensure => $ntp::package_ensure,
1210
}
13-
1411
}
15-
1612
}

manifests/service.pp

-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
# @api private
55
#
66
class ntp::service {
7-
87
if $ntp::service_manage == true {
98
service { 'ntp':
109
ensure => $ntp::service_ensure,
@@ -15,5 +14,4 @@
1514
hasrestart => $ntp::service_hasrestart,
1615
}
1716
}
18-
1917
}

plans/acceptance/pe_server.pp

+1-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# ntp::acceptance::pe_server
77
plan ntp::acceptance::pe_server(
88
Optional[String] $version = '2019.8.5',
9-
Optional[Hash] $pe_settings = {password => 'puppetlabs'}
9+
Optional[Hash] $pe_settings = { password => 'puppetlabs' }
1010
) {
1111
#identify pe server node
1212
$puppet_server = get_targets('*').filter |$n| { $n.vars['role'] == 'ntpserver' }
@@ -19,4 +19,3 @@
1919
'pe_settings' => $pe_settings
2020
)
2121
}
22-

plans/acceptance/provision_integration.pp

+2-4
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
Optional[String] $provision_type = 'provision_service',
1010
) {
1111
#provision server machine, set role
12-
run_task("provision::$provision_type", 'localhost',
13-
action => 'provision', platform => $image, vars => 'role: ntpserver')
14-
run_task("provision::$provision_type", 'localhost',
15-
action => 'provision', platform => $image, vars => 'role: ntpclient')
12+
run_task("provision::$provision_type", 'localhost', action => 'provision', platform => $image, vars => 'role: ntpserver')
13+
run_task("provision::$provision_type", 'localhost', action => 'provision', platform => $image, vars => 'role: ntpclient')
1614
}

0 commit comments

Comments
 (0)