Showing with 29 additions and 10 deletions.
  1. +12 −0 CHANGELOG.md
  2. +5 −0 README.md
  3. +6 −4 manifests/config.pp
  4. +2 −2 manifests/config/entry.pp
  5. +1 −1 metadata.json
  6. +3 −3 spec/defines/puppet_config_entry_spec.rb
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# Changelog

## [12.1.0](https://github.com/theforeman/puppet-puppet/tree/12.1.0) (2019-10-25)

[Full Changelog](https://github.com/theforeman/puppet-puppet/compare/12.0.1...12.1.0)

**Implemented enhancements:**

- Ensure config file ends with a new line [\#707](https://github.com/theforeman/puppet-puppet/pull/707) ([baurmatt](https://github.com/baurmatt))

**Merged pull requests:**

- Document campotocamp/systemd soft dependency [\#696](https://github.com/theforeman/puppet-puppet/pull/696) ([dogjarek](https://github.com/dogjarek))

## [12.0.1](https://github.com/theforeman/puppet-puppet/tree/12.0.1) (2019-06-13)

[Full Changelog](https://github.com/theforeman/puppet-puppet/compare/12.0.0...12.0.1)
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,11 @@ versions, which this module supports. It's recommended that you set the
you have installed. By default the module will configure for the latest
version available.

# Soft Dependencies

If you use a OS which uses systemd you may consider to download `camptocamp/systemd` module for compatibility.
It is **only** needed if you use the **puppetserver** feature.

# Contributing

* Fork the project
Expand Down
10 changes: 6 additions & 4 deletions manifests/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -82,15 +82,17 @@
-> case $::osfamily {
'Windows': {
concat { "${puppet_dir}/puppet.conf":
mode => '0674',
mode => '0674',
ensure_newline => true,
}
}

default: {
concat { "${puppet_dir}/puppet.conf":
owner => 'root',
group => $::puppet::params::root_group,
mode => '0644',
owner => 'root',
group => $::puppet::params::root_group,
mode => '0644',
ensure_newline => true,
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions manifests/config/entry.pp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
# they make sure that '1_main ' is ordered before '1_main_*'
ensure_resource('concat::fragment', "puppet.conf_${section}", {
target => "${::puppet::dir}/puppet.conf",
content => "\n\n[${section}]",
content => "\n[${section}]",
order => "${sectionorder}_${section} ",
})

Expand All @@ -39,7 +39,7 @@
if (!defined(Concat::Fragment["puppet.conf_${section}_${key}"])){
concat::fragment{"puppet.conf_${section}_${key}":
target => "${::puppet::dir}/puppet.conf",
content => "\n ${key} = ${_value}",
content => " ${key} = ${_value}",
order => "${sectionorder}_${section}_${key} ",
}
} else {
Expand Down
2 changes: 1 addition & 1 deletion metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "theforeman-puppet",
"version": "12.0.1",
"version": "12.1.0",
"author": "theforeman",
"summary": "Puppet agent and server configuration",
"license": "GPL-3.0+",
Expand Down
6 changes: 3 additions & 3 deletions spec/defines/puppet_config_entry_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
}
end
it 'should contain the section header' do
should contain_concat__fragment('puppet.conf_main').with_content("\n\n[main]")
should contain_concat__fragment('puppet.conf_main').with_content("\n[main]")
should contain_concat__fragment('puppet.conf_main').with_order("1_main ")
end
it 'should contain the keyvalue pair' do
Expand All @@ -41,7 +41,7 @@
}
end
it 'should contain the section header' do
should contain_concat__fragment('puppet.conf_main').with_content("\n\n[main]")
should contain_concat__fragment('puppet.conf_main').with_content("\n[main]")
should contain_concat__fragment('puppet.conf_main').with_order("1_main ")
end
it 'should contain the keyvalue pair' do
Expand All @@ -63,7 +63,7 @@
}
end
it 'should contain the section header' do
should contain_concat__fragment('puppet.conf_main').with_content("\n\n[main]")
should contain_concat__fragment('puppet.conf_main').with_content("\n[main]")
should contain_concat__fragment('puppet.conf_main').with_order("1_main ")
end
it 'should contain the keyvalue pair' do
Expand Down