Skip to content

Commit a51e38e

Browse files
Simon Peetersekohl
authored andcommitted
Revert "Ensure config file ends with a new line"
This reverts commit e87d8f2.
1 parent e799269 commit a51e38e

File tree

3 files changed

+9
-11
lines changed

3 files changed

+9
-11
lines changed

manifests/config.pp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -81,17 +81,15 @@
8181
-> case $facts['os']['family'] {
8282
'Windows': {
8383
concat { "${puppet_dir}/puppet.conf":
84-
mode => '0674',
85-
ensure_newline => true,
84+
mode => '0674',
8685
}
8786
}
8887

8988
default: {
9089
concat { "${puppet_dir}/puppet.conf":
91-
owner => 'root',
92-
group => $puppet::params::root_group,
93-
mode => '0644',
94-
ensure_newline => true,
90+
owner => 'root',
91+
group => $puppet::params::root_group,
92+
mode => '0644',
9593
}
9694
}
9795
}

manifests/config/entry.pp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
# they make sure that '1_main ' is ordered before '1_main_*'
3131
ensure_resource('concat::fragment', "puppet.conf_${section}", {
3232
target => "${puppet::dir}/puppet.conf",
33-
content => "\n[${section}]",
33+
content => "\n\n[${section}]",
3434
order => "${sectionorder}_${section} ",
3535
})
3636

@@ -39,7 +39,7 @@
3939
if (!defined(Concat::Fragment["puppet.conf_${section}_${key}"])){
4040
concat::fragment{"puppet.conf_${section}_${key}":
4141
target => "${puppet::dir}/puppet.conf",
42-
content => " ${key} = ${_value}",
42+
content => "\n ${key} = ${_value}",
4343
order => "${sectionorder}_${section}_${key} ",
4444
}
4545
} else {

spec/defines/puppet_config_entry_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
}
2121
end
2222
it 'should contain the section header' do
23-
should contain_concat__fragment('puppet.conf_main').with_content("\n[main]")
23+
should contain_concat__fragment('puppet.conf_main').with_content("\n\n[main]")
2424
should contain_concat__fragment('puppet.conf_main').with_order("1_main ")
2525
end
2626
it 'should contain the keyvalue pair' do
@@ -41,7 +41,7 @@
4141
}
4242
end
4343
it 'should contain the section header' do
44-
should contain_concat__fragment('puppet.conf_main').with_content("\n[main]")
44+
should contain_concat__fragment('puppet.conf_main').with_content("\n\n[main]")
4545
should contain_concat__fragment('puppet.conf_main').with_order("1_main ")
4646
end
4747
it 'should contain the keyvalue pair' do
@@ -63,7 +63,7 @@
6363
}
6464
end
6565
it 'should contain the section header' do
66-
should contain_concat__fragment('puppet.conf_main').with_content("\n[main]")
66+
should contain_concat__fragment('puppet.conf_main').with_content("\n\n[main]")
6767
should contain_concat__fragment('puppet.conf_main').with_order("1_main ")
6868
end
6969
it 'should contain the keyvalue pair' do

0 commit comments

Comments
 (0)