Skip to content

Commit

Permalink
move params to data-in-modules
Browse files Browse the repository at this point in the history
  • Loading branch information
bastelfreak committed Mar 7, 2018
1 parent 7c3a398 commit 4b1e52d
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 10 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

This module declares exec resources to create global sync points for reloading systemd.

**Version 2 and newer of the module don't work with Hiera 3! You need to migrate your existing Hiera setup to Hiera 5**

## Usage and examples

There are two ways to use this module.
Expand Down
10 changes: 10 additions & 0 deletions data/common.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
systemd::service_limits: {}
systemd::manage_resolved: false
systemd::resolved_ensure: 'running'
systemd::manage_networkd: false
systemd::networkd_ensure: 'running'
systemd::manage_timesyncd: false
systemd::timesyncd_ensure: 'running'
systemd::ntp_server: ~
systemd::fallback_ntp_server: ~
12 changes: 12 additions & 0 deletions hiera.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
version: 5
defaults:
datadir: 'data'
data_hash: 'yaml_data'
hierarchy:
- name: 'Major Version'
path: '%{facts.os.name}-%{facts.os.release.major}.yaml'
- name: 'Distribution Name'
path: '%{facts.os.name}.yaml'
- name: 'common'
path: 'common.yaml'
18 changes: 9 additions & 9 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@
# as the fallback NTP servers. Any per-interface NTP servers obtained from
# systemd-networkd take precedence over this setting. requires puppetlabs-inifile
class systemd (
Hash[String, Hash[String, Any]] $service_limits = {},
Boolean $manage_resolved = false,
Enum['stopped','running'] $resolved_ensure = 'running',
Boolean $manage_networkd = false,
Enum['stopped','running'] $networkd_ensure = 'running',
Boolean $manage_timesyncd = false,
Enum['stopped','running'] $timesyncd_ensure = 'running',
Optional[Variant[Array,String]] $ntp_server = undef,
Optional[Variant[Array,String]] $fallback_ntp_server = undef,
Hash[String, Hash[String, Any]] $service_limits,
Boolean $manage_resolved,
Enum['stopped','running'] $resolved_ensure,
Boolean $manage_networkd,
Enum['stopped','running'] $networkd_ensure,
Boolean $manage_timesyncd,
Enum['stopped','running'] $timesyncd_ensure,
Optional[Variant[Array,String]] $ntp_server,
Optional[Variant[Array,String]] $fallback_ntp_server,
){

contain systemd::systemctl::daemon_reload
Expand Down
2 changes: 1 addition & 1 deletion metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"requirements": [
{
"name": "puppet",
"version_requirement": ">= 4.7.0 < 6.0.0"
"version_requirement": ">= 4.10.10 < 6.0.0"
}
],
"operatingsystem_support": [
Expand Down

0 comments on commit 4b1e52d

Please sign in to comment.