From f419e4baf5a3b1b4cd7e0bb6ead40ea767c4ffe0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Pinson?= Date: Mon, 19 Apr 2021 14:13:31 +0200 Subject: [PATCH 01/17] Add stale.yml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Raphaël Pinson --- .github/stale.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .github/stale.yml diff --git a/.github/stale.yml b/.github/stale.yml new file mode 100644 index 00000000..dc90e5a1 --- /dev/null +++ b/.github/stale.yml @@ -0,0 +1,17 @@ +# Number of days of inactivity before an issue becomes stale +daysUntilStale: 60 +# Number of days of inactivity before a stale issue is closed +daysUntilClose: 7 +# Issues with these labels will never be considered stale +exemptLabels: + - pinned + - security +# Label to use when marking an issue as stale +staleLabel: wontfix +# Comment to post when marking an issue as stale. Set to `false` to disable +markComment: > + This issue has been automatically marked as stale because it has not had + recent activity. It will be closed if no further activity occurs. Thank you + for your contributions. +# Comment to post when closing a stale issue. Set to `false` to disable +closeComment: false From 3934a5589c0daabdc5cfda984b4a16b8cdc31ff5 Mon Sep 17 00:00:00 2001 From: Ewoud Kohl van Wijngaarden Date: Mon, 26 Apr 2021 17:17:28 +0200 Subject: [PATCH 02/17] Correct puppet-strings documentation (#192) In various places @attr was used instead of @param. It also didn't use the @summary tag which led to odd summaries. Then some indenting was incorrect. It also uses a newer version of puppet-strings which generates a list of parameters with links. --- REFERENCE.md | 628 ++++++++++++++++++++++++++---------- manifests/dropin_file.pp | 20 +- manifests/journald.pp | 6 +- manifests/logind.pp | 6 +- manifests/network.pp | 3 +- manifests/resolved.pp | 6 +- manifests/service_limits.pp | 6 +- manifests/timesyncd.pp | 2 +- manifests/tmpfile.pp | 6 +- manifests/udev/rule.pp | 4 +- manifests/udevd.pp | 6 +- 11 files changed, 482 insertions(+), 211 deletions(-) diff --git a/REFERENCE.md b/REFERENCE.md index 1a03a378..04bf5dfe 100644 --- a/REFERENCE.md +++ b/REFERENCE.md @@ -13,20 +13,22 @@ #### Private Classes -* `systemd::journald`: This class manages and configures journald. https://www.freedesktop.org/software/systemd/man/journald.conf.html -* `systemd::logind`: This class manages systemd's login manager configuration. https://www.freedesktop.org/software/systemd/man/logind.conf.html +* `systemd::journald`: This class manages and configures journald. +* `systemd::logind`: This class manages systemd's login manager configuration. * `systemd::networkd`: This class provides an abstract way to trigger systemd-networkd -* `systemd::resolved`: This class provides an abstract way to trigger resolved. Each parameters correspond to resolved.conf(5): https://www.freedesktop.org/software +* `systemd::resolved`: This class provides an abstract way to trigger resolved. * `systemd::system`: This class provides a solution to enable accounting * `systemd::timesyncd`: This class provides an abstract way to trigger systemd-timesyncd +* `systemd::udevd`: This class manages systemd's udev config ### Defined types * [`systemd::dropin_file`](#systemddropin_file): Creates a drop-in file for a systemd unit -* [`systemd::network`](#systemdnetwork): -- Define: systemd::network Creates network config for systemd-networkd -* [`systemd::service_limits`](#systemdservice_limits): Adds a set of custom limits to the service * Mutually exclusive with ``$limits`` +* [`systemd::network`](#systemdnetwork): Creates network config for systemd-networkd +* [`systemd::service_limits`](#systemdservice_limits): Adds a set of custom limits to the service * [`systemd::timer`](#systemdtimer): Create a timer and optionally a service unit to execute with the timer unit -* [`systemd::tmpfile`](#systemdtmpfile): Creates a systemd tmpfile * Mutually exclusive with ``$limits`` +* [`systemd::tmpfile`](#systemdtmpfile): Creates a systemd tmpfile +* [`systemd::udev::rule`](#systemdudevrule): Adds a custom udev rule * [`systemd::unit_file`](#systemdunit_file): Creates a systemd unit file ### Resource types @@ -45,34 +47,71 @@ ## Classes -### `systemd` +### `systemd` This module allows triggering systemd commands once for all modules #### Parameters -The following parameters are available in the `systemd` class. - -##### `service_limits` +The following parameters are available in the `systemd` class: + +* [`service_limits`](#service_limits) +* [`manage_resolved`](#manage_resolved) +* [`resolved_ensure`](#resolved_ensure) +* [`dns`](#dns) +* [`fallback_dns`](#fallback_dns) +* [`domains`](#domains) +* [`llmnr`](#llmnr) +* [`multicast_dns`](#multicast_dns) +* [`dnssec`](#dnssec) +* [`dnsovertls`](#dnsovertls) +* [`cache`](#cache) +* [`dns_stub_listener`](#dns_stub_listener) +* [`use_stub_resolver`](#use_stub_resolver) +* [`manage_networkd`](#manage_networkd) +* [`networkd_ensure`](#networkd_ensure) +* [`manage_timesyncd`](#manage_timesyncd) +* [`timesyncd_ensure`](#timesyncd_ensure) +* [`ntp_server`](#ntp_server) +* [`fallback_ntp_server`](#fallback_ntp_server) +* [`manage_journald`](#manage_journald) +* [`journald_settings`](#journald_settings) +* [`manage_udevd`](#manage_udevd) +* [`udev_log`](#udev_log) +* [`udev_children_max`](#udev_children_max) +* [`udev_exec_delay`](#udev_exec_delay) +* [`udev_event_timeout`](#udev_event_timeout) +* [`udev_resolve_names`](#udev_resolve_names) +* [`udev_timeout_signal`](#udev_timeout_signal) +* [`udev_rules`](#udev_rules) +* [`manage_logind`](#manage_logind) +* [`logind_settings`](#logind_settings) +* [`loginctl_users`](#loginctl_users) +* [`dropin_files`](#dropin_files) +* [`manage_accounting`](#manage_accounting) +* [`accounting`](#accounting) +* [`purge_dropin_dirs`](#purge_dropin_dirs) + +##### `service_limits` Data type: `Hash[String,Hash[String, Any]]` May be passed a resource hash suitable for passing directly into the ``create_resources()`` function as called on ``systemd::service_limits`` -##### `manage_resolved` +##### `manage_resolved` Data type: `Boolean` Manage the systemd resolver -##### `resolved_ensure` +##### `resolved_ensure` Data type: `Enum['stopped','running']` The state that the ``resolved`` service should be in -##### `dns` +##### `dns` Data type: `Optional[Variant[Array[String],String]]` @@ -81,7 +120,7 @@ DNS requests are sent to one of the listed DNS servers in parallel to suitable per-link DNS servers acquired from systemd-networkd.service(8) or set at runtime by external applications. requires puppetlabs-inifile -##### `fallback_dns` +##### `fallback_dns` Data type: `Optional[Variant[Array[String],String]]` @@ -89,88 +128,88 @@ A space-separated list of IPv4 and IPv6 addresses to use as the fallback DNS servers. Any per-link DNS servers obtained from systemd-networkd take precedence over this setting. requires puppetlabs-inifile -##### `domains` +##### `domains` Data type: `Optional[Variant[Array[String],String]]` A space-separated list of domains host names or IP addresses to be used systemd-resolved take precedence over this setting. -##### `llmnr` +##### `llmnr` Data type: `Optional[Variant[Boolean,Enum['resolve']]]` Takes a boolean argument or "resolve". -##### `multicast_dns` +##### `multicast_dns` Data type: `Optional[Variant[Boolean,Enum['resolve']]]` Takes a boolean argument or "resolve". -##### `dnssec` +##### `dnssec` Data type: `Optional[Variant[Boolean,Enum['allow-downgrade']]]` Takes a boolean argument or "allow-downgrade". -##### `dnsovertls` +##### `dnsovertls` Data type: `Optional[Variant[Boolean,Enum['opportunistic', 'no']]]` Takes a boolean argument or "opportunistic" -##### `cache` +##### `cache` -Data type: `Boolean` +Data type: `Optional[Variant[Boolean,Enum['no-negative']]]` -Takes a boolean argument. +Takes a boolean argument or "no-negative". -##### `dns_stub_listener` +##### `dns_stub_listener` Data type: `Optional[Variant[Boolean,Enum['udp','tcp']]]` Takes a boolean argument or one of "udp" and "tcp". -##### `use_stub_resolver` +##### `use_stub_resolver` Data type: `Boolean` -Takes a boolean argument. When "false" (default) it uses /var/run/systemd/resolve/resolv.conf -as /etc/resolv.conf. When "true", it uses /var/run/systemd/resolve/stub-resolv.conf +Takes a boolean argument. When "false" (default) it uses /run/systemd/resolve/resolv.conf +as /etc/resolv.conf. When "true", it uses /run/systemd/resolve/stub-resolv.conf -##### `manage_networkd` +##### `manage_networkd` Data type: `Boolean` Manage the systemd network daemon -##### `networkd_ensure` +##### `networkd_ensure` Data type: `Enum['stopped','running']` The state that the ``networkd`` service should be in -##### `manage_timesyncd` +##### `manage_timesyncd` Data type: `Boolean` Manage the systemd tiemsyncd daemon -##### `timesyncd_ensure` +##### `timesyncd_ensure` Data type: `Enum['stopped','running']` The state that the ``timesyncd`` service should be in -##### `ntp_server` +##### `ntp_server` Data type: `Optional[Variant[Array,String]]` comma separated list of ntp servers, will be combined with interface specific addresses from systemd-networkd. requires puppetlabs-inifile -##### `fallback_ntp_server` +##### `fallback_ntp_server` Data type: `Optional[Variant[Array,String]]` @@ -178,31 +217,82 @@ A space-separated list of NTP server host names or IP addresses to be used as the fallback NTP servers. Any per-interface NTP servers obtained from systemd-networkd take precedence over this setting. requires puppetlabs-inifile -##### `manage_journald` +##### `manage_journald` Data type: `Boolean` Manage the systemd journald -##### `journald_settings` +##### `journald_settings` Data type: `Systemd::JournaldSettings` Config Hash that is used to configure settings in journald.conf -##### `manage_logind` +##### `manage_udevd` + +Data type: `Boolean` + +Manage the systemd udev daemon + +##### `udev_log` + +Data type: `Optional[Variant[Integer,String]]` + +The value of /etc/udev/udev.conf udev_log + +##### `udev_children_max` + +Data type: `Optional[Integer]` + +The value of /etc/udev/udev.conf children_max + +##### `udev_exec_delay` + +Data type: `Optional[Integer]` + +The value of /etc/udev/udev.conf exec_delay + +##### `udev_event_timeout` + +Data type: `Optional[Integer]` + +The value of /etc/udev/udev.conf event_timeout + +##### `udev_resolve_names` + +Data type: `Optional[Enum['early', 'late', 'never']]` + +The value of /etc/udev/udev.conf resolve_names + +##### `udev_timeout_signal` + +Data type: `Optional[Variant[Integer,String]]` + +The value of /etc/udev/udev.conf timeout_signal + +##### `udev_rules` + +Data type: `Hash` + +Config Hash that is used to generate instances of our +`udev::rule` define. + +Default value: `{}` + +##### `manage_logind` Data type: `Boolean` Manage the systemd logind -##### `logind_settings` +##### `logind_settings` Data type: `Systemd::LogindSettings` Config Hash that is used to configure settings in logind.conf -##### `loginctl_users` +##### `loginctl_users` Data type: `Hash` @@ -211,7 +301,7 @@ Config Hash that is used to generate instances of our type Default value: `{}` -##### `dropin_files` +##### `dropin_files` Data type: `Hash` @@ -219,25 +309,25 @@ Configure dropin files via hiera with factory pattern Default value: `{}` -##### `manage_accounting` +##### `manage_accounting` Data type: `Boolean` -##### `accounting` +##### `accounting` Data type: `Hash[String,String]` -##### `purge_dropin_dirs` +##### `purge_dropin_dirs` Data type: `Boolean` -### `systemd::tmpfiles` +### `systemd::tmpfiles` Update the systemd temp files @@ -246,9 +336,11 @@ Update the systemd temp files #### Parameters -The following parameters are available in the `systemd::tmpfiles` class. +The following parameters are available in the `systemd::tmpfiles` class: -##### `operations` +* [`operations`](#operations) + +##### `operations` Data type: `Array[Enum['create','clean','remove']]` @@ -261,7 +353,7 @@ Default value: `['create']` ## Defined types -### `systemd::dropin_file` +### `systemd::dropin_file` Creates a drop-in file for a systemd unit @@ -270,112 +362,148 @@ Creates a drop-in file for a systemd unit #### Parameters -The following parameters are available in the `systemd::dropin_file` defined type. +The following parameters are available in the `systemd::dropin_file` defined type: -##### `unit` +* [`name`](#name) +* [`path`](#path) +* [`selinux_ignore_defaults`](#selinux_ignore_defaults) +* [`content`](#content) +* [`source`](#source) +* [`target`](#target) +* [`owner`](#owner) +* [`group`](#group) +* [`mode`](#mode) +* [`show_diff`](#show_diff) +* [`unit`](#unit) +* [`filename`](#filename) +* [`ensure`](#ensure) -Data type: `Systemd::Unit` +##### `name` +Data type: `Pattern['^[^/]+\.conf$']` +The target unit file to create -##### `filename` - -Data type: `Systemd::Dropin` - - - -Default value: `$name` - -##### `ensure` - -Data type: `Enum['present', 'absent', 'file']` - - - -Default value: `'present'` - -##### `path` +##### `path` Data type: `Stdlib::Absolutepath` - +The main systemd configuration path Default value: `'/etc/systemd/system'` -##### `selinux_ignore_defaults` +##### `selinux_ignore_defaults` Data type: `Optional[Boolean]` - +If Puppet should ignore the default SELinux labels. Default value: ``false`` -##### `content` +##### `content` Data type: `Optional[Variant[String,Sensitive[String]]]` +The full content of the unit file +* Mutually exclusive with ``$source`` Default value: ``undef`` -##### `source` +##### `source` Data type: `Optional[String]` +The ``File`` resource compatible ``source`` +* Mutually exclusive with ``$content`` Default value: ``undef`` -##### `target` +##### `target` Data type: `Optional[Stdlib::Absolutepath]` +If set, will force the file to be a symlink to the given target +* Mutually exclusive with both ``$source`` and ``$content`` Default value: ``undef`` -##### `owner` +##### `owner` Data type: `String` - +The owner to set on the dropin file Default value: `'root'` -##### `group` +##### `group` Data type: `String` - +The group to set on the dropin file Default value: `'root'` -##### `mode` +##### `mode` Data type: `String` - +The mode to set on the dropin file Default value: `'0444'` -##### `show_diff` +##### `show_diff` Data type: `Boolean` - +Whether to show the diff when updating dropin file Default value: ``true`` -### `systemd::network` +##### `unit` + +Data type: `Systemd::Unit` + + + +##### `filename` + +Data type: `Systemd::Dropin` + + + +Default value: `$name` + +##### `ensure` + +Data type: `Enum['present', 'absent', 'file']` + + + +Default value: `'present'` + +### `systemd::network` --- Define: systemd::network Creates network config for systemd-networkd #### Parameters -The following parameters are available in the `systemd::network` defined type. +The following parameters are available in the `systemd::network` defined type: + +* [`ensure`](#ensure) +* [`path`](#path) +* [`content`](#content) +* [`source`](#source) +* [`target`](#target) +* [`owner`](#owner) +* [`group`](#group) +* [`mode`](#mode) +* [`show_diff`](#show_diff) +* [`restart_service`](#restart_service) -##### `ensure` +##### `ensure` Data type: `Enum['file', 'absent']` @@ -383,7 +511,7 @@ Data type: `Enum['file', 'absent']` Default value: `file` -##### `path` +##### `path` Data type: `Stdlib::Absolutepath` @@ -391,7 +519,7 @@ Data type: `Stdlib::Absolutepath` Default value: `'/etc/systemd/network'` -##### `content` +##### `content` Data type: `Optional[String]` @@ -399,7 +527,7 @@ Data type: `Optional[String]` Default value: ``undef`` -##### `source` +##### `source` Data type: `Optional[String]` @@ -407,7 +535,7 @@ Data type: `Optional[String]` Default value: ``undef`` -##### `target` +##### `target` Data type: `Optional[Stdlib::Absolutepath]` @@ -415,7 +543,7 @@ Data type: `Optional[Stdlib::Absolutepath]` Default value: ``undef`` -##### `owner` +##### `owner` Data type: `String` @@ -423,7 +551,7 @@ Data type: `String` Default value: `'root'` -##### `group` +##### `group` Data type: `String` @@ -431,7 +559,7 @@ Data type: `String` Default value: `'root'` -##### `mode` +##### `mode` Data type: `String` @@ -439,7 +567,7 @@ Data type: `String` Default value: `'0444'` -##### `show_diff` +##### `show_diff` Data type: `Boolean` @@ -447,7 +575,7 @@ Data type: `Boolean` Default value: ``true`` -##### `restart_service` +##### `restart_service` Data type: `Boolean` @@ -455,24 +583,40 @@ Data type: `Boolean` Default value: ``true`` -### `systemd::service_limits` +### `systemd::service_limits` Adds a set of custom limits to the service - * Mutually exclusive with ``$limits`` - * **See also** * systemd.exec(5) #### Parameters -The following parameters are available in the `systemd::service_limits` defined type. +The following parameters are available in the `systemd::service_limits` defined type: + +* [`name`](#name) +* [`ensure`](#ensure) +* [`path`](#path) +* [`selinux_ignore_defaults`](#selinux_ignore_defaults) +* [`limits`](#limits) +* [`source`](#source) +* [`restart_service`](#restart_service) + +##### `name` + +Data type: `Pattern['^.+\.(service|socket|mount|swap)$']` -##### `$ensure` +The name of the service that you will be modifying + +##### `ensure` + +Data type: `Enum['present', 'absent', 'file']` Whether to drop a file or remove it -##### `path` +Default value: `'present'` + +##### `path` Data type: `Stdlib::Absolutepath` @@ -480,7 +624,7 @@ The path to the main systemd settings directory Default value: `'/etc/systemd/system'` -##### `selinux_ignore_defaults` +##### `selinux_ignore_defaults` Data type: `Optional[Boolean]` @@ -488,7 +632,7 @@ If Puppet should ignore the default SELinux labels. Default value: ``false`` -##### `limits` +##### `limits` Data type: `Optional[Systemd::ServiceLimits]` @@ -498,15 +642,17 @@ A Hash of service limits matching the settings in ``systemd.exec(5)`` Default value: ``undef`` -##### `source` +##### `source` Data type: `Optional[String]` A ``File`` resource compatible ``source`` +* Mutually exclusive with ``$limits`` + Default value: ``undef`` -##### `restart_service` +##### `restart_service` Data type: `Boolean` @@ -514,15 +660,7 @@ Restart the managed service after setting the limits Default value: ``true`` -##### `ensure` - -Data type: `Enum['present', 'absent', 'file']` - - - -Default value: `'present'` - -### `systemd::timer` +### `systemd::timer` Create a timer and optionally a service unit to execute with the timer unit @@ -532,15 +670,30 @@ Create a timer and optionally a service unit to execute with the timer unit #### Parameters -The following parameters are available in the `systemd::timer` defined type. - -##### `name` +The following parameters are available in the `systemd::timer` defined type: + +* [`name`](#name) +* [`path`](#path) +* [`timer_content`](#timer_content) +* [`timer_source`](#timer_source) +* [`service_content`](#service_content) +* [`service_source`](#service_source) +* [`owner`](#owner) +* [`group`](#group) +* [`mode`](#mode) +* [`show_diff`](#show_diff) +* [`service_unit`](#service_unit) +* [`active`](#active) +* [`enable`](#enable) +* [`ensure`](#ensure) + +##### `name` Data type: `Pattern['^.+\.timer$]` The target of the timer unit to create -##### `path` +##### `path` Data type: `Stdlib::Absolutepath` @@ -548,7 +701,7 @@ The main systemd configuration path Default value: `'/etc/systemd/system'` -##### `timer_content` +##### `timer_content` Data type: `Optional[String[1]]` @@ -558,7 +711,7 @@ The full content of the timer unit file Default value: ``undef`` -##### `timer_source` +##### `timer_source` Data type: `Optional[String[1]]` @@ -568,7 +721,7 @@ The ``File`` resource compatible ``source`` Default value: ``undef`` -##### `service_content` +##### `service_content` Data type: `Optional[String[1]]` @@ -578,7 +731,7 @@ The full content of the service unit file Default value: ``undef`` -##### `service_source` +##### `service_source` Data type: `Optional[String[1]]` @@ -588,7 +741,7 @@ The ``File`` resource compatible ``source`` Default value: ``undef`` -##### `owner` +##### `owner` Data type: `String[1]` @@ -596,7 +749,7 @@ The owner to set on the dropin file Default value: `'root'` -##### `group` +##### `group` Data type: `String[1]` @@ -604,7 +757,7 @@ The group to set on the dropin file Default value: `'root'` -##### `mode` +##### `mode` Data type: `Stdlib::Filemode` @@ -612,7 +765,7 @@ The mode to set on the dropin file Default value: `'0444'` -##### `show_diff` +##### `show_diff` Data type: `Boolean` @@ -620,7 +773,7 @@ Whether to show the diff when updating dropin file Default value: ``true`` -##### `service_unit` +##### `service_unit` Data type: `Optional[Systemd::Unit]` @@ -630,7 +783,7 @@ as the timer unit with s/.timer/.service/ Default value: ``undef`` -##### `active` +##### `active` Data type: `Optional[Boolean]` @@ -640,7 +793,7 @@ explictly stopped and disabled. Default value: ``undef`` -##### `enable` +##### `enable` Data type: `Optional[Variant[Boolean, Enum['mask']]]` @@ -648,7 +801,7 @@ If set, will manage the state of the unit. Default value: ``undef`` -##### `ensure` +##### `ensure` Data type: `Enum['present', 'absent', 'file']` @@ -656,24 +809,40 @@ Data type: `Enum['present', 'absent', 'file']` Default value: `'present'` -### `systemd::tmpfile` +### `systemd::tmpfile` Creates a systemd tmpfile - * Mutually exclusive with ``$limits`` - * **See also** * systemd-tmpfiles(8) #### Parameters -The following parameters are available in the `systemd::tmpfile` defined type. +The following parameters are available in the `systemd::tmpfile` defined type: -##### `$ensure` +* [`name`](#name) +* [`ensure`](#ensure) +* [`path`](#path) +* [`content`](#content) +* [`source`](#source) +* [`filename`](#filename) + +##### `name` + +Data type: `Pattern['^[^/]+\.conf$']` + +(filename) +The name of the tmpfile to create + +##### `ensure` + +Data type: `Enum['present', 'absent', 'file']` Whether to drop a file or remove it -##### `path` +Default value: `'file'` + +##### `path` Data type: `Stdlib::Absolutepath` @@ -681,7 +850,7 @@ The path to the main systemd tmpfiles directory Default value: `'/etc/tmpfiles.d'` -##### `content` +##### `content` Data type: `Optional[String]` @@ -691,31 +860,87 @@ The literal content to write to the file Default value: ``undef`` -##### `source` +##### `source` Data type: `Optional[String]` A ``File`` resource compatible ``source`` +* Mutually exclusive with ``$limits`` + Default value: ``undef`` -##### `ensure` +##### `filename` + +Data type: `Systemd::Dropin` + + + +Default value: `$name` + +### `systemd::udev::rule` + +Adds a custom udev rule + +* **See also** + * udev(7) + +#### Parameters + +The following parameters are available in the `systemd::udev::rule` defined type: + +* [`name`](#name) +* [`ensure`](#ensure) +* [`path`](#path) +* [`selinux_ignore_defaults`](#selinux_ignore_defaults) +* [`notify_services`](#notify_services) +* [`rules`](#rules) + +##### `name` + +Data type: `Pattern['^.+\.rules$']` + +The name of the udev rules to create + +##### `ensure` Data type: `Enum['present', 'absent', 'file']` +Whether to drop a file or remove it +Default value: `'present'` -Default value: `'file'` +##### `path` -##### `filename` +Data type: `Stdlib::Absolutepath` -Data type: `Systemd::Dropin` +The path to the main systemd settings directory +Default value: `'/etc/udev/rules.d'` +##### `selinux_ignore_defaults` -Default value: `$name` +Data type: `Optional[Boolean]` + +If Puppet should ignore the default SELinux labels. + +Default value: ``false`` + +##### `notify_services` + +Data type: `Optional[Variant[Array, String]]` -### `systemd::unit_file` +List of services to notify when this rule is updated + +Default value: `[]` + +##### `rules` + +Data type: `Array` + +The literal udev rules you want to deploy + +### `systemd::unit_file` Creates a systemd unit file @@ -724,15 +949,29 @@ Creates a systemd unit file #### Parameters -The following parameters are available in the `systemd::unit_file` defined type. +The following parameters are available in the `systemd::unit_file` defined type: -##### `name` +* [`name`](#name) +* [`ensure`](#ensure) +* [`path`](#path) +* [`content`](#content) +* [`source`](#source) +* [`target`](#target) +* [`owner`](#owner) +* [`group`](#group) +* [`mode`](#mode) +* [`show_diff`](#show_diff) +* [`enable`](#enable) +* [`active`](#active) +* [`restart`](#restart) + +##### `name` Data type: `Pattern['^[^/]+\.(service|socket|device|mount|automount|swap|target|path|timer|slice|scope)$']` The target unit file to create -##### `ensure` +##### `ensure` Data type: `Enum['present', 'absent', 'file']` @@ -740,7 +979,7 @@ The state of the unit file to ensure Default value: `'present'` -##### `path` +##### `path` Data type: `Stdlib::Absolutepath` @@ -748,7 +987,7 @@ The main systemd configuration path Default value: `'/etc/systemd/system'` -##### `content` +##### `content` Data type: `Optional[String]` @@ -758,7 +997,7 @@ The full content of the unit file Default value: ``undef`` -##### `source` +##### `source` Data type: `Optional[String]` @@ -768,7 +1007,7 @@ The ``File`` resource compatible ``source`` Default value: ``undef`` -##### `target` +##### `target` Data type: `Optional[Stdlib::Absolutepath]` @@ -778,7 +1017,7 @@ If set, will force the file to be a symlink to the given target Default value: ``undef`` -##### `owner` +##### `owner` Data type: `String` @@ -786,7 +1025,7 @@ The owner to set on the unit file Default value: `'root'` -##### `group` +##### `group` Data type: `String` @@ -794,7 +1033,7 @@ The group to set on the unit file Default value: `'root'` -##### `mode` +##### `mode` Data type: `String` @@ -802,7 +1041,7 @@ The mode to set on the unit file Default value: `'0444'` -##### `show_diff` +##### `show_diff` Data type: `Boolean` @@ -810,7 +1049,7 @@ Whether to show the diff when updating unit file Default value: ``true`` -##### `enable` +##### `enable` Data type: `Optional[Variant[Boolean, Enum['mask']]]` @@ -818,7 +1057,7 @@ If set, will manage the unit enablement status. Default value: ``undef`` -##### `active` +##### `active` Data type: `Optional[Boolean]` @@ -826,9 +1065,17 @@ If set, will manage the state of the unit. Default value: ``undef`` +##### `restart` + +Data type: `Optional[String]` + +Specify a restart command manually. If left unspecified, a standard Puppet service restart happens. + +Default value: ``undef`` + ## Resource types -### `loginctl_user` +### `loginctl_user` An arbitrary name used as the identity of the resource. @@ -848,30 +1095,40 @@ Default value: `disabled` The following parameters are available in the `loginctl_user` type. -##### `name` +* [`name`](#name) +* [`provider`](#provider) + +##### `name` namevar An arbitrary name used as the identity of the resource. -##### `provider` +##### `provider` The specific backend to use for this `loginctl_user` resource. You will seldom need to specify this --- Puppet will usually discover the appropriate provider for your platform. ## Data types -### `Systemd::Dropin` +### `Systemd::Dropin` The Systemd::Dropin data type. -Alias of `Pattern['^[^/]+\.conf$']` +Alias of -### `Systemd::JournaldSettings` +```puppet +Pattern['^[^/]+\.conf$'] +``` + +### `Systemd::JournaldSettings` Matches Systemd journald config Struct -Alias of `Struct[{ +Alias of + +```puppet +Struct[{ Optional['Storage'] => Variant[Enum['volatile','persistent','auto','none'],Systemd::JournaldSettings::Ensure], Optional['Compress'] => Variant[Enum['yes','no'], Pattern[/^[0-9]+(K|M|G)?$/],Systemd::JournaldSettings::Ensure], Optional['Seal'] => Variant[Enum['yes','no'],Systemd::JournaldSettings::Ensure], @@ -902,19 +1159,27 @@ Alias of `Struct[{ Optional['ReadKMsg'] => Variant[Enum['yes','no'],Systemd::JournaldSettings::Ensure], Optional['TTYPath'] => Variant[Stdlib::Absolutepath,Systemd::JournaldSettings::Ensure], Optional['LineMax'] => Variant[Pattern[/^[0-9]+(K|M|G|T)?$/],Systemd::JournaldSettings::Ensure], - }]` + }] +``` -### `Systemd::JournaldSettings::Ensure` +### `Systemd::JournaldSettings::Ensure` The Systemd::JournaldSettings::Ensure data type. -Alias of `Struct[{ 'ensure' => Enum['present','absent'] }]` +Alias of -### `Systemd::LogindSettings` +```puppet +Struct[{ 'ensure' => Enum['present','absent'] }] +``` + +### `Systemd::LogindSettings` Matches Systemd Login Manager Struct -Alias of `Struct[{ +Alias of + +```puppet +Struct[{ Optional['HandleHibernateKey'] => Variant[Enum['ignore','poweroff','reboot','halt','kexec','suspend','hibernate','hybrid-sleep','suspend-then-hibernate','lock'],Systemd::LogindSettings::Ensure], Optional['HandleLidSwitch'] => Variant[Enum['ignore','poweroff','reboot','halt','kexec','suspend','hibernate','hybrid-sleep','suspend-then-hibernate','lock'],Systemd::LogindSettings::Ensure], Optional['HandleLidSwitchDocked'] => Variant[Enum['ignore','poweroff','reboot','halt','kexec','suspend','hibernate','hybrid-sleep','suspend-then-hibernate','lock'],Systemd::LogindSettings::Ensure], @@ -939,19 +1204,27 @@ Alias of `Struct[{ Optional['SessionsMax'] => Variant[Integer,Pattern['^(infinity|(\d+(K|M|G|T|P|E|%)?))$'],Systemd::LogindSettings::Ensure], Optional['SuspendKeyIgnoreInhibited'] => Variant[Enum['yes','no'],Systemd::LogindSettings::Ensure], Optional['UserTasksMax'] => Variant[Integer,Pattern['^(infinity|(\d+(K|M|G|T|P|E|%)?))$'],Systemd::LogindSettings::Ensure] - }]` + }] +``` -### `Systemd::LogindSettings::Ensure` +### `Systemd::LogindSettings::Ensure` The Systemd::LogindSettings::Ensure data type. -Alias of `Struct[{ 'ensure' => Enum['present','absent'] }]` +Alias of + +```puppet +Struct[{ 'ensure' => Enum['present','absent'] }] +``` -### `Systemd::ServiceLimits` +### `Systemd::ServiceLimits` Matches Systemd Service Limit Struct -Alias of `Struct[{ +Alias of + +```puppet +Struct[{ Optional['LimitCPU'] => Pattern['^\d+(s|m|h|d|w|M|y)?(:\d+(s|m|h|d|w|M|y)?)?$'], Optional['LimitFSIZE'] => Pattern['^(infinity|((\d+(K|M|G|T|P|E)(:\d+(K|M|G|T|P|E))?)))$'], Optional['LimitDATA'] => Pattern['^(infinity|((\d+(K|M|G|T|P|E)(:\d+(K|M|G|T|P|E))?)))$'], @@ -960,7 +1233,7 @@ Alias of `Struct[{ Optional['LimitRSS'] => Pattern['^(infinity|((\d+(K|M|G|T|P|E)(:\d+(K|M|G|T|P|E))?)))$'], Optional['LimitNOFILE'] => Variant[Integer[-1],Pattern['^(infinity|\d+(:(infinity|\d+))?)$']], Optional['LimitAS'] => Pattern['^(infinity|((\d+(K|M|G|T|P|E)(:\d+(K|M|G|T|P|E))?)))$'], - Optional['LimitNPROC'] => Integer[1], + Optional['LimitNPROC'] => Variant[Integer[-1],Pattern['^(infinity|\d+(:(infinity|\d+))?)$']], Optional['LimitMEMLOCK'] => Pattern['^(infinity|((\d+(K|M|G|T|P|E)(:\d+(K|M|G|T|P|E))?)))$'], Optional['LimitLOCKS'] => Integer[1], Optional['LimitSIGPENDING'] => Integer[1], @@ -992,11 +1265,16 @@ Alias of `Struct[{ Optional['Slice'] => String[1], Optional['Delegate'] => Boolean, Optional['OOMScoreAdjust'] => Integer[-1000,1000] - }]` + }] +``` -### `Systemd::Unit` +### `Systemd::Unit` The Systemd::Unit data type. -Alias of `Pattern['^[^/]+\.(service|socket|device|mount|automount|swap|target|path|timer|slice|scope)$']` +Alias of + +```puppet +Pattern['^[^/]+\.(service|socket|device|mount|automount|swap|target|path|timer|slice|scope)$'] +``` diff --git a/manifests/dropin_file.pp b/manifests/dropin_file.pp index f91cebec..7390963f 100644 --- a/manifests/dropin_file.pp +++ b/manifests/dropin_file.pp @@ -4,40 +4,40 @@ # # @see systemd.unit(5) # -# @attr name [Pattern['^[^/]+\.conf$']] +# @param name [Pattern['^[^/]+\.conf$']] # The target unit file to create # -# @attr path +# @param path # The main systemd configuration path # -# @attr selinux_ignore_defaults +# @param selinux_ignore_defaults # If Puppet should ignore the default SELinux labels. # -# @attr content +# @param content # The full content of the unit file # # * Mutually exclusive with ``$source`` # -# @attr source +# @param source # The ``File`` resource compatible ``source`` # # * Mutually exclusive with ``$content`` # -# @attr target +# @param target # If set, will force the file to be a symlink to the given target # # * Mutually exclusive with both ``$source`` and ``$content`` # -# @attr owner +# @param owner # The owner to set on the dropin file # -# @attr group +# @param group # The group to set on the dropin file # -# @attr mode +# @param mode # The mode to set on the dropin file # -# @attr show_diff +# @param show_diff # Whether to show the diff when updating dropin file # define systemd::dropin_file ( diff --git a/manifests/journald.pp b/manifests/journald.pp index 8e88c538..233f50f8 100644 --- a/manifests/journald.pp +++ b/manifests/journald.pp @@ -1,8 +1,6 @@ # @api private -# -# This class manages and configures journald. -# -# https://www.freedesktop.org/software/systemd/man/journald.conf.html +# @summary This class manages and configures journald. +# @see https://www.freedesktop.org/software/systemd/man/journald.conf.html class systemd::journald { assert_private() diff --git a/manifests/logind.pp b/manifests/logind.pp index b35f4a0c..5130c8c7 100644 --- a/manifests/logind.pp +++ b/manifests/logind.pp @@ -1,8 +1,6 @@ # @api private -# -# This class manages systemd's login manager configuration. -# -# https://www.freedesktop.org/software/systemd/man/logind.conf.html +# @summary This class manages systemd's login manager configuration. +# @see https://www.freedesktop.org/software/systemd/man/logind.conf.html class systemd::logind { assert_private() diff --git a/manifests/network.pp b/manifests/network.pp index e336ab21..dc5ba065 100644 --- a/manifests/network.pp +++ b/manifests/network.pp @@ -1,5 +1,4 @@ -# -- Define: systemd::network -# Creates network config for systemd-networkd +# @summary Creates network config for systemd-networkd define systemd::network ( Enum['file', 'absent'] $ensure = file, Stdlib::Absolutepath $path = '/etc/systemd/network', diff --git a/manifests/resolved.pp b/manifests/resolved.pp index a3a992f1..3b6e3eea 100644 --- a/manifests/resolved.pp +++ b/manifests/resolved.pp @@ -1,8 +1,8 @@ # @api private # -# This class provides an abstract way to trigger resolved. -# Each parameters correspond to resolved.conf(5): -# https://www.freedesktop.org/software/systemd/man/resolved.conf.html +# @summary This class provides an abstract way to trigger resolved. +# Each parameters correspond to resolved.conf(5) +# @see https://www.freedesktop.org/software/systemd/man/resolved.conf.html # # @param ensure # The state that the ``resolved`` service should be in diff --git a/manifests/service_limits.pp b/manifests/service_limits.pp index 53a6db76..d0048029 100644 --- a/manifests/service_limits.pp +++ b/manifests/service_limits.pp @@ -4,10 +4,10 @@ # # @see systemd.exec(5) # -# @attr name [Pattern['^.+\.(service|socket|mount|swap)$']] +# @param name [Pattern['^.+\.(service|socket|mount|swap)$']] # The name of the service that you will be modifying # -# @param $ensure +# @param ensure # Whether to drop a file or remove it # # @param path @@ -24,7 +24,7 @@ # @param source # A ``File`` resource compatible ``source`` # -# * Mutually exclusive with ``$limits`` +# * Mutually exclusive with ``$limits`` # # @param restart_service # Restart the managed service after setting the limits diff --git a/manifests/timesyncd.pp b/manifests/timesyncd.pp index 22d9481e..6a836051 100644 --- a/manifests/timesyncd.pp +++ b/manifests/timesyncd.pp @@ -5,7 +5,7 @@ # @param ensure # The state that the ``networkd`` service should be in # -# @param $ntp_server +# @param ntp_server # A space-separated list of NTP servers, will be combined with interface specific # addresses from systemd-networkd. requires puppetlabs-inifile # diff --git a/manifests/tmpfile.pp b/manifests/tmpfile.pp index 90a7d14a..9f9b1366 100644 --- a/manifests/tmpfile.pp +++ b/manifests/tmpfile.pp @@ -4,10 +4,10 @@ # # @see systemd-tmpfiles(8) # -# @attr name [Pattern['^[^/]+\.conf$']] (filename) +# @param name [Pattern['^[^/]+\.conf$']] (filename) # The name of the tmpfile to create # -# @param $ensure +# @param ensure # Whether to drop a file or remove it # # @param path @@ -21,7 +21,7 @@ # @param source # A ``File`` resource compatible ``source`` # -# * Mutually exclusive with ``$limits`` +# * Mutually exclusive with ``$limits`` # define systemd::tmpfile ( Enum['present', 'absent', 'file'] $ensure = 'file', diff --git a/manifests/udev/rule.pp b/manifests/udev/rule.pp index adf027db..d3180311 100644 --- a/manifests/udev/rule.pp +++ b/manifests/udev/rule.pp @@ -4,10 +4,10 @@ # # @see udev(7) # -# @attr name [Pattern['^.+\.rules$']] +# @param name [Pattern['^.+\.rules$']] # The name of the udev rules to create # -# @param $ensure +# @param ensure # Whether to drop a file or remove it # # @param path diff --git a/manifests/udevd.pp b/manifests/udevd.pp index 2fc9fd55..babbd541 100644 --- a/manifests/udevd.pp +++ b/manifests/udevd.pp @@ -1,8 +1,6 @@ # @api private -# -# This class manages systemd's udev config -# -# https://www.freedesktop.org/software/systemd/man/udev.conf.html +# @summary This class manages systemd's udev config +# @see https://www.freedesktop.org/software/systemd/man/udev.conf.html class systemd::udevd { assert_private() From 81f3eb5e7612e50726fa8450ca161bbe271419a1 Mon Sep 17 00:00:00 2001 From: Ewoud Kohl van Wijngaarden Date: Mon, 26 Apr 2021 17:56:16 +0200 Subject: [PATCH 03/17] Add notify_service support to dropin_file (#191) It is very common that a drop in file should notify a service that's managed elsewhere. This adds a parameter to do so which then uses a collector. --- REFERENCE.md | 9 +++++++++ manifests/dropin_file.pp | 18 ++++++++++++++++-- spec/defines/dropin_file_spec.rb | 30 ++++++++++++++++++++++++++++++ 3 files changed, 55 insertions(+), 2 deletions(-) diff --git a/REFERENCE.md b/REFERENCE.md index 04bf5dfe..a72e4d13 100644 --- a/REFERENCE.md +++ b/REFERENCE.md @@ -374,6 +374,7 @@ The following parameters are available in the `systemd::dropin_file` defined typ * [`group`](#group) * [`mode`](#mode) * [`show_diff`](#show_diff) +* [`notify_service`](#notify_service) * [`unit`](#unit) * [`filename`](#filename) * [`ensure`](#ensure) @@ -462,6 +463,14 @@ Whether to show the diff when updating dropin file Default value: ``true`` +##### `notify_service` + +Data type: `Boolean` + +Notify a service for the unit, if it exists + +Default value: ``false`` + ##### `unit` Data type: `Systemd::Unit` diff --git a/manifests/dropin_file.pp b/manifests/dropin_file.pp index 7390963f..326fc7ae 100644 --- a/manifests/dropin_file.pp +++ b/manifests/dropin_file.pp @@ -40,6 +40,9 @@ # @param show_diff # Whether to show the diff when updating dropin file # +# @param notify_service +# Notify a service for the unit, if it exists +# define systemd::dropin_file ( Systemd::Unit $unit, Systemd::Dropin $filename = $name, @@ -53,6 +56,7 @@ String $group = 'root', String $mode = '0444', Boolean $show_diff = true, + Boolean $notify_service = false, ) { include systemd @@ -65,8 +69,10 @@ } } + $full_filename = "${path}/${unit}.d/${filename}" + if $ensure != 'absent' { - ensure_resource('file', "${path}/${unit}.d", { + ensure_resource('file', dirname($full_filename), { ensure => directory, owner => 'root', group => 'root', @@ -76,7 +82,7 @@ }) } - file { "${path}/${unit}.d/${filename}": + file { $full_filename: ensure => $_ensure, content => $content, source => $source, @@ -87,4 +93,12 @@ selinux_ignore_defaults => $selinux_ignore_defaults, show_diff => $show_diff, } + + if $notify_service { + File[$full_filename] ~> Service <| title == $unit or name == $unit |> + if $unit =~ /\.service$/ { + $short_service_name = regsubst($unit, /\.service$/, '') + File[$full_filename] ~> Service <| title == $short_service_name or name == $short_service_name |> + } + } } diff --git a/spec/defines/dropin_file_spec.rb b/spec/defines/dropin_file_spec.rb index 2c38ac76..27971a39 100644 --- a/spec/defines/dropin_file_spec.rb +++ b/spec/defines/dropin_file_spec.rb @@ -35,6 +35,36 @@ ) } + context 'notifies services' do + let(:params) do + super().merge(notify_service: true) + end + let(:filename) { "/etc/systemd/system/#{params[:unit]}.d/#{title}" } + let(:pre_condition) do + <<-PUPPET + service { ['test', 'test.service']: + } + PUPPET + end + + it { is_expected.to compile.with_all_deps } + it { is_expected.to contain_service('test').that_subscribes_to("File[#{filename}]") } + it { is_expected.to contain_service('test.service').that_subscribes_to("File[#{filename}]") } + + context 'with overridden name' do + let(:pre_condition) do + <<-PUPPET + service { 'myservice': + name => 'test', + } + PUPPET + end + + it { is_expected.to compile.with_all_deps } + it { is_expected.to contain_service('myservice').that_subscribes_to("File[#{filename}]") } + end + end + context 'with selinux_ignore_defaults set to true' do let(:params) do super().merge(selinux_ignore_defaults: true) From 7b5b81a70565a33a31e112ad34c8b5c02875308c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Pinson?= Date: Mon, 14 Jun 2021 09:54:03 +0200 Subject: [PATCH 04/17] feat(README): add transfer notice --- README.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ae179ba9..29fc3aef 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,8 @@ [![Puppet Forge Downloads](http://img.shields.io/puppetforge/dt/camptocamp/systemd.svg)](https://forge.puppetlabs.com/camptocamp/systemd) [![Build Status](https://travis-ci.org/camptocamp/puppet-systemd.png?branch=master)](https://travis-ci.org/camptocamp/puppet-systemd) [![Puppet Forge Endorsement](https://img.shields.io/puppetforge/e/camptocamp/systemd.svg)](https://forge.puppetlabs.com/camptocamp/systemd) -[![By Camptocamp](https://img.shields.io/badge/by-camptocamp-fb7047.svg)](http://www.camptocamp.com) +[![Donated by Camptocamp](https://img.shields.io/badge/donated%20by-camptocamp-fb7047.svg)](#transfer-notice) + ## Overview @@ -367,3 +368,12 @@ loginctl_user { 'foo': ``` or as a hash via the `systemd::loginctl_users` parameter. + + +## Transfer Notice + +This plugin was originally authored by [Camptocamp](http://www.camptocamp.com). +The maintainer preferred that Puppet Community take ownership of the module for future improvement and maintenance. +Existing pull requests and issues were transferred over, please fork and continue to contribute here instead of Camptocamp. + +Previously: https://github.com/camptocamp/puppet-systemd From f184b624f3bbe8544df9105ea058b6fa8c13e079 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Pinson?= Date: Mon, 14 Jun 2021 10:30:23 +0200 Subject: [PATCH 05/17] feat(metadata): move metadata.json to Vox Pupuli MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Raphaël Pinson --- metadata.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/metadata.json b/metadata.json index c3e27133..f1e2172a 100644 --- a/metadata.json +++ b/metadata.json @@ -1,12 +1,12 @@ { - "name": "camptocamp-systemd", + "name": "puppet-systemd", "version": "3.0.0", - "author": "camptocamp", + "author": "Vox Pupuli", "summary": "Puppet Systemd module", "license": "Apache-2.0", - "source": "https://github.com/camptocamp/puppet-systemd", - "project_page": "https://github.com/camptocamp/puppet-systemd", - "issues_url": "https://github.com/camptocamp/puppet-systemd/issues", + "source": "https://github.com/voxpupuli/puppet-systemd", + "project_page": "https://github.com/voxpupuli/puppet-systemd", + "issues_url": "https://github.com/voxpupuli/puppet-systemd/issues", "dependencies": [ { "name": "puppetlabs/stdlib", From a41daa0b47325077d776ed18b10ede39cc1da94f Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Mon, 14 Jun 2021 09:43:03 +0200 Subject: [PATCH 06/17] modulesync 4.1.0 --- .editorconfig | 14 ++ .github/CONTRIBUTING.md | 252 +++++++++++++++++++++++++++++++ .github/ISSUE_TEMPLATE.md | 26 ++++ .github/PULL_REQUEST_TEMPLATE.md | 20 +++ .github/SECURITY.md | 3 + .github/workflows/ci.yml | 51 +++++++ .github/workflows/release.yml | 29 ++++ .gitignore | 45 +++--- .msync.yml | 2 + .overcommit.yml | 64 ++++++++ .pmtignore | 34 +++++ .rspec | 2 +- .rspec_parallel | 1 + .rubocop.yml | 139 +---------------- .travis.yml | 60 -------- .yardopts | 1 + Dockerfile | 21 +++ Gemfile | 82 +++------- Rakefile | 125 ++++++--------- spec/default_facts.yml | 8 - spec/spec_helper.rb | 75 ++------- 21 files changed, 626 insertions(+), 428 deletions(-) create mode 100644 .editorconfig create mode 100644 .github/CONTRIBUTING.md create mode 100644 .github/ISSUE_TEMPLATE.md create mode 100644 .github/PULL_REQUEST_TEMPLATE.md create mode 100644 .github/SECURITY.md create mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/release.yml create mode 100644 .msync.yml create mode 100644 .overcommit.yml create mode 100644 .pmtignore create mode 100644 .rspec_parallel delete mode 100644 .travis.yml create mode 100644 Dockerfile delete mode 100644 spec/default_facts.yml diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 00000000..d77700e3 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,14 @@ +# editorconfig.org + +# MANAGED BY MODULESYNC + +root = true + +[*] +charset = utf-8 +end_of_line = lf +indent_size = 2 +tab_width = 2 +indent_style = space +insert_final_newline = true +trim_trailing_whitespace = true diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md new file mode 100644 index 00000000..887d571a --- /dev/null +++ b/.github/CONTRIBUTING.md @@ -0,0 +1,252 @@ +# Contribution guidelines + +## Table of contents + +* [Contributing](#contributing) +* [Writing proper commits - short version](#writing-proper-commits-short-version) +* [Writing proper commits - long version](#writing-proper-commits-long-version) +* [Dependencies](#dependencies) + * [Note for OS X users](#note-for-os-x-users) +* [The test matrix](#the-test-matrix) +* [Syntax and style](#syntax-and-style) +* [Running the unit tests](#running-the-unit-tests) +* [Unit tests in docker](#unit-tests-in-docker) +* [Integration tests](#integration-tests) + +This module has grown over time based on a range of contributions from +people using it. If you follow these contributing guidelines your patch +will likely make it into a release a little more quickly. + +## Contributing + +Please note that this project is released with a Contributor Code of Conduct. +By participating in this project you agree to abide by its terms. +[Contributor Code of Conduct](https://voxpupuli.org/coc/). + +* Fork the repo. +* Create a separate branch for your change. +* We only take pull requests with passing tests, and documentation. [travis-ci](http://travis-ci.org) runs the tests for us. You can also execute them locally. This is explained [in a later section](#the-test-matrix). +* Checkout [our docs](https://voxpupuli.org/docs/reviewing_pr/) we use to review a module and the [official styleguide](https://puppet.com/docs/puppet/6.0/style_guide.html). They provide some guidance for new code that might help you before you submit a pull request. +* Add a test for your change. Only refactoring and documentation changes require no new tests. If you are adding functionality or fixing a bug, please add a test. +* Squash your commits down into logical components. Make sure to rebase against our current master. +* Push the branch to your fork and submit a pull request. + +Please be prepared to repeat some of these steps as our contributors review your code. + +Also consider sending in your profile code that calls this component module as an acceptance test or provide it via an issue. This helps reviewers a lot to test your use case and prevents future regressions! + +## Writing proper commits - short version + +* Make commits of logical units. +* Check for unnecessary whitespace with "git diff --check" before committing. +* Commit using Unix line endings (check the settings around "crlf" in git-config(1)). +* Do not check in commented out code or unneeded files. +* The first line of the commit message should be a short description (50 characters is the soft limit, excluding ticket number(s)), and should skip the full stop. +* Associate the issue in the message. The first line should include the issue number in the form "(#XXXX) Rest of message". +* The body should provide a meaningful commit message, which: + *uses the imperative, present tense: `change`, not `changed` or `changes`. + * includes motivation for the change, and contrasts its implementation with the previous behavior. + * Make sure that you have tests for the bug you are fixing, or feature you are adding. + * Make sure the test suites passes after your commit: + * When introducing a new feature, make sure it is properly documented in the README.md + +## Writing proper commits - long version + + 1. Make separate commits for logically separate changes. + + Please break your commits down into logically consistent units + which include new or changed tests relevant to the rest of the + change. The goal of doing this is to make the diff easier to + read for whoever is reviewing your code. In general, the easier + your diff is to read, the more likely someone will be happy to + review it and get it into the code base. + + If you are going to refactor a piece of code, please do so as a + separate commit from your feature or bug fix changes. + + We also really appreciate changes that include tests to make + sure the bug is not re-introduced, and that the feature is not + accidentally broken. + + Describe the technical detail of the change(s). If your + description starts to get too long, that is a good sign that you + probably need to split up your commit into more finely grained + pieces. + + Commits which plainly describe the things which help + reviewers check the patch and future developers understand the + code are much more likely to be merged in with a minimum of + bike-shedding or requested changes. Ideally, the commit message + would include information, and be in a form suitable for + inclusion in the release notes for the version of Puppet that + includes them. + + Please also check that you are not introducing any trailing + whitespace or other "whitespace errors". You can do this by + running "git diff --check" on your changes before you commit. + + 2. Sending your patches + + To submit your changes via a GitHub pull request, we _highly_ + recommend that you have them on a topic branch, instead of + directly on `master`. + It makes things much easier to keep track of, especially if + you decide to work on another thing before your first change + is merged in. + + GitHub has some pretty good + [general documentation](http://help.github.com/) on using + their site. They also have documentation on + [creating pull requests](http://help.github.com/send-pull-requests/). + + In general, after pushing your topic branch up to your + repository on GitHub, you can switch to the branch in the + GitHub UI and click "Pull Request" towards the top of the page + in order to open a pull request. + + + 3. Update the related GitHub issue. + + If there is a GitHub issue associated with the change you + submitted, then you should update the ticket to include the + location of your branch, along with any other commentary you + may wish to make. + +## Dependencies + +The testing and development tools have a bunch of dependencies, +all managed by [bundler](http://bundler.io/) according to the +[Puppet support matrix](http://docs.puppetlabs.com/guides/platforms.html#ruby-versions). + +By default the tests use a baseline version of Puppet. + +If you have Ruby 2.x or want a specific version of Puppet, +you must set an environment variable such as: + +```sh +export PUPPET_VERSION="~> 5.5.6" +``` + +You can install all needed gems for spec tests into the modules directory by +running: + +```sh +bundle install --path .vendor/ --without development system_tests release --jobs "$(nproc)" +``` + +If you also want to run acceptance tests: + +```sh +bundle install --path .vendor/ --with system_tests --without development release --jobs "$(nproc)" +``` + +Our all in one solution if you don't know if you need to install or update gems: + +```sh +bundle install --path .vendor/ --with system_tests --without development release --jobs "$(nproc)"; bundle update; bundle clean +``` + +As an alternative to the `--jobs "$(nproc)` parameter, you can set an +environment variable: + +```sh +BUNDLE_JOBS="$(nproc)" +``` + +### Note for OS X users + +`nproc` isn't a valid command under OS x. As an alternative, you can do: + +```sh +--jobs "$(sysctl -n hw.ncpu)" +``` + +## The test matrix + +### Syntax and style + +The test suite will run [Puppet Lint](http://puppet-lint.com/) and +[Puppet Syntax](https://github.com/gds-operations/puppet-syntax) to +check various syntax and style things. You can run these locally with: + +```sh +bundle exec rake lint +bundle exec rake validate +``` + +It will also run some [Rubocop](http://batsov.com/rubocop/) tests +against it. You can run those locally ahead of time with: + +```sh +bundle exec rake rubocop +``` + +### Running the unit tests + +The unit test suite covers most of the code, as mentioned above please +add tests if you're adding new functionality. If you've not used +[rspec-puppet](http://rspec-puppet.com/) before then feel free to ask +about how best to test your new feature. + +To run the linter, the syntax checker and the unit tests: + +```sh +bundle exec rake test +``` + +To run your all the unit tests + +```sh +bundle exec rake spec +``` + +To run a specific spec test set the `SPEC` variable: + +```sh +bundle exec rake spec SPEC=spec/foo_spec.rb +``` + +#### Unit tests in docker + +Some people don't want to run the dependencies locally or don't want to install +ruby. We ship a Dockerfile that enables you to run all unit tests and linting. +You only need to run: + +```sh +docker build . +``` + +Please ensure that a docker daemon is running and that your user has the +permission to talk to it. You can specify a remote docker host by setting the +`DOCKER_HOST` environment variable. it will copy the content of the module into +the docker image. So it will not work if a Gemfile.lock exists. + +### Integration tests + +The unit tests just check the code runs, not that it does exactly what +we want on a real machine. For that we're using +[beaker](https://github.com/puppetlabs/beaker). + +This fires up a new virtual machine (using vagrant) and runs a series of +simple tests against it after applying the module. You can run this +with: + +```sh +BEAKER_setfile=debian10-x64 bundle exec rake beaker +``` + +You can replace the string `debian10` with any common operating system. +The following strings are known to work: + +* ubuntu1604 +* ubuntu1804 +* ubuntu2004 +* debian9 +* debian10 +* centos7 +* centos8 + +For more information and tips & tricks, see [voxpupuli-acceptance's documentation](https://github.com/voxpupuli/voxpupuli-acceptance#running-tests). + +The source of this file is in our [modulesync_config](https://github.com/voxpupuli/modulesync_config/blob/master/moduleroot/.github/CONTRIBUTING.md.erb) +repository. diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md new file mode 100644 index 00000000..593e7aa8 --- /dev/null +++ b/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,26 @@ + + +## Affected Puppet, Ruby, OS and module versions/distributions + +- Puppet: +- Ruby: +- Distribution: +- Module version: + +## How to reproduce (e.g Puppet code you use) + +## What are you seeing + +## What behaviour did you expect instead + +## Output log + +## Any additional information you'd like to impart diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 00000000..342807bc --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,20 @@ + +#### Pull Request (PR) description + + +#### This Pull Request (PR) fixes the following issues + diff --git a/.github/SECURITY.md b/.github/SECURITY.md new file mode 100644 index 00000000..cacadf22 --- /dev/null +++ b/.github/SECURITY.md @@ -0,0 +1,3 @@ +# Vox Pupuli Security Policy + +Our vulnerabilities reporting process is at https://voxpupuli.org/security/ diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..5c6f410c --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,51 @@ +name: CI + +on: pull_request + +jobs: + setup_matrix: + name: 'Setup Test Matrix' + runs-on: ubuntu-latest + timeout-minutes: 40 + outputs: + beaker_setfiles: ${{ steps.get-outputs.outputs.beaker_setfiles }} + puppet_major_versions: ${{ steps.get-outputs.outputs.puppet_major_versions }} + puppet_unit_test_matrix: ${{ steps.get-outputs.outputs.puppet_unit_test_matrix }} + env: + BUNDLE_WITHOUT: development:release + steps: + - uses: actions/checkout@v2 + - name: Setup ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: '2.7' + bundler-cache: true + - name: Run rake validate + run: bundle exec rake validate + - name: Run rake rubocop + run: bundle exec rake rubocop + - name: Setup Test Matrix + id: get-outputs + run: bundle exec metadata2gha --use-fqdn --pidfile-workaround false + + unit: + needs: setup_matrix + runs-on: ubuntu-latest + timeout-minutes: 40 + strategy: + fail-fast: false + matrix: + include: ${{fromJson(needs.setup_matrix.outputs.puppet_unit_test_matrix)}} + env: + BUNDLE_WITHOUT: development:system_tests:release + PUPPET_VERSION: "~> ${{ matrix.puppet }}.0" + name: Puppet ${{ matrix.puppet }} (Ruby ${{ matrix.ruby }}) + steps: + - uses: actions/checkout@v2 + - name: Setup ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby }} + bundler-cache: true + - name: Run tests + run: bundle exec rake diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..68b85284 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,29 @@ +name: Release + +on: + push: + tags: + - '*' + +env: + BUNDLE_WITHOUT: development:test:system_tests + +jobs: + deploy: + name: 'deploy to forge' + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v2 + - name: Setup Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: '2.7' + bundler-cache: true + - name: Build and Deploy + env: + # Configure secrets here: + # https://docs.github.com/en/free-pro-team@latest/actions/reference/encrypted-secrets + BLACKSMITH_FORGE_USERNAME: '${{ secrets.PUPPET_FORGE_USERNAME }}' + BLACKSMITH_FORGE_API_KEY: '${{ secrets.PUPPET_FORGE_API_KEY }}' + run: bundle exec rake module:push diff --git a/.gitignore b/.gitignore index 2767022c..e9b3cf4b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,27 +1,20 @@ -.git/ -.*.sw[op] -.metadata -.yardoc -.yardwarns +pkg/ +Gemfile.lock +Gemfile.local +vendor/ +.vendor/ +spec/fixtures/manifests/ +spec/fixtures/modules/ +.vagrant/ +.bundle/ +.ruby-version +coverage/ +log/ +.idea/ +.dependencies/ +.librarian/ +Puppetfile.lock *.iml -/.bundle/ -/.idea/ -/.vagrant/ -/coverage/ -/bin/ -/doc/ -/Gemfile.local -/Gemfile.lock -/junit/ -/log/ -/pkg/ -/spec/fixtures/manifests/ -/spec/fixtures/modules/ -/tmp/ -/vendor/ -/convert_report.txt -/update_report.txt -.DS_Store -.project -.envrc -/inventory.yaml +.*.sw? +.yardoc/ +Guardfile diff --git a/.msync.yml b/.msync.yml new file mode 100644 index 00000000..57ff5038 --- /dev/null +++ b/.msync.yml @@ -0,0 +1,2 @@ +--- +modulesync_config_version: '4.1.0' diff --git a/.overcommit.yml b/.overcommit.yml new file mode 100644 index 00000000..0af0fdc0 --- /dev/null +++ b/.overcommit.yml @@ -0,0 +1,64 @@ +# Managed by https://github.com/voxpupuli/modulesync_configs +# +# Hooks are only enabled if you take action. +# +# To enable the hooks run: +# +# ``` +# bundle exec overcommit --install +# # ensure .overcommit.yml does not harm to you and then +# bundle exec overcommit --sign +# ``` +# +# (it will manage the .git/hooks directory): +# +# Examples howto skip a test for a commit or push: +# +# ``` +# SKIP=RuboCop git commit +# SKIP=PuppetLint git commit +# SKIP=RakeTask git push +# ``` +# +# Don't invoke overcommit at all: +# +# ``` +# OVERCOMMIT_DISABLE=1 git commit +# ``` +# +# Read more about overcommit: https://github.com/brigade/overcommit +# +# To manage this config yourself in your module add +# +# ``` +# .overcommit.yml: +# unmanaged: true +# ``` +# +# to your modules .sync.yml config +--- +PreCommit: + RuboCop: + enabled: true + description: 'Runs rubocop on modified files only' + command: ['bundle', 'exec', 'rubocop'] + PuppetLint: + enabled: true + description: 'Runs puppet-lint on modified files only' + command: ['bundle', 'exec', 'puppet-lint'] + YamlSyntax: + enabled: true + JsonSyntax: + enabled: true + TrailingWhitespace: + enabled: true + +PrePush: + RakeTarget: + enabled: true + description: 'Run rake targets' + targets: + - 'validate' + - 'test' + - 'rubocop' + command: ['bundle', 'exec', 'rake'] diff --git a/.pmtignore b/.pmtignore new file mode 100644 index 00000000..33a8c65d --- /dev/null +++ b/.pmtignore @@ -0,0 +1,34 @@ +docs/ +pkg/ +Gemfile +Gemfile.lock +Gemfile.local +vendor/ +.vendor/ +spec/ +Rakefile +.vagrant/ +.bundle/ +.ruby-version +coverage/ +log/ +.idea/ +.dependencies/ +.github/ +.librarian/ +Puppetfile.lock +*.iml +.editorconfig +.fixtures.yml +.gitignore +.msync.yml +.overcommit.yml +.pmtignore +.rspec +.rspec_parallel +.rubocop.yml +.sync.yml +.*.sw? +.yardoc/ +.yardopts +Dockerfile diff --git a/.rspec b/.rspec index 16f9cdb0..8c18f1ab 100644 --- a/.rspec +++ b/.rspec @@ -1,2 +1,2 @@ ---color --format documentation +--color diff --git a/.rspec_parallel b/.rspec_parallel new file mode 100644 index 00000000..e4d136b7 --- /dev/null +++ b/.rspec_parallel @@ -0,0 +1 @@ +--format progress diff --git a/.rubocop.yml b/.rubocop.yml index 37577d8d..198a3599 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,138 +1,3 @@ --- -# yamllint disable rule:line-length rule:indentation -require: -- rubocop-rspec -- rubocop-i18n -AllCops: - DisplayCopNames: true - TargetRubyVersion: '2.1' - Include: - - "./**/*.rb" - Exclude: - - bin/* - - ".vendor/**/*" - - "**/Gemfile" - - "**/Rakefile" - - pkg/**/* - - spec/fixtures/**/* - - vendor/**/* - - "**/Puppetfile" - - "**/Vagrantfile" - - "**/Guardfile" -Metrics/LineLength: - Description: People have wide screens, use them. - Max: 200 -GetText: - Enabled: false -GetText/DecorateString: - Description: We don't want to decorate test output. - Exclude: - - spec/**/* - Enabled: false -RSpec/BeforeAfterAll: - Description: Beware of using after(:all) as it may cause state to leak between tests. - A necessary evil in acceptance testing. - Exclude: - - spec/acceptance/**/*.rb -RSpec/HookArgument: - Description: Prefer explicit :each argument, matching existing module's style - EnforcedStyle: each -Style/BlockDelimiters: - Description: Prefer braces for chaining. Mostly an aesthetical choice. Better to - be consistent then. - EnforcedStyle: braces_for_chaining -Style/BracesAroundHashParameters: - Description: Braces are required by Ruby 2.7. Cop removed from RuboCop v0.80.0. - See https://github.com/rubocop-hq/rubocop/pull/7643 - Enabled: true -Style/ClassAndModuleChildren: - Description: Compact style reduces the required amount of indentation. - EnforcedStyle: compact -Style/EmptyElse: - Description: Enforce against empty else clauses, but allow `nil` for clarity. - EnforcedStyle: empty -Style/FormatString: - Description: Following the main puppet project's style, prefer the % format format. - EnforcedStyle: percent -Style/FormatStringToken: - Description: Following the main puppet project's style, prefer the simpler template - tokens over annotated ones. - EnforcedStyle: template -Style/Lambda: - Description: Prefer the keyword for easier discoverability. - EnforcedStyle: literal -Style/RegexpLiteral: - Description: Community preference. See https://github.com/voxpupuli/modulesync_config/issues/168 - EnforcedStyle: percent_r -Style/TernaryParentheses: - Description: Checks for use of parentheses around ternary conditions. Enforce parentheses - on complex expressions for better readability, but seriously consider breaking - it up. - EnforcedStyle: require_parentheses_when_complex -Style/TrailingCommaInArguments: - Description: Prefer always trailing comma on multiline argument lists. This makes - diffs, and re-ordering nicer. - EnforcedStyleForMultiline: comma -Style/TrailingCommaInLiteral: - Description: Prefer always trailing comma on multiline literals. This makes diffs, - and re-ordering nicer. - EnforcedStyleForMultiline: comma -Style/SymbolArray: - Description: Using percent style obscures symbolic intent of array's contents. - EnforcedStyle: brackets -RSpec/MessageSpies: - EnforcedStyle: receive -Style/Documentation: - Exclude: - - lib/puppet/parser/functions/**/* - - spec/**/* -Style/WordArray: - EnforcedStyle: brackets -Style/CollectionMethods: - Enabled: true -Style/MethodCalledOnDoEndBlock: - Enabled: true -Style/StringMethods: - Enabled: true -GetText/DecorateFunctionMessage: - Enabled: false -GetText/DecorateStringFormattingUsingInterpolation: - Enabled: false -GetText/DecorateStringFormattingUsingPercent: - Enabled: false -Layout/EndOfLine: - Enabled: false -Layout/IndentHeredoc: - Enabled: false -Metrics/AbcSize: - Enabled: false -Metrics/BlockLength: - Enabled: false -Metrics/ClassLength: - Enabled: false -Metrics/CyclomaticComplexity: - Enabled: false -Metrics/MethodLength: - Enabled: false -Metrics/ModuleLength: - Enabled: false -Metrics/ParameterLists: - Enabled: false -Metrics/PerceivedComplexity: - Enabled: false -RSpec/DescribeClass: - Enabled: false -RSpec/ExampleLength: - Enabled: false -RSpec/MessageExpectation: - Enabled: false -RSpec/MultipleExpectations: - Enabled: false -RSpec/NestedGroups: - Enabled: false -Style/AsciiComments: - Enabled: false -Style/IfUnlessModifier: - Enabled: false -Style/SymbolProc: - Enabled: false +inherit_gem: + voxpupuli-test: rubocop.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index ef5370ff..00000000 --- a/.travis.yml +++ /dev/null @@ -1,60 +0,0 @@ ---- -# yamllint disable rule:line-length rule:truthy -os: linux -dist: xenial -language: ruby -cache: bundler -before_install: - - bundle -v - - rm -f Gemfile.lock - - "# Update system gems if requested. This is useful to temporarily workaround troubles in the test runner" - - "# See https://github.com/puppetlabs/pdk-templates/commit/705154d5c437796b821691b707156e1b056d244f for an example of how this was used" - - "# Ignore exit code of SIGPIPE'd yes to not fail with shell's pipefail set" - - '[ -z "$RUBYGEMS_VERSION" ] || (yes || true) | gem update --system $RUBYGEMS_VERSION' - - gem --version - - bundle -v -script: - - 'bundle exec rake $CHECK' -bundler_args: --without system_tests -rvm: - - 2.5.7 -stages: - - static - - spec - - acceptance - - - if: tag =~ ^\d - name: deploy -jobs: - fast_finish: true - include: - - - env: CHECK="check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop syntax lint metadata_lint" - stage: static - - - env: PUPPET_GEM_VERSION="~> 6.0" CHECK=parallel_spec - rvm: 2.5.7 - stage: spec - - - env: PUPPET_GEM_VERSION="~> 7.0" CHECK=parallel_spec - rvm: 2.7.2 - stage: spec - - - env: DEPLOY_TO_FORGE=yes - stage: deploy -branches: - only: - - master - - /^v\d/ - - /^\d/ -notifications: - email: false -deploy: - provider: puppetforge - username: camptocamp - password: - secure: "ASTRdmLjJNa1NvHy2LRGvmvUeth6W3Fh/alYWvcvI8nDDsdkweHk0iXhcXZwtMQReb0NI5vJiRNXNy7a3XySC4+SP3hfHuDU58H2FqC4Ff0EHRPRHTEiXf7xmN53RxXYXZQvrFfqUb6tIsBNVKVmsYWNe01k8NVKPyYDfQB75PQ=" - on: - tags: true - all_branches: true - condition: "$DEPLOY_TO_FORGE = yes" diff --git a/.yardopts b/.yardopts index 29c933bc..3687f518 100644 --- a/.yardopts +++ b/.yardopts @@ -1 +1,2 @@ --markup markdown +--output-dir docs/ diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..a51c6416 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,21 @@ +FROM ruby:2.7 + +WORKDIR /opt/puppet + +# https://github.com/puppetlabs/puppet/blob/06ad255754a38f22fb3a22c7c4f1e2ce453d01cb/lib/puppet/provider/service/runit.rb#L39 +RUN mkdir -p /etc/sv + +ARG PUPPET_VERSION="~> 6.0" +ARG PARALLEL_TEST_PROCESSORS=4 + +# Cache gems +COPY Gemfile . +RUN bundle install --without system_tests development release --path=${BUNDLE_PATH:-vendor/bundle} + +COPY . . + +RUN bundle install +RUN bundle exec rake release_checks + +# Container should not saved +RUN exit 1 diff --git a/Gemfile b/Gemfile index edfb34af..de2780e9 100644 --- a/Gemfile +++ b/Gemfile @@ -1,73 +1,33 @@ -source ENV['GEM_SOURCE'] || 'https://rubygems.org' +source ENV['GEM_SOURCE'] || "https://rubygems.org" -def location_for(place_or_version, fake_version = nil) - git_url_regex = %r{\A(?(https?|git)[:@][^#]*)(#(?.*))?} - file_url_regex = %r{\Afile:\/\/(?.*)} - - if place_or_version && (git_url = place_or_version.match(git_url_regex)) - [fake_version, { git: git_url[:url], branch: git_url[:branch], require: false }].compact - elsif place_or_version && (file_url = place_or_version.match(file_url_regex)) - ['>= 0', { path: File.expand_path(file_url[:path]), require: false }] - else - [place_or_version, { require: false }] - end +group :test do + gem 'voxpupuli-test', '~> 2.1', :require => false + gem 'coveralls', :require => false + gem 'simplecov-console', :require => false end -ruby_version_segments = Gem::Version.new(RUBY_VERSION.dup).segments -minor_version = ruby_version_segments[0..1].join('.') - group :development do - gem "fast_gettext", '1.1.0', require: false if Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new('2.1.0') - gem "fast_gettext", require: false if Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.1.0') - gem "json_pure", '<= 2.0.1', require: false if Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new('2.0.0') - gem "json", '= 1.8.1', require: false if Gem::Version.new(RUBY_VERSION.dup) == Gem::Version.new('2.1.9') - gem "json", '= 2.0.4', require: false if Gem::Requirement.create('~> 2.4.2').satisfied_by?(Gem::Version.new(RUBY_VERSION.dup)) - gem "json", '= 2.1.0', require: false if Gem::Requirement.create(['>= 2.5.0', '< 2.7.0']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup)) - gem "rb-readline", '= 0.5.5', require: false, platforms: [:mswin, :mingw, :x64_mingw] - gem "puppet-module-posix-default-r#{minor_version}", '~> 0.4', require: false, platforms: [:ruby] - gem "puppet-module-posix-dev-r#{minor_version}", '~> 0.4', require: false, platforms: [:ruby] - gem "puppet-module-win-default-r#{minor_version}", '~> 0.4', require: false, platforms: [:mswin, :mingw, :x64_mingw] - gem "puppet-module-win-dev-r#{minor_version}", '~> 0.4', require: false, platforms: [:mswin, :mingw, :x64_mingw] - gem "github_changelog_generator", require: false + gem 'guard-rake', :require => false + gem 'overcommit', '>= 0.39.1', :require => false end -puppet_version = ENV['PUPPET_GEM_VERSION'] -facter_version = ENV['FACTER_GEM_VERSION'] -hiera_version = ENV['HIERA_GEM_VERSION'] - -gems = {} - -gems['puppet'] = location_for(puppet_version) - -# If facter or hiera versions have been specified via the environment -# variables - -gems['facter'] = location_for(facter_version) if facter_version -gems['hiera'] = location_for(hiera_version) if hiera_version - -if Gem.win_platform? && puppet_version =~ %r{^(file:///|git://)} - # If we're using a Puppet gem on Windows which handles its own win32-xxx gem - # dependencies (>= 3.5.0), set the maximum versions (see PUP-6445). - gems['win32-dir'] = ['<= 0.4.9', require: false] - gems['win32-eventlog'] = ['<= 0.6.5', require: false] - gems['win32-process'] = ['<= 0.7.5', require: false] - gems['win32-security'] = ['<= 0.2.5', require: false] - gems['win32-service'] = ['0.8.8', require: false] +group :system_tests do + gem 'puppet_metadata', '~> 0.3.0', :require => false + gem 'voxpupuli-acceptance', :require => false end -gems.each do |gem_name, gem_params| - gem gem_name, *gem_params +group :release do + gem 'github_changelog_generator', '>= 1.16.1', :require => false + gem 'puppet-blacksmith', :require => false + gem 'voxpupuli-release', :require => false + gem 'puppet-strings', '>= 2.2', :require => false end -# Evaluate Gemfile.local and ~/.gemfile if they exist -extra_gemfiles = [ - "#{__FILE__}.local", - File.join(Dir.home, '.gemfile'), -] +gem 'puppetlabs_spec_helper', '~> 2.0', :require => false +gem 'rake', :require => false +gem 'facter', ENV['FACTER_GEM_VERSION'], :require => false, :groups => [:test] + +puppetversion = ENV['PUPPET_VERSION'] || '>= 6.0' +gem 'puppet', puppetversion, :require => false, :groups => [:test] -extra_gemfiles.each do |gemfile| - if File.file?(gemfile) && File.readable?(gemfile) - eval(File.read(gemfile), binding) - end -end # vim: syntax=ruby diff --git a/Rakefile b/Rakefile index 41fc0f0b..d1bf7491 100644 --- a/Rakefile +++ b/Rakefile @@ -1,88 +1,61 @@ -# frozen_string_literal: true - -require 'puppet_litmus/rake_tasks' if Bundler.rubygems.find_name('puppet_litmus').any? -require 'puppetlabs_spec_helper/rake_tasks' -require 'puppet-syntax/tasks/puppet-syntax' -require 'puppet_blacksmith/rake_tasks' if Bundler.rubygems.find_name('puppet-blacksmith').any? -require 'github_changelog_generator/task' if Bundler.rubygems.find_name('github_changelog_generator').any? -require 'puppet-strings/tasks' if Bundler.rubygems.find_name('puppet-strings').any? - -def changelog_user - return unless Rake.application.top_level_tasks.include? "changelog" - returnVal = nil || JSON.load(File.read('metadata.json'))['author'] - raise "unable to find the changelog_user in .sync.yml, or the author in metadata.json" if returnVal.nil? - puts "GitHubChangelogGenerator user:#{returnVal}" - returnVal +# Attempt to load voxupuli-test (which pulls in puppetlabs_spec_helper), +# otherwise attempt to load it directly. +begin + require 'voxpupuli/test/rake' +rescue LoadError + require 'puppetlabs_spec_helper/rake_tasks' end -def changelog_project - return unless Rake.application.top_level_tasks.include? "changelog" - - returnVal = nil - returnVal ||= begin - metadata_source = JSON.load(File.read('metadata.json'))['source'] - metadata_source_match = metadata_source && metadata_source.match(%r{.*\/([^\/]*?)(?:\.git)?\Z}) +# load optional tasks for releases +# only available if gem group releases is installed +begin + require 'voxpupuli/release/rake_tasks' +rescue LoadError +end - metadata_source_match && metadata_source_match[1] +desc "Run main 'test' task and report merged results to coveralls" +task test_with_coveralls: [:test] do + if Dir.exist?(File.expand_path('../lib', __FILE__)) + require 'coveralls/rake/task' + Coveralls::RakeTask.new + Rake::Task['coveralls:push'].invoke + else + puts 'Skipping reporting to coveralls. Module has no lib dir' end - - raise "unable to find the changelog_project in .sync.yml or calculate it from the source in metadata.json" if returnVal.nil? - - puts "GitHubChangelogGenerator project:#{returnVal}" - returnVal end -def changelog_future_release - return unless Rake.application.top_level_tasks.include? "changelog" - returnVal = "%s" % JSON.load(File.read('metadata.json'))['version'] - raise "unable to find the future_release (version) in metadata.json" if returnVal.nil? - puts "GitHubChangelogGenerator future_release:#{returnVal}" - returnVal +desc 'Generate REFERENCE.md' +task :reference, [:debug, :backtrace] do |t, args| + patterns = '' + Rake::Task['strings:generate:reference'].invoke(patterns, args[:debug], args[:backtrace]) end -PuppetLint.configuration.send('disable_relative') - -if Bundler.rubygems.find_name('github_changelog_generator').any? +begin + require 'github_changelog_generator/task' + require 'puppet_blacksmith' GitHubChangelogGenerator::RakeTask.new :changelog do |config| - raise "Set CHANGELOG_GITHUB_TOKEN environment variable eg 'export CHANGELOG_GITHUB_TOKEN=valid_token_here'" if Rake.application.top_level_tasks.include? "changelog" and ENV['CHANGELOG_GITHUB_TOKEN'].nil? - config.user = "#{changelog_user}" - config.project = "#{changelog_project}" - config.future_release = "#{changelog_future_release}" - config.exclude_labels = ['maintenance'] - config.header = "# Change log\n\nAll notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org)." - config.add_pr_wo_labels = true - config.issues = false - config.merge_prefix = "### UNCATEGORIZED PRS; GO LABEL THEM" - config.configure_sections = { - "Changed" => { - "prefix" => "### Changed", - "labels" => ["backwards-incompatible"], - }, - "Added" => { - "prefix" => "### Added", - "labels" => ["feature", "enhancement"], - }, - "Fixed" => { - "prefix" => "### Fixed", - "labels" => ["bugfix"], - }, - } + version = (Blacksmith::Modulefile.new).version + config.future_release = "v#{version}" if version =~ /^\d+\.\d+.\d+$/ + config.header = "# Changelog\n\nAll notable changes to this project will be documented in this file.\nEach new release typically also includes the latest modulesync defaults.\nThese should not affect the functionality of the module." + config.exclude_labels = %w{duplicate question invalid wontfix wont-fix modulesync skip-changelog} + config.user = 'voxpupuli' + metadata_json = File.join(File.dirname(__FILE__), 'metadata.json') + metadata = JSON.load(File.read(metadata_json)) + config.project = metadata['name'] end -else - desc 'Generate a Changelog from GitHub' - task :changelog do - raise <= Gem::Version.new('2.2.2')" -EOM + + # Workaround for https://github.com/github-changelog-generator/github-changelog-generator/issues/715 + require 'rbconfig' + if RbConfig::CONFIG['host_os'] =~ /linux/ + task :changelog do + puts 'Fixing line endings...' + changelog_file = File.join(__dir__, 'CHANGELOG.md') + changelog_txt = File.read(changelog_file) + new_contents = changelog_txt.gsub(%r{\r\n}, "\n") + File.open(changelog_file, "w") {|file| file.puts new_contents } + end end -end +rescue LoadError +end +# vim: syntax=ruby diff --git a/spec/default_facts.yml b/spec/default_facts.yml deleted file mode 100644 index f777abfc..00000000 --- a/spec/default_facts.yml +++ /dev/null @@ -1,8 +0,0 @@ -# Use default_module_facts.yml for module specific facts. -# -# Facts specified here will override the values provided by rspec-puppet-facts. ---- -ipaddress: "172.16.254.254" -ipaddress6: "FE80:0000:0000:0000:AAAA:AAAA:AAAA" -is_pe: false -macaddress: "AA:AA:AA:AA:AA:AA" diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index b367fded..d266f6b4 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,61 +1,18 @@ -# frozen_string_literal: true - -RSpec.configure do |c| - c.mock_with :rspec -end - -require 'puppetlabs_spec_helper/module_spec_helper' -require 'rspec-puppet-facts' - -require 'spec_helper_local' if File.file?(File.join(File.dirname(__FILE__), 'spec_helper_local.rb')) - -include RspecPuppetFacts - -default_facts = { - puppetversion: Puppet.version, - facterversion: Facter.version, -} - -default_fact_files = [ - File.expand_path(File.join(File.dirname(__FILE__), 'default_facts.yml')), - File.expand_path(File.join(File.dirname(__FILE__), 'default_module_facts.yml')), -] - -default_fact_files.each do |f| - next unless File.exist?(f) && File.readable?(f) && File.size?(f) - - begin - default_facts.merge!(YAML.safe_load(File.read(f), [], [], true)) - rescue => e - RSpec.configuration.reporter.message "WARNING: Unable to load #{f}: #{e}" +# This file is managed via modulesync +# https://github.com/voxpupuli/modulesync +# https://github.com/voxpupuli/modulesync_config + +# puppetlabs_spec_helper will set up coverage if the env variable is set. +# We want to do this if lib exists and it hasn't been explicitly set. +ENV['COVERAGE'] ||= 'yes' if Dir.exist?(File.expand_path('../../lib', __FILE__)) + +require 'voxpupuli/test/spec_helper' + +if File.exist?(File.join(__dir__, 'default_module_facts.yml')) + facts = YAML.safe_load(File.read(File.join(__dir__, 'default_module_facts.yml'))) + if facts + facts.each do |name, value| + add_custom_fact name.to_sym, value + end end end - -# read default_facts and merge them over what is provided by facterdb -default_facts.each do |fact, value| - add_custom_fact fact, value -end - -RSpec.configure do |c| - c.default_facts = default_facts - c.before :each do - # set to strictest setting for testing - # by default Puppet runs at warning level - Puppet.settings[:strict] = :warning - Puppet.settings[:strict_variables] = true - end - c.filter_run_excluding(bolt: true) unless ENV['GEM_BOLT'] - c.after(:suite) do - end -end - -# Ensures that a module is defined -# @param module_name Name of the module -def ensure_module_defined(module_name) - module_name.split('::').reduce(Object) do |last_module, next_module| - last_module.const_set(next_module, Module.new) unless last_module.const_defined?(next_module, false) - last_module.const_get(next_module, false) - end -end - -# 'spec_overrides' from sync.yml will appear below this line From a3bd5d17a653bdcb1e9fdbb90666fe403bc97457 Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Mon, 14 Jun 2021 09:47:24 +0200 Subject: [PATCH 07/17] puppet-lint: autofix --- manifests/udev/rule.pp | 2 +- manifests/unit_file.pp | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/manifests/udev/rule.pp b/manifests/udev/rule.pp index d3180311..0cee77d5 100644 --- a/manifests/udev/rule.pp +++ b/manifests/udev/rule.pp @@ -43,6 +43,6 @@ path => join([$path, $name], '/'), notify => $notify_services, selinux_ignore_defaults => $selinux_ignore_defaults, - content => epp("${module_name}/udev_rule.epp", {'rules' => $rules}), + content => epp("${module_name}/udev_rule.epp", { 'rules' => $rules }), } } diff --git a/manifests/unit_file.pp b/manifests/unit_file.pp index f8029ceb..09076004 100644 --- a/manifests/unit_file.pp +++ b/manifests/unit_file.pp @@ -88,7 +88,6 @@ } if $enable != undef or $active != undef { - service { $name: ensure => $active, enable => $enable, From 064b7d07a323fcc7cb63c3ec335105cdf887a798 Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Mon, 14 Jun 2021 09:48:05 +0200 Subject: [PATCH 08/17] README.md: purge trailing whitespace --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 29fc3aef..4fe1c0a7 100644 --- a/README.md +++ b/README.md @@ -318,7 +318,7 @@ Additionally you can set custom udev rules with the `udev_rules` parameter. ```puppet class { 'systemd': manage_udevd => true, - udev_rules => { + udev_rules => { 'example_raw.rules' => { 'rules' => [ 'ACTION=="add", KERNEL=="sda", RUN+="/bin/raw /dev/raw/raw1 %N"', From 57b9db3871ee490fdb45cb6398227332b995a054 Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Mon, 14 Jun 2021 10:01:41 +0200 Subject: [PATCH 09/17] rubocop: autofix --- lib/facter/systemd.rb | 2 +- lib/puppet/provider/loginctl_user/ruby.rb | 4 +- spec/classes/init_spec.rb | 102 +++++++++--------- spec/defines/dropin_file_spec.rb | 16 +-- spec/defines/network_spec.rb | 4 +- spec/defines/service_limits_spec.rb | 38 +++---- spec/defines/timer_spec.rb | 8 +- spec/defines/tmpfile_spec.rb | 12 +-- spec/defines/udev_rules.spec | 32 +++--- spec/defines/unit_file_spec.rb | 32 +++--- spec/spec_helper_local.rb | 4 +- spec/unit/facter/systemd_spec.rb | 10 +- spec/unit/facter/systemd_version_spec.rb | 6 +- .../provider/loginctl_user/ruby_spec.rb | 12 +-- 14 files changed, 140 insertions(+), 142 deletions(-) diff --git a/lib/facter/systemd.rb b/lib/facter/systemd.rb index dfba2e64..cef9a77e 100644 --- a/lib/facter/systemd.rb +++ b/lib/facter/systemd.rb @@ -51,7 +51,7 @@ confine systemd: true setcode do command_output = Facter::Util::Resolution.exec( - 'systemctl list-unit-files --no-legend --no-pager "systemd-*" -t service --state=enabled,disabled,enabled-runtime,indirect', + 'systemctl list-unit-files --no-legend --no-pager "systemd-*" -t service --state=enabled,disabled,enabled-runtime,indirect' ) lines = command_output.lines.lazy.map { |line| line.split(%r{\s+}) } lines.each_with_object({}) do |(service, status, *), result| diff --git a/lib/puppet/provider/loginctl_user/ruby.rb b/lib/puppet/provider/loginctl_user/ruby.rb index a1e501cb..31661f0d 100644 --- a/lib/puppet/provider/loginctl_user/ruby.rb +++ b/lib/puppet/provider/loginctl_user/ruby.rb @@ -17,9 +17,7 @@ def self.instances def self.prefetch(resources) instances.each do |prov| - if resources[prov.name] - resources[prov.name].provider = prov - end + resources[prov.name].provider = prov if resources[prov.name] end end diff --git a/spec/classes/init_spec.rb b/spec/classes/init_spec.rb index 32224d78..0608fdba 100644 --- a/spec/classes/init_spec.rb +++ b/spec/classes/init_spec.rb @@ -101,7 +101,7 @@ it { is_expected.to contain_ini_setting('cache').with( path: '/etc/systemd/resolved.conf', - value: 'yes', + value: 'yes' ) } it { is_expected.to contain_ini_setting('dns_stub_listener') } @@ -120,7 +120,7 @@ it { is_expected.to contain_ini_setting('cache').with( path: '/etc/systemd/resolved.conf', - value: 'no-negative', + value: 'no-negative' ) } end @@ -190,13 +190,13 @@ case facts[:os]['family'] when 'Archlinux' - accounting = ['DefaultCPUAccounting', 'DefaultIOAccounting', 'DefaultIPAccounting', 'DefaultBlockIOAccounting', 'DefaultMemoryAccounting', 'DefaultTasksAccounting'] + accounting = %w[DefaultCPUAccounting DefaultIOAccounting DefaultIPAccounting DefaultBlockIOAccounting DefaultMemoryAccounting DefaultTasksAccounting] when 'Debian' - accounting = ['DefaultCPUAccounting', 'DefaultBlockIOAccounting', 'DefaultMemoryAccounting'] + accounting = %w[DefaultCPUAccounting DefaultBlockIOAccounting DefaultMemoryAccounting] when 'RedHat' - accounting = ['DefaultCPUAccounting', 'DefaultBlockIOAccounting', 'DefaultMemoryAccounting', 'DefaultTasksAccounting'] + accounting = %w[DefaultCPUAccounting DefaultBlockIOAccounting DefaultMemoryAccounting DefaultTasksAccounting] when 'Suse' - accounting = ['DefaultCPUAccounting', 'DefaultBlockIOAccounting', 'DefaultMemoryAccounting', 'DefaultTasksAccounting'] + accounting = %w[DefaultCPUAccounting DefaultBlockIOAccounting DefaultMemoryAccounting DefaultTasksAccounting] end accounting.each do |account| it { is_expected.to contain_ini_setting(account) } @@ -220,7 +220,7 @@ it { is_expected.to compile.with_all_deps } it { is_expected.to contain_service('systemd-journald').with( - ensure: 'running', + ensure: 'running' ) } it { is_expected.to have_ini_setting_resource_count(3) } @@ -229,7 +229,7 @@ path: '/etc/systemd/journald.conf', section: 'Journal', notify: 'Service[systemd-journald]', - value: 'auto', + value: 'auto' ) } it { @@ -237,7 +237,7 @@ path: '/etc/systemd/journald.conf', section: 'Journal', notify: 'Service[systemd-journald]', - value: '5day', + value: '5day' ) } it { @@ -245,7 +245,7 @@ path: '/etc/systemd/journald.conf', section: 'Journal', notify: 'Service[systemd-journald]', - ensure: 'absent', + ensure: 'absent' ) } end @@ -288,22 +288,22 @@ it { is_expected.to compile.with_all_deps } it { - is_expected.to contain_service('systemd-udevd') - .with(enable: true, - ensure: 'running') + is_expected.to contain_service('systemd-udevd'). + with(enable: true, + ensure: 'running') } it { - is_expected.to contain_file('/etc/udev/udev.conf') - .with(ensure: 'file', - owner: 'root', - group: 'root', - mode: '0444') - .with_content(%r{^udev_log=daemon$}) - .with_content(%r{^children_max=1$}) - .with_content(%r{^exec_delay=2$}) - .with_content(%r{^event_timeout=3$}) - .with_content(%r{^resolve_names=early$}) - .with_content(%r{^timeout_signal=SIGKILL$}) + is_expected.to contain_file('/etc/udev/udev.conf'). + with(ensure: 'file', + owner: 'root', + group: 'root', + mode: '0444'). + with_content(%r{^udev_log=daemon$}). + with_content(%r{^children_max=1$}). + with_content(%r{^exec_delay=2$}). + with_content(%r{^event_timeout=3$}). + with_content(%r{^resolve_names=early$}). + with_content(%r{^timeout_signal=SIGKILL$}) } end @@ -330,30 +330,30 @@ it { is_expected.to compile.with_all_deps } it { - is_expected.to contain_service('systemd-udevd') - .with(enable: true, - ensure: 'running') + is_expected.to contain_service('systemd-udevd'). + with(enable: true, + ensure: 'running') } it { - is_expected.to contain_file('/etc/udev/udev.conf') - .with(ensure: 'file', - owner: 'root', - group: 'root', - mode: '0444') - .with_content(%r{^udev_log=daemon$}) - .with_content(%r{^children_max=1$}) - .with_content(%r{^exec_delay=2$}) - .with_content(%r{^event_timeout=3$}) - .with_content(%r{^resolve_names=early$}) - .with_content(%r{^timeout_signal=SIGKILL$}) + is_expected.to contain_file('/etc/udev/udev.conf'). + with(ensure: 'file', + owner: 'root', + group: 'root', + mode: '0444'). + with_content(%r{^udev_log=daemon$}). + with_content(%r{^children_max=1$}). + with_content(%r{^exec_delay=2$}). + with_content(%r{^event_timeout=3$}). + with_content(%r{^resolve_names=early$}). + with_content(%r{^timeout_signal=SIGKILL$}) } it { - is_expected.to contain_systemd__udev__rule('example_raw.rules') - .with(rules: [ - '# I am a comment', - 'ACTION=="add", KERNEL=="sda", RUN+="/bin/raw /dev/raw/raw1 %N"', - 'ACTION=="add", KERNEL=="sdb", RUN+="/bin/raw /dev/raw/raw2 %N"', - ]) + is_expected.to contain_systemd__udev__rule('example_raw.rules'). + with(rules: [ + '# I am a comment', + 'ACTION=="add", KERNEL=="sda", RUN+="/bin/raw /dev/raw/raw1 %N"', + 'ACTION=="add", KERNEL=="sdb", RUN+="/bin/raw /dev/raw/raw2 %N"', + ]) } end @@ -364,7 +364,7 @@ logind_settings: { 'HandleSuspendKey' => 'ignore', 'KillUserProcesses' => 'no', - 'KillExcludeUsers' => ['a', 'b'], + 'KillExcludeUsers' => %w[a b], 'RemoveIPC' => { 'ensure' => 'absent', }, @@ -379,7 +379,7 @@ it { is_expected.to compile.with_all_deps } it { is_expected.to contain_service('systemd-logind').with( - ensure: 'running', + ensure: 'running' ) } it { is_expected.to have_ini_setting_resource_count(5) } @@ -388,7 +388,7 @@ path: '/etc/systemd/logind.conf', section: 'Login', notify: 'Service[systemd-logind]', - value: 'ignore', + value: 'ignore' ) } it { @@ -396,7 +396,7 @@ path: '/etc/systemd/logind.conf', section: 'Login', notify: 'Service[systemd-logind]', - value: 'no', + value: 'no' ) } it { @@ -404,7 +404,7 @@ path: '/etc/systemd/logind.conf', section: 'Login', notify: 'Service[systemd-logind]', - value: 'a b', + value: 'a b' ) } it { @@ -412,7 +412,7 @@ path: '/etc/systemd/logind.conf', section: 'Login', notify: 'Service[systemd-logind]', - ensure: 'absent', + ensure: 'absent' ) } it { @@ -420,7 +420,7 @@ path: '/etc/systemd/logind.conf', section: 'Login', notify: 'Service[systemd-logind]', - value: '10000', + value: '10000' ) } it { is_expected.to contain_loginctl_user('foo').with(linger: 'enabled') } diff --git a/spec/defines/dropin_file_spec.rb b/spec/defines/dropin_file_spec.rb index 27971a39..42292ac2 100644 --- a/spec/defines/dropin_file_spec.rb +++ b/spec/defines/dropin_file_spec.rb @@ -22,7 +22,7 @@ ensure: 'directory', recurse: 'true', purge: 'true', - selinux_ignore_defaults: false, + selinux_ignore_defaults: false ) } @@ -31,7 +31,7 @@ ensure: 'file', content: %r{#{params[:content]}}, mode: '0444', - selinux_ignore_defaults: false, + selinux_ignore_defaults: false ) } @@ -78,9 +78,9 @@ let(:title) { 'test.badtype' } it { - expect { + expect do is_expected.to compile.with_all_deps - }.to raise_error(%r{expects a match for Systemd::Dropin}) + end.to raise_error(%r{expects a match for Systemd::Dropin}) } end @@ -88,9 +88,9 @@ let(:title) { 'test/bad.conf' } it { - expect { + expect do is_expected.to compile.with_all_deps - }.to raise_error(%r{expects a match for Systemd::Dropin}) + end.to raise_error(%r{expects a match for Systemd::Dropin}) } end @@ -120,7 +120,7 @@ is_expected.to create_file("/etc/systemd/system/#{params[:unit]}.d/#{params[:filename]}").with( ensure: 'file', content: %r{#{params[:content]}}, - mode: '0444', + mode: '0444' ) } end @@ -136,7 +136,7 @@ it { is_expected.to create_file("/etc/systemd/system/#{params[:unit]}.d/#{title}").with( ensure: 'file', - content: sensitive('TEST_CONTENT'), + content: sensitive('TEST_CONTENT') ) } end diff --git a/spec/defines/network_spec.rb b/spec/defines/network_spec.rb index 71e62d5c..3ab5acc9 100644 --- a/spec/defines/network_spec.rb +++ b/spec/defines/network_spec.rb @@ -28,7 +28,7 @@ is_expected.to create_file("/etc/systemd/network/#{title}").with( ensure: 'file', content: %r{#{params[:content]}}, - mode: '0444', + mode: '0444' ) } @@ -55,7 +55,7 @@ content: %r{#{params[:content]}}, group: 'systemd-network', mode: '0640', - show_diff: false, + show_diff: false ) } diff --git a/spec/defines/service_limits_spec.rb b/spec/defines/service_limits_spec.rb index a8270087..3bba4e6f 100644 --- a/spec/defines/service_limits_spec.rb +++ b/spec/defines/service_limits_spec.rb @@ -32,23 +32,23 @@ it { is_expected.to compile.with_all_deps } it { - is_expected.to create_file("/etc/systemd/system/#{title}.d/90-limits.conf") - .with(ensure: 'file', mode: '0444') - .with_content(%r{LimitCPU=10m}) - .with_content(%r{LimitFSIZE=infinity}) - .with_content(%r{LimitDATA=10K}) - .with_content(%r{LimitNOFILE=20:infinity}) - .with_content(%r{LimitNICE=-10}) - .with_content(%r{LimitRTPRIO=50}) - .with_content(%r{CPUQuota=125%}) - .with_content(%r{IODeviceWeight=/dev/weight 10}) - .with_content(%r{IODeviceWeight=/dev/weight2 20}) - .with_content(%r{IOReadBandwidthMax=/bw/max 10K}) + is_expected.to create_file("/etc/systemd/system/#{title}.d/90-limits.conf"). + with(ensure: 'file', mode: '0444'). + with_content(%r{LimitCPU=10m}). + with_content(%r{LimitFSIZE=infinity}). + with_content(%r{LimitDATA=10K}). + with_content(%r{LimitNOFILE=20:infinity}). + with_content(%r{LimitNICE=-10}). + with_content(%r{LimitRTPRIO=50}). + with_content(%r{CPUQuota=125%}). + with_content(%r{IODeviceWeight=/dev/weight 10}). + with_content(%r{IODeviceWeight=/dev/weight2 20}). + with_content(%r{IOReadBandwidthMax=/bw/max 10K}) } it { is_expected.to create_exec("restart #{title} because limits").with( command: "systemctl restart #{title}", - refreshonly: true, + refreshonly: true ) } end @@ -58,14 +58,14 @@ it { is_expected.to compile.with_all_deps } it do - is_expected.to create_file("/etc/systemd/system/#{title}.d/90-limits.conf") - .with_ensure('absent') - .that_notifies("Exec[restart #{title} because limits]") + is_expected.to create_file("/etc/systemd/system/#{title}.d/90-limits.conf"). + with_ensure('absent'). + that_notifies("Exec[restart #{title} because limits]") end it do - is_expected.to create_exec("restart #{title} because limits") - .with_command("systemctl restart #{title}") - .with_refreshonly(true) + is_expected.to create_exec("restart #{title} because limits"). + with_command("systemctl restart #{title}"). + with_refreshonly(true) end end end diff --git a/spec/defines/timer_spec.rb b/spec/defines/timer_spec.rb index 55c0a2eb..67c9d194 100644 --- a/spec/defines/timer_spec.rb +++ b/spec/defines/timer_spec.rb @@ -20,13 +20,13 @@ it { is_expected.to contain_systemd__unit_file('foobar.timer').with( - content: "[Timer]\nOnCalendar=weekly", + content: "[Timer]\nOnCalendar=weekly" ) } it { is_expected.to contain_systemd__unit_file('foobar.service').with( - content: "[Service]\nExecStart=/bin/touch /tmp/foobar", + content: "[Service]\nExecStart=/bin/touch /tmp/foobar" ) } end @@ -74,9 +74,9 @@ let(:title) { 'foobar' } it { - expect { + expect do is_expected.to compile.with_all_deps - }.to raise_error(%r{expects a match for}) + end.to raise_error(%r{expects a match for}) } end end diff --git a/spec/defines/tmpfile_spec.rb b/spec/defines/tmpfile_spec.rb index d252a082..97f81cf7 100644 --- a/spec/defines/tmpfile_spec.rb +++ b/spec/defines/tmpfile_spec.rb @@ -13,7 +13,7 @@ is_expected.to create_file("/etc/tmpfiles.d/#{title}").with( ensure: 'file', content: %r{#{params[:content]}}, - mode: '0444', + mode: '0444' ) } @@ -21,9 +21,9 @@ let(:title) { 'test.badtype' } it { - expect { + expect do is_expected.to compile.with_all_deps - }.to raise_error(%r{expects a match for Systemd::Dropin}) + end.to raise_error(%r{expects a match for Systemd::Dropin}) } end @@ -31,9 +31,9 @@ let(:title) { 'test/foo.conf' } it { - expect { + expect do is_expected.to compile.with_all_deps - }.to raise_error(%r{expects a match for Systemd::Dropin}) + end.to raise_error(%r{expects a match for Systemd::Dropin}) } end @@ -50,7 +50,7 @@ is_expected.to create_file('/etc/tmpfiles.d/goodname.conf').with( ensure: 'file', content: %r{#{params[:content]}}, - mode: '0444', + mode: '0444' ) } end diff --git a/spec/defines/udev_rules.spec b/spec/defines/udev_rules.spec index 8372833d..3d753ee4 100644 --- a/spec/defines/udev_rules.spec +++ b/spec/defines/udev_rules.spec @@ -25,12 +25,12 @@ describe 'systemd::udev::rule' do it { is_expected.to compile.with_all_deps } it { - is_expected.to create_file("/etc/udev/rules.d/#{title}") - .with(ensure: 'file', mode: '0444', owner: 'root', group: 'root') - .with_content(%r{^# I am a comment$}) - .with_content(%r{^ACTION=="add", KERNEL=="sda", RUN+="/bin/raw /dev/raw/raw1 %N"$}) - .with_content(%r{^ACTION=="add", KERNEL=="sdb", RUN+="/bin/raw /dev/raw/raw2 %N"$}) - .that_notifies("Service['systemd-udevd']") + is_expected.to create_file("/etc/udev/rules.d/#{title}"). + with(ensure: 'file', mode: '0444', owner: 'root', group: 'root'). + with_content(%r{^# I am a comment$}). + with_content(%r{^ACTION=="add", KERNEL=="sda", RUN+="/bin/raw /dev/raw/raw1 %N"$}). + with_content(%r{^ACTION=="add", KERNEL=="sdb", RUN+="/bin/raw /dev/raw/raw2 %N"$}). + that_notifies("Service['systemd-udevd']") } end @@ -51,13 +51,13 @@ describe 'systemd::udev::rule' do it { is_expected.to compile.with_all_deps } it { - is_expected.to create_file("/etc/udev/rules.d/#{title}") - .with(ensure: 'file', mode: '0444', owner: 'root', group: 'root') - .with_content(%r{^# I am a comment$}) - .with_content(%r{^ACTION=="add", KERNEL=="sda", RUN+="/bin/raw /dev/raw/raw1 %N"$}) - .with_content(%r{^ACTION=="add", KERNEL=="sdb", RUN+="/bin/raw /dev/raw/raw2 %N"$}) - .that_notifies("Service['systemd-udevd']") - .that_notifies("Service['foo']") + is_expected.to create_file("/etc/udev/rules.d/#{title}"). + with(ensure: 'file', mode: '0444', owner: 'root', group: 'root'). + with_content(%r{^# I am a comment$}). + with_content(%r{^ACTION=="add", KERNEL=="sda", RUN+="/bin/raw /dev/raw/raw1 %N"$}). + with_content(%r{^ACTION=="add", KERNEL=="sdb", RUN+="/bin/raw /dev/raw/raw2 %N"$}). + that_notifies("Service['systemd-udevd']"). + that_notifies("Service['foo']") } end @@ -66,9 +66,9 @@ describe 'systemd::udev::rule' do it { is_expected.to compile.with_all_deps } it do - is_expected.to create_file("/etc/udev/rules.d/#{title}") - .with_ensure('absent') - .that_notifies("Service['systemd-udevd']") + is_expected.to create_file("/etc/udev/rules.d/#{title}"). + with_ensure('absent'). + that_notifies("Service['systemd-udevd']") end end end diff --git a/spec/defines/unit_file_spec.rb b/spec/defines/unit_file_spec.rb index 23e0e745..abd6bdd4 100644 --- a/spec/defines/unit_file_spec.rb +++ b/spec/defines/unit_file_spec.rb @@ -11,10 +11,10 @@ it { is_expected.to compile.with_all_deps } it do - is_expected.to create_file("/etc/systemd/system/#{title}") - .with_ensure('file') - .with_content(%r{#{params[:content]}}) - .with_mode('0444') + is_expected.to create_file("/etc/systemd/system/#{title}"). + with_ensure('file'). + with_content(%r{#{params[:content]}}). + with_mode('0444') end context 'with a bad unit type' do @@ -33,17 +33,17 @@ let(:params) do super().merge( enable: true, - active: true, + active: true ) end it { is_expected.to compile.with_all_deps } it do - is_expected.to contain_service('test.service') - .with_ensure(true) - .with_enable(true) - .with_provider('systemd') - .that_subscribes_to("File[/etc/systemd/system/#{title}]") + is_expected.to contain_service('test.service'). + with_ensure(true). + with_enable(true). + with_provider('systemd'). + that_subscribes_to("File[/etc/systemd/system/#{title}]") end end @@ -66,17 +66,17 @@ let(:params) do super().merge( enable: false, - active: false, + active: false ) end it { is_expected.to compile.with_all_deps } it do - is_expected.to contain_service('test.service') - .with_ensure(false) - .with_enable(false) - .with_provider('systemd') - .that_comes_before("File[/etc/systemd/system/#{title}]") + is_expected.to contain_service('test.service'). + with_ensure(false). + with_enable(false). + with_provider('systemd'). + that_comes_before("File[/etc/systemd/system/#{title}]") end end end diff --git a/spec/spec_helper_local.rb b/spec/spec_helper_local.rb index 7707fbd9..af039aa4 100644 --- a/spec/spec_helper_local.rb +++ b/spec/spec_helper_local.rb @@ -5,7 +5,7 @@ RSpec::Mocks::Syntax.enable_expect(RSpec::Puppet::ManifestMatchers) RSpec.configure do |config| - config.before :each do + config.before do # Ensure that we don't accidentally cache facts and environment between # test cases. This requires each example group to explicitly load the # facts being exercised with something like @@ -16,7 +16,7 @@ RSpec::Mocks.setup end - config.after :each do + config.after do RSpec::Mocks.verify RSpec::Mocks.teardown end diff --git a/spec/unit/facter/systemd_spec.rb b/spec/unit/facter/systemd_spec.rb index 3004081a..4e402306 100644 --- a/spec/unit/facter/systemd_spec.rb +++ b/spec/unit/facter/systemd_spec.rb @@ -1,12 +1,12 @@ require 'spec_helper' describe Facter.fact(:systemd) do - before(:each) { Facter.clear } - after(:each) { Facter.clear } + before { Facter.clear } + after { Facter.clear } describe 'systemd' do context 'returns true when systemd present' do - before(:each) do + before do allow(Facter.fact(:kernel)).to receive(:value).and_return(:linux) Facter.add(:service_provider) { setcode { 'systemd' } } end @@ -16,7 +16,7 @@ end context 'returns false when systemd not present' do - before(:each) do + before do allow(Facter.fact(:kernel)).to receive(:value).and_return(:linux) Facter.add(:service_provider) { setcode { 'redhat' } } end @@ -26,7 +26,7 @@ end context 'returns nil when kernel is not linux' do - before(:each) do + before do allow(Facter.fact(:kernel)).to receive(:value).and_return(:windows) end diff --git a/spec/unit/facter/systemd_version_spec.rb b/spec/unit/facter/systemd_version_spec.rb index 1aa709ec..6342c8ad 100644 --- a/spec/unit/facter/systemd_version_spec.rb +++ b/spec/unit/facter/systemd_version_spec.rb @@ -1,13 +1,13 @@ require 'spec_helper' describe Facter.fact(:systemd_version) do - before(:each) do + before do Facter.clear end describe 'systemd_version' do context 'returns version when systemd fact present' do - before(:each) do + before do allow(Facter.fact(:systemd)).to receive(:value).and_return(true) end let(:facts) { { systemd: true } } @@ -18,7 +18,7 @@ end end context 'returns nil when systemd fact not present' do - before(:each) do + before do allow(Facter.fact(:systemd)).to receive(:value).and_return(false) end let(:facts) { { systemd: false } } diff --git a/spec/unit/puppet/provider/loginctl_user/ruby_spec.rb b/spec/unit/puppet/provider/loginctl_user/ruby_spec.rb index c442eb4a..76eb813b 100644 --- a/spec/unit/puppet/provider/loginctl_user/ruby_spec.rb +++ b/spec/unit/puppet/provider/loginctl_user/ruby_spec.rb @@ -12,12 +12,12 @@ context 'when listing instances' do it 'finds all entries' do - expect(provider_class).to receive(:loginctl) - .with('list-users', '--no-legend') - .and_return("0 root\n42 foo\n314 bar\n") - expect(provider_class).to receive(:loginctl) - .with('show-user', '-p', 'Name', '-p', 'Linger', 'root', 'foo', 'bar') - .and_return("Name=root\nLinger=no\n\nName=foo\nLinger=yes\n\nName=bar\nLinger=no\n") + expect(provider_class).to receive(:loginctl). + with('list-users', '--no-legend'). + and_return("0 root\n42 foo\n314 bar\n") + expect(provider_class).to receive(:loginctl). + with('show-user', '-p', 'Name', '-p', 'Linger', 'root', 'foo', 'bar'). + and_return("Name=root\nLinger=no\n\nName=foo\nLinger=yes\n\nName=bar\nLinger=no\n") inst = provider_class.instances.map do |p| end From 053c1dbbf36e7cb5a1050f3ee83c69a04afee4e6 Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Mon, 14 Jun 2021 10:32:21 +0200 Subject: [PATCH 10/17] delete legacy files --- .sync.yml | 19 ------------------- .../nodesets/centos-5-x86_64-docker.yml | 16 ---------------- spec/acceptance/nodesets/centos-5.yml | 17 ----------------- .../nodesets/centos-6-x86_64-docker.yml | 16 ---------------- .../nodesets/centos-6-x86_64-openstack.yml | 15 --------------- .../nodesets/centos-6-x86_64-vagrant.yml | 12 ------------ spec/acceptance/nodesets/centos-6.yml | 18 ------------------ .../nodesets/centos-7-x86_64-docker.yml | 16 ---------------- .../nodesets/centos-7-x86_64-openstack.yml | 15 --------------- .../nodesets/centos-7-x86_64-vagrant.yml | 12 ------------ spec/acceptance/nodesets/centos-7.yml | 16 ---------------- .../nodesets/debian-6-x86_64-docker.yml | 16 ---------------- .../nodesets/debian-6-x86_64-openstack.yml | 15 --------------- .../nodesets/debian-6-x86_64-vagrant.yml | 12 ------------ spec/acceptance/nodesets/debian-6.yml | 16 ---------------- .../nodesets/debian-7-x86_64-docker.yml | 16 ---------------- .../nodesets/debian-7-x86_64-openstack.yml | 15 --------------- .../nodesets/debian-7-x86_64-vagrant.yml | 12 ------------ spec/acceptance/nodesets/debian-7.yml | 16 ---------------- .../nodesets/debian-8-x86_64-docker.yml | 16 ---------------- .../nodesets/debian-8-x86_64-openstack.yml | 15 --------------- .../nodesets/debian-8-x86_64-vagrant.yml | 12 ------------ spec/acceptance/nodesets/debian-8.yml | 17 ----------------- spec/acceptance/nodesets/opensuse-15.1.yml | 16 ---------------- spec/acceptance/nodesets/opensuse-15.2.yml | 16 ---------------- spec/acceptance/nodesets/opensuse-15.yml | 16 ---------------- .../nodesets/ubuntu-10.04-x86_64-docker.yml | 15 --------------- .../nodesets/ubuntu-12.04-x86_64-docker.yml | 16 ---------------- .../ubuntu-12.04-x86_64-openstack.yml | 15 --------------- spec/acceptance/nodesets/ubuntu-12.04.yml | 17 ----------------- .../nodesets/ubuntu-14.04-x86_64-docker.yml | 16 ---------------- .../ubuntu-14.04-x86_64-openstack.yml | 15 --------------- .../nodesets/ubuntu-14.04-x86_64-vagrant.yml | 12 ------------ spec/acceptance/nodesets/ubuntu-14.04.yml | 19 ------------------- .../nodesets/ubuntu-14.10-x86_64-docker.yml | 16 ---------------- .../ubuntu-14.10-x86_64-openstack.yml | 15 --------------- spec/acceptance/nodesets/ubuntu-14.10.yml | 19 ------------------- .../nodesets/ubuntu-15.04-x86_64-docker.yml | 16 ---------------- .../ubuntu-15.04-x86_64-openstack.yml | 15 --------------- spec/acceptance/nodesets/ubuntu-15.04.yml | 17 ----------------- spec/acceptance/nodesets/ubuntu-15.10.yml | 17 ----------------- spec/acceptance/nodesets/ubuntu-16.04.yml | 17 ----------------- 42 files changed, 655 deletions(-) delete mode 100644 .sync.yml delete mode 100644 spec/acceptance/nodesets/centos-5-x86_64-docker.yml delete mode 100644 spec/acceptance/nodesets/centos-5.yml delete mode 100644 spec/acceptance/nodesets/centos-6-x86_64-docker.yml delete mode 100644 spec/acceptance/nodesets/centos-6-x86_64-openstack.yml delete mode 100644 spec/acceptance/nodesets/centos-6-x86_64-vagrant.yml delete mode 100644 spec/acceptance/nodesets/centos-6.yml delete mode 100644 spec/acceptance/nodesets/centos-7-x86_64-docker.yml delete mode 100644 spec/acceptance/nodesets/centos-7-x86_64-openstack.yml delete mode 100644 spec/acceptance/nodesets/centos-7-x86_64-vagrant.yml delete mode 100644 spec/acceptance/nodesets/centos-7.yml delete mode 100644 spec/acceptance/nodesets/debian-6-x86_64-docker.yml delete mode 100644 spec/acceptance/nodesets/debian-6-x86_64-openstack.yml delete mode 100644 spec/acceptance/nodesets/debian-6-x86_64-vagrant.yml delete mode 100644 spec/acceptance/nodesets/debian-6.yml delete mode 100644 spec/acceptance/nodesets/debian-7-x86_64-docker.yml delete mode 100644 spec/acceptance/nodesets/debian-7-x86_64-openstack.yml delete mode 100644 spec/acceptance/nodesets/debian-7-x86_64-vagrant.yml delete mode 100644 spec/acceptance/nodesets/debian-7.yml delete mode 100644 spec/acceptance/nodesets/debian-8-x86_64-docker.yml delete mode 100644 spec/acceptance/nodesets/debian-8-x86_64-openstack.yml delete mode 100644 spec/acceptance/nodesets/debian-8-x86_64-vagrant.yml delete mode 100644 spec/acceptance/nodesets/debian-8.yml delete mode 100644 spec/acceptance/nodesets/opensuse-15.1.yml delete mode 100644 spec/acceptance/nodesets/opensuse-15.2.yml delete mode 100644 spec/acceptance/nodesets/opensuse-15.yml delete mode 100644 spec/acceptance/nodesets/ubuntu-10.04-x86_64-docker.yml delete mode 100644 spec/acceptance/nodesets/ubuntu-12.04-x86_64-docker.yml delete mode 100644 spec/acceptance/nodesets/ubuntu-12.04-x86_64-openstack.yml delete mode 100644 spec/acceptance/nodesets/ubuntu-12.04.yml delete mode 100644 spec/acceptance/nodesets/ubuntu-14.04-x86_64-docker.yml delete mode 100644 spec/acceptance/nodesets/ubuntu-14.04-x86_64-openstack.yml delete mode 100644 spec/acceptance/nodesets/ubuntu-14.04-x86_64-vagrant.yml delete mode 100644 spec/acceptance/nodesets/ubuntu-14.04.yml delete mode 100644 spec/acceptance/nodesets/ubuntu-14.10-x86_64-docker.yml delete mode 100644 spec/acceptance/nodesets/ubuntu-14.10-x86_64-openstack.yml delete mode 100644 spec/acceptance/nodesets/ubuntu-14.10.yml delete mode 100644 spec/acceptance/nodesets/ubuntu-15.04-x86_64-docker.yml delete mode 100644 spec/acceptance/nodesets/ubuntu-15.04-x86_64-openstack.yml delete mode 100644 spec/acceptance/nodesets/ubuntu-15.04.yml delete mode 100644 spec/acceptance/nodesets/ubuntu-15.10.yml delete mode 100644 spec/acceptance/nodesets/ubuntu-16.04.yml diff --git a/.sync.yml b/.sync.yml deleted file mode 100644 index acd8e4f2..00000000 --- a/.sync.yml +++ /dev/null @@ -1,19 +0,0 @@ ---- -# yamllint disable rule:line-length -.travis.yml: - user: camptocamp - secure: "ASTRdmLjJNa1NvHy2LRGvmvUeth6W3Fh/alYWvcvI8nDDsdkweHk0iXhcXZwtMQReb0NI5vJiRNXNy7a3XySC4+SP3hfHuDU58H2FqC4Ff0EHRPRHTEiXf7xmN53RxXYXZQvrFfqUb6tIsBNVKVmsYWNe01k8NVKPyYDfQB75PQ=" - branches: - - master - - /^\d/ - deploy_to_forge: - enabled: true - tag_regex: "^\\d" -Gemfile: - optional: - ':development': - - gem: 'github_changelog_generator' -Rakefile: - changelog_version_tag_pattern: '%s' -spec/spec_helper.rb: - mock_with: :rspec diff --git a/spec/acceptance/nodesets/centos-5-x86_64-docker.yml b/spec/acceptance/nodesets/centos-5-x86_64-docker.yml deleted file mode 100644 index 05cf7740..00000000 --- a/spec/acceptance/nodesets/centos-5-x86_64-docker.yml +++ /dev/null @@ -1,16 +0,0 @@ ---- -HOSTS: - centos-5-x64: - default_apply_opts: - order: random - strict_variables: - platform: el-5-x86_64 - hypervisor: docker - image: centos:5 - docker_preserve_image: true - docker_cmd: '["/sbin/init"]' - docker_image_commands: - - 'yum install -y crontabs tar wget' -CONFIG: - type: foss - log_level: debug diff --git a/spec/acceptance/nodesets/centos-5.yml b/spec/acceptance/nodesets/centos-5.yml deleted file mode 100644 index e07adfdd..00000000 --- a/spec/acceptance/nodesets/centos-5.yml +++ /dev/null @@ -1,17 +0,0 @@ ---- -HOSTS: - centos-5-x64: - default_apply_opts: - order: random - strict_variables: - platform: el-5-x86_64 - hypervisor: docker - image: tianon/centos:5.10 - docker_preserve_image: true - docker_cmd: '["/sbin/init"]' - docker_image_commands: - - 'yum install -y crontabs tar wget which' - - 'sed -i -e "/mingetty/d" /etc/inittab' -CONFIG: - type: aio - log_level: debug diff --git a/spec/acceptance/nodesets/centos-6-x86_64-docker.yml b/spec/acceptance/nodesets/centos-6-x86_64-docker.yml deleted file mode 100644 index 1cbeacf9..00000000 --- a/spec/acceptance/nodesets/centos-6-x86_64-docker.yml +++ /dev/null @@ -1,16 +0,0 @@ ---- -HOSTS: - centos-6-x64: - default_apply_opts: - order: random - strict_variables: - platform: el-6-x86_64 - hypervisor: docker - image: centos:6 - docker_preserve_image: true - docker_cmd: '["/sbin/init"]' - docker_image_commands: - - 'yum install -y crontabs tar wget' -CONFIG: - type: foss - log_level: debug diff --git a/spec/acceptance/nodesets/centos-6-x86_64-openstack.yml b/spec/acceptance/nodesets/centos-6-x86_64-openstack.yml deleted file mode 100644 index 39016e94..00000000 --- a/spec/acceptance/nodesets/centos-6-x86_64-openstack.yml +++ /dev/null @@ -1,15 +0,0 @@ ---- -HOSTS: - centos-6-x64: - default_apply_opts: - order: random - strict_variables: - platform: el-6-x86_64 - hypervisor: openstack - flavor: m1.small - image: centos-6-latest - user: root -CONFIG: - type: foss - log_level: debug - openstack_network: default diff --git a/spec/acceptance/nodesets/centos-6-x86_64-vagrant.yml b/spec/acceptance/nodesets/centos-6-x86_64-vagrant.yml deleted file mode 100644 index 82af3765..00000000 --- a/spec/acceptance/nodesets/centos-6-x86_64-vagrant.yml +++ /dev/null @@ -1,12 +0,0 @@ ---- -HOSTS: - centos-6-x64: - default_apply_opts: - order: random - strict_variables: - platform: el-6-x86_64 - hypervisor: vagrant - box: camptocamp/centos-6-x86_64 -CONFIG: - type: foss - log_level: debug diff --git a/spec/acceptance/nodesets/centos-6.yml b/spec/acceptance/nodesets/centos-6.yml deleted file mode 100644 index 5cfd6fc2..00000000 --- a/spec/acceptance/nodesets/centos-6.yml +++ /dev/null @@ -1,18 +0,0 @@ ---- -HOSTS: - centos-6-x64: - default_apply_opts: - order: random - strict_variables: - platform: el-6-x86_64 - hypervisor: docker - image: centos:6 - docker_preserve_image: true - docker_cmd: '["/sbin/init"]' - docker_image_commands: - - 'rm -rf /var/run/network/*' - - 'yum install -y crontabs tar wget' - - 'rm /etc/init/tty.conf' -CONFIG: - type: aio - log_level: debug diff --git a/spec/acceptance/nodesets/centos-7-x86_64-docker.yml b/spec/acceptance/nodesets/centos-7-x86_64-docker.yml deleted file mode 100644 index 329bf9ee..00000000 --- a/spec/acceptance/nodesets/centos-7-x86_64-docker.yml +++ /dev/null @@ -1,16 +0,0 @@ ---- -HOSTS: - centos-7-x64: - default_apply_opts: - order: random - strict_variables: - platform: el-7-x86_64 - hypervisor: docker - image: centos:7 - docker_preserve_image: true - docker_cmd: '["/usr/sbin/init"]' - docker_image_commands: - - 'yum install -y crontabs tar wget' -CONFIG: - type: foss - log_level: debug diff --git a/spec/acceptance/nodesets/centos-7-x86_64-openstack.yml b/spec/acceptance/nodesets/centos-7-x86_64-openstack.yml deleted file mode 100644 index 5f3d7e80..00000000 --- a/spec/acceptance/nodesets/centos-7-x86_64-openstack.yml +++ /dev/null @@ -1,15 +0,0 @@ ---- -HOSTS: - centos-7-x64: - default_apply_opts: - order: random - strict_variables: - platform: el-7-x86_64 - hypervisor: openstack - flavor: m1.small - image: centos-7-latest - user: centos -CONFIG: - type: foss - log_level: debug - openstack_network: default diff --git a/spec/acceptance/nodesets/centos-7-x86_64-vagrant.yml b/spec/acceptance/nodesets/centos-7-x86_64-vagrant.yml deleted file mode 100644 index 2064466d..00000000 --- a/spec/acceptance/nodesets/centos-7-x86_64-vagrant.yml +++ /dev/null @@ -1,12 +0,0 @@ ---- -HOSTS: - centos-7-x64: - default_apply_opts: - order: random - strict_variables: - platform: el-7-x86_64 - hypervisor: vagrant - box: camptocamp/centos-7-x86_64 -CONFIG: - type: foss - log_level: debug diff --git a/spec/acceptance/nodesets/centos-7.yml b/spec/acceptance/nodesets/centos-7.yml deleted file mode 100644 index f646634b..00000000 --- a/spec/acceptance/nodesets/centos-7.yml +++ /dev/null @@ -1,16 +0,0 @@ ---- -HOSTS: - centos-7-x64: - default_apply_opts: - order: random - strict_variables: - platform: el-7-x86_64 - hypervisor: docker - image: centos:7 - docker_preserve_image: true - docker_cmd: '["/usr/sbin/init"]' - docker_image_commands: - - 'yum install -y crontabs tar wget iproute' -CONFIG: - type: aio - log_level: debug diff --git a/spec/acceptance/nodesets/debian-6-x86_64-docker.yml b/spec/acceptance/nodesets/debian-6-x86_64-docker.yml deleted file mode 100644 index b15ce0bf..00000000 --- a/spec/acceptance/nodesets/debian-6-x86_64-docker.yml +++ /dev/null @@ -1,16 +0,0 @@ ---- -HOSTS: - debian-6-x64: - default_apply_opts: - order: random - strict_variables: - platform: debian-6-amd64 - hypervisor: docker - image: debian:6 - docker_preserve_image: true - docker_cmd: '["/sbin/init"]' - docker_image_commands: - - 'apt-get install -y wget' -CONFIG: - type: foss - log_level: debug diff --git a/spec/acceptance/nodesets/debian-6-x86_64-openstack.yml b/spec/acceptance/nodesets/debian-6-x86_64-openstack.yml deleted file mode 100644 index e14e0dc3..00000000 --- a/spec/acceptance/nodesets/debian-6-x86_64-openstack.yml +++ /dev/null @@ -1,15 +0,0 @@ ---- -HOSTS: - debian-6-x64: - default_apply_opts: - order: random - strict_variables: - platform: debian-6-amd64 - hypervisor: openstack - flavor: m1.small - image: debian-6-latest - user: debian -CONFIG: - type: foss - log_level: debug - openstack_network: default diff --git a/spec/acceptance/nodesets/debian-6-x86_64-vagrant.yml b/spec/acceptance/nodesets/debian-6-x86_64-vagrant.yml deleted file mode 100644 index c20e2164..00000000 --- a/spec/acceptance/nodesets/debian-6-x86_64-vagrant.yml +++ /dev/null @@ -1,12 +0,0 @@ ---- -HOSTS: - debian-6-x64: - default_apply_opts: - order: random - strict_variables: - platform: debian-6-amd64 - hypervisor: vagrant - box: puppetlabs/debian-6.0.10-64-nocm -CONFIG: - type: foss - log_level: debug diff --git a/spec/acceptance/nodesets/debian-6.yml b/spec/acceptance/nodesets/debian-6.yml deleted file mode 100644 index 9204ee43..00000000 --- a/spec/acceptance/nodesets/debian-6.yml +++ /dev/null @@ -1,16 +0,0 @@ ---- -HOSTS: - debian-6-x64: - default_apply_opts: - order: random - strict_variables: - platform: debian-6-amd64 - hypervisor: docker - image: debian/eol:squeeze - docker_preserve_image: true - docker_cmd: '["/sbin/init"]' - docker_image_commands: - - 'apt-get install -y cron locales-all net-tools wget' -CONFIG: - type: aio - log_level: debug diff --git a/spec/acceptance/nodesets/debian-7-x86_64-docker.yml b/spec/acceptance/nodesets/debian-7-x86_64-docker.yml deleted file mode 100644 index 63b9cdc8..00000000 --- a/spec/acceptance/nodesets/debian-7-x86_64-docker.yml +++ /dev/null @@ -1,16 +0,0 @@ ---- -HOSTS: - debian-7-x64: - default_apply_opts: - order: random - strict_variables: - platform: debian-7-amd64 - hypervisor: docker - image: debian:7 - docker_preserve_image: true - docker_cmd: '["/sbin/init"]' - docker_image_commands: - - 'apt-get install -y cron wget' -CONFIG: - type: foss - log_level: debug diff --git a/spec/acceptance/nodesets/debian-7-x86_64-openstack.yml b/spec/acceptance/nodesets/debian-7-x86_64-openstack.yml deleted file mode 100644 index c1ce94f4..00000000 --- a/spec/acceptance/nodesets/debian-7-x86_64-openstack.yml +++ /dev/null @@ -1,15 +0,0 @@ ---- -HOSTS: - debian-7-x64: - default_apply_opts: - order: random - strict_variables: - platform: debian-7-amd64 - hypervisor: openstack - flavor: m1.small - image: debian-7-latest - user: debian -CONFIG: - type: foss - log_level: debug - openstack_network: default diff --git a/spec/acceptance/nodesets/debian-7-x86_64-vagrant.yml b/spec/acceptance/nodesets/debian-7-x86_64-vagrant.yml deleted file mode 100644 index 10971550..00000000 --- a/spec/acceptance/nodesets/debian-7-x86_64-vagrant.yml +++ /dev/null @@ -1,12 +0,0 @@ ---- -HOSTS: - debian-7-x64: - default_apply_opts: - order: random - strict_variables: - platform: debian-7-amd64 - hypervisor: vagrant - box: camptocamp/debian-7-amd64 -CONFIG: - type: foss - log_level: debug diff --git a/spec/acceptance/nodesets/debian-7.yml b/spec/acceptance/nodesets/debian-7.yml deleted file mode 100644 index 90cc5cfa..00000000 --- a/spec/acceptance/nodesets/debian-7.yml +++ /dev/null @@ -1,16 +0,0 @@ ---- -HOSTS: - debian-7-x64: - default_apply_opts: - order: random - strict_variables: - platform: debian-7-amd64 - hypervisor: docker - image: debian:7 - docker_preserve_image: true - docker_cmd: '["/sbin/init"]' - docker_image_commands: - - 'apt-get install -y cron locales-all net-tools wget' -CONFIG: - type: aio - log_level: debug diff --git a/spec/acceptance/nodesets/debian-8-x86_64-docker.yml b/spec/acceptance/nodesets/debian-8-x86_64-docker.yml deleted file mode 100644 index ca322f2c..00000000 --- a/spec/acceptance/nodesets/debian-8-x86_64-docker.yml +++ /dev/null @@ -1,16 +0,0 @@ ---- -HOSTS: - debian-8-x64: - default_apply_opts: - order: random - strict_variables: - platform: debian-8-amd64 - hypervisor: docker - image: debian:8 - docker_preserve_image: true - docker_cmd: '["/sbin/init"]' - docker_image_commands: - - 'apt-get install -y cron wget' -CONFIG: - type: foss - log_level: debug diff --git a/spec/acceptance/nodesets/debian-8-x86_64-openstack.yml b/spec/acceptance/nodesets/debian-8-x86_64-openstack.yml deleted file mode 100644 index ba88c8e1..00000000 --- a/spec/acceptance/nodesets/debian-8-x86_64-openstack.yml +++ /dev/null @@ -1,15 +0,0 @@ ---- -HOSTS: - debian-8-x64: - default_apply_opts: - order: random - strict_variables: - platform: debian-8-amd64 - hypervisor: openstack - flavor: m1.small - image: debian-8-latest - user: debian -CONFIG: - type: foss - log_level: debug - openstack_network: default diff --git a/spec/acceptance/nodesets/debian-8-x86_64-vagrant.yml b/spec/acceptance/nodesets/debian-8-x86_64-vagrant.yml deleted file mode 100644 index 7dcf7cd0..00000000 --- a/spec/acceptance/nodesets/debian-8-x86_64-vagrant.yml +++ /dev/null @@ -1,12 +0,0 @@ ---- -HOSTS: - debian-8-x64: - default_apply_opts: - order: random - strict_variables: - platform: debian-8-amd64 - hypervisor: vagrant - box: camptocamp/debian-8-amd64 -CONFIG: - type: foss - log_level: debug diff --git a/spec/acceptance/nodesets/debian-8.yml b/spec/acceptance/nodesets/debian-8.yml deleted file mode 100644 index e6b77010..00000000 --- a/spec/acceptance/nodesets/debian-8.yml +++ /dev/null @@ -1,17 +0,0 @@ ---- -HOSTS: - debian-8-x64: - default_apply_opts: - order: random - strict_variables: - platform: debian-8-amd64 - hypervisor: docker - image: debian:8 - docker_preserve_image: true - docker_cmd: '["/sbin/init"]' - docker_image_commands: - - 'apt-get install -y cron locales-all net-tools wget' - - 'rm -f /usr/sbin/policy-rc.d' -CONFIG: - type: aio - log_level: debug diff --git a/spec/acceptance/nodesets/opensuse-15.1.yml b/spec/acceptance/nodesets/opensuse-15.1.yml deleted file mode 100644 index 769499a9..00000000 --- a/spec/acceptance/nodesets/opensuse-15.1.yml +++ /dev/null @@ -1,16 +0,0 @@ ---- -HOSTS: - opensuse-15-x64: - default_apply_opts: - order: random - strict_variables: - platform: opensuse-15-amd64 - hypervisor: docker - image: opensuse/leap:15 - docker_preserve_image: true - docker_cmd: '["/sbin/init"]' - docker_image_commands: - - 'zypper install -y cronie tar wget iproute2' -CONFIG: - type: foss - log_level: debug diff --git a/spec/acceptance/nodesets/opensuse-15.2.yml b/spec/acceptance/nodesets/opensuse-15.2.yml deleted file mode 100644 index 769499a9..00000000 --- a/spec/acceptance/nodesets/opensuse-15.2.yml +++ /dev/null @@ -1,16 +0,0 @@ ---- -HOSTS: - opensuse-15-x64: - default_apply_opts: - order: random - strict_variables: - platform: opensuse-15-amd64 - hypervisor: docker - image: opensuse/leap:15 - docker_preserve_image: true - docker_cmd: '["/sbin/init"]' - docker_image_commands: - - 'zypper install -y cronie tar wget iproute2' -CONFIG: - type: foss - log_level: debug diff --git a/spec/acceptance/nodesets/opensuse-15.yml b/spec/acceptance/nodesets/opensuse-15.yml deleted file mode 100644 index 769499a9..00000000 --- a/spec/acceptance/nodesets/opensuse-15.yml +++ /dev/null @@ -1,16 +0,0 @@ ---- -HOSTS: - opensuse-15-x64: - default_apply_opts: - order: random - strict_variables: - platform: opensuse-15-amd64 - hypervisor: docker - image: opensuse/leap:15 - docker_preserve_image: true - docker_cmd: '["/sbin/init"]' - docker_image_commands: - - 'zypper install -y cronie tar wget iproute2' -CONFIG: - type: foss - log_level: debug diff --git a/spec/acceptance/nodesets/ubuntu-10.04-x86_64-docker.yml b/spec/acceptance/nodesets/ubuntu-10.04-x86_64-docker.yml deleted file mode 100644 index 15756594..00000000 --- a/spec/acceptance/nodesets/ubuntu-10.04-x86_64-docker.yml +++ /dev/null @@ -1,15 +0,0 @@ ---- -HOSTS: - ubuntu-1004-x64: - default_apply_opts: - order: random - strict_variables: - platform: ubuntu-10.04-amd64 - hypervisor: docker - image: ubuntu:10.04 - # This stops the image from being deleted on completion - # speeding up the process. - docker_preserve_image: true -CONFIG: - type: foss - log_level: debug diff --git a/spec/acceptance/nodesets/ubuntu-12.04-x86_64-docker.yml b/spec/acceptance/nodesets/ubuntu-12.04-x86_64-docker.yml deleted file mode 100644 index 80aeb07e..00000000 --- a/spec/acceptance/nodesets/ubuntu-12.04-x86_64-docker.yml +++ /dev/null @@ -1,16 +0,0 @@ ---- -HOSTS: - ubuntu-1204-x64: - default_apply_opts: - order: random - strict_variables: - platform: ubuntu-12.04-amd64 - hypervisor: docker - image: ubuntu:12.04 - docker_preserve_image: true - docker_cmd: '["/sbin/init"]' - docker_image_commands: - - 'apt-get install -y wget' -CONFIG: - type: foss - log_level: debug diff --git a/spec/acceptance/nodesets/ubuntu-12.04-x86_64-openstack.yml b/spec/acceptance/nodesets/ubuntu-12.04-x86_64-openstack.yml deleted file mode 100644 index cfe88c33..00000000 --- a/spec/acceptance/nodesets/ubuntu-12.04-x86_64-openstack.yml +++ /dev/null @@ -1,15 +0,0 @@ ---- -HOSTS: - ubuntu-1204-x64: - default_apply_opts: - order: random - strict_variables: - platform: ubuntu-12.04-amd64 - hypervisor: openstack - flavor: m1.small - image: ubuntu-1204-latest - user: ubuntu -CONFIG: - type: foss - log_level: debug - openstack_network: default diff --git a/spec/acceptance/nodesets/ubuntu-12.04.yml b/spec/acceptance/nodesets/ubuntu-12.04.yml deleted file mode 100644 index 13e0d81d..00000000 --- a/spec/acceptance/nodesets/ubuntu-12.04.yml +++ /dev/null @@ -1,17 +0,0 @@ ---- -HOSTS: - ubuntu-1204-x64: - default_apply_opts: - order: random - strict_variables: - platform: ubuntu-12.04-amd64 - hypervisor: docker - image: ubuntu:12.04 - docker_preserve_image: true - docker_cmd: '["/sbin/init"]' - docker_image_commands: - - 'apt-get install -y net-tools wget' - - 'locale-gen en_US.UTF-8' -CONFIG: - type: aio - log_level: debug diff --git a/spec/acceptance/nodesets/ubuntu-14.04-x86_64-docker.yml b/spec/acceptance/nodesets/ubuntu-14.04-x86_64-docker.yml deleted file mode 100644 index cd0c0ed8..00000000 --- a/spec/acceptance/nodesets/ubuntu-14.04-x86_64-docker.yml +++ /dev/null @@ -1,16 +0,0 @@ ---- -HOSTS: - ubuntu-1404-x64: - default_apply_opts: - order: random - strict_variables: - platform: ubuntu-14.04-amd64 - hypervisor: docker - image: ubuntu:14.04 - docker_preserve_image: true - docker_cmd: '["/sbin/init"]' - docker_image_commands: - - 'apt-get install -y wget' -CONFIG: - type: foss - log_level: debug diff --git a/spec/acceptance/nodesets/ubuntu-14.04-x86_64-openstack.yml b/spec/acceptance/nodesets/ubuntu-14.04-x86_64-openstack.yml deleted file mode 100644 index 760a4b90..00000000 --- a/spec/acceptance/nodesets/ubuntu-14.04-x86_64-openstack.yml +++ /dev/null @@ -1,15 +0,0 @@ ---- -HOSTS: - ubuntu-1404-x64: - default_apply_opts: - order: random - strict_variables: - platform: ubuntu-14.04-amd64 - hypervisor: openstack - flavor: m1.small - image: ubuntu-1404-latest - user: ubuntu -CONFIG: - type: foss - log_level: debug - openstack_network: default diff --git a/spec/acceptance/nodesets/ubuntu-14.04-x86_64-vagrant.yml b/spec/acceptance/nodesets/ubuntu-14.04-x86_64-vagrant.yml deleted file mode 100644 index 2ae40c59..00000000 --- a/spec/acceptance/nodesets/ubuntu-14.04-x86_64-vagrant.yml +++ /dev/null @@ -1,12 +0,0 @@ ---- -HOSTS: - ubuntu-1404-x64: - default_apply_opts: - order: random - strict_variables: - platform: ubuntu-14.04-amd64 - hypervisor: vagrant - box: puppetlabs/ubuntu-14.04-64-nocm -CONFIG: - type: foss - log_level: debug diff --git a/spec/acceptance/nodesets/ubuntu-14.04.yml b/spec/acceptance/nodesets/ubuntu-14.04.yml deleted file mode 100644 index ca6fd492..00000000 --- a/spec/acceptance/nodesets/ubuntu-14.04.yml +++ /dev/null @@ -1,19 +0,0 @@ ---- -HOSTS: - ubuntu-1404-x64: - default_apply_opts: - order: random - strict_variables: - platform: ubuntu-14.04-amd64 - hypervisor: docker - image: ubuntu:14.04 - docker_preserve_image: true - docker_cmd: '["/sbin/init"]' - docker_image_commands: - - 'rm /usr/sbin/policy-rc.d' - - 'rm /sbin/initctl; dpkg-divert --rename --remove /sbin/initctl' - - 'apt-get install -y net-tools wget' - - 'locale-gen en_US.UTF-8' -CONFIG: - type: aio - log_level: debug diff --git a/spec/acceptance/nodesets/ubuntu-14.10-x86_64-docker.yml b/spec/acceptance/nodesets/ubuntu-14.10-x86_64-docker.yml deleted file mode 100644 index f0fe17e7..00000000 --- a/spec/acceptance/nodesets/ubuntu-14.10-x86_64-docker.yml +++ /dev/null @@ -1,16 +0,0 @@ ---- -HOSTS: - ubuntu-1410-x64: - default_apply_opts: - order: random - strict_variables: - platform: ubuntu-14.10-amd64 - hypervisor: docker - image: ubuntu:14.10 - docker_preserve_image: true - docker_cmd: '["/sbin/init"]' - docker_image_commands: - - 'apt-get install -y wget' -CONFIG: - type: foss - log_level: debug diff --git a/spec/acceptance/nodesets/ubuntu-14.10-x86_64-openstack.yml b/spec/acceptance/nodesets/ubuntu-14.10-x86_64-openstack.yml deleted file mode 100644 index aa3a54fa..00000000 --- a/spec/acceptance/nodesets/ubuntu-14.10-x86_64-openstack.yml +++ /dev/null @@ -1,15 +0,0 @@ ---- -HOSTS: - ubuntu-1410-x64: - default_apply_opts: - order: random - strict_variables: - platform: ubuntu-14.10-amd64 - hypervisor: openstack - flavor: m1.small - image: ubuntu-1410-latest - user: ubuntu -CONFIG: - type: foss - log_level: debug - openstack_network: default diff --git a/spec/acceptance/nodesets/ubuntu-14.10.yml b/spec/acceptance/nodesets/ubuntu-14.10.yml deleted file mode 100644 index c2534899..00000000 --- a/spec/acceptance/nodesets/ubuntu-14.10.yml +++ /dev/null @@ -1,19 +0,0 @@ ---- -HOSTS: - ubuntu-1410-x64: - default_apply_opts: - order: random - strict_variables: - platform: ubuntu-14.10-amd64 - hypervisor: docker - image: ubuntu:14.10 - docker_preserve_image: true - docker_cmd: '["/sbin/init"]' - docker_image_commands: - - 'rm /usr/sbin/policy-rc.d' - - 'rm /sbin/initctl; dpkg-divert --rename --remove /sbin/initctl' - - 'apt-get install -y net-tools wget' - - 'locale-gen en_US.UTF-8' -CONFIG: - type: aio - log_level: debug diff --git a/spec/acceptance/nodesets/ubuntu-15.04-x86_64-docker.yml b/spec/acceptance/nodesets/ubuntu-15.04-x86_64-docker.yml deleted file mode 100644 index 50a4f6ec..00000000 --- a/spec/acceptance/nodesets/ubuntu-15.04-x86_64-docker.yml +++ /dev/null @@ -1,16 +0,0 @@ ---- -HOSTS: - ubuntu-1504-x64: - default_apply_opts: - order: random - strict_variables: - platform: ubuntu-15.04-amd64 - hypervisor: docker - image: ubuntu:15.04 - docker_preserve_image: true - docker_cmd: '["/sbin/init"]' - docker_image_commands: - - 'apt-get install -y wget' -CONFIG: - type: foss - log_level: debug diff --git a/spec/acceptance/nodesets/ubuntu-15.04-x86_64-openstack.yml b/spec/acceptance/nodesets/ubuntu-15.04-x86_64-openstack.yml deleted file mode 100644 index 40fd518a..00000000 --- a/spec/acceptance/nodesets/ubuntu-15.04-x86_64-openstack.yml +++ /dev/null @@ -1,15 +0,0 @@ ---- -HOSTS: - ubuntu-1504-x64: - default_apply_opts: - order: random - strict_variables: - platform: ubuntu-15.04-amd64 - hypervisor: openstack - flavor: m1.small - image: ubuntu-1504-latest - user: ubuntu -CONFIG: - type: foss - log_level: debug - openstack_network: default diff --git a/spec/acceptance/nodesets/ubuntu-15.04.yml b/spec/acceptance/nodesets/ubuntu-15.04.yml deleted file mode 100644 index 5e20aa52..00000000 --- a/spec/acceptance/nodesets/ubuntu-15.04.yml +++ /dev/null @@ -1,17 +0,0 @@ ---- -HOSTS: - ubuntu-1504-x64: - default_apply_opts: - order: random - strict_variables: - platform: ubuntu-15.04-amd64 - hypervisor: docker - image: ubuntu:15.04 - docker_preserve_image: true - docker_cmd: '["/sbin/init"]' - docker_image_commands: - - 'apt-get install -y net-tools wget' - - 'locale-gen en_US.UTF-8' -CONFIG: - type: aio - log_level: debug diff --git a/spec/acceptance/nodesets/ubuntu-15.10.yml b/spec/acceptance/nodesets/ubuntu-15.10.yml deleted file mode 100644 index 7551cdd1..00000000 --- a/spec/acceptance/nodesets/ubuntu-15.10.yml +++ /dev/null @@ -1,17 +0,0 @@ ---- -HOSTS: - ubuntu-1510-x64: - default_apply_opts: - order: random - strict_variables: - platform: ubuntu-15.10-amd64 - hypervisor: docker - image: ubuntu:15.10 - docker_preserve_image: true - docker_cmd: '["/sbin/init"]' - docker_image_commands: - - 'apt-get install -y net-tools wget' - - 'locale-gen en_US.UTF-8' -CONFIG: - type: aio - log_level: debug diff --git a/spec/acceptance/nodesets/ubuntu-16.04.yml b/spec/acceptance/nodesets/ubuntu-16.04.yml deleted file mode 100644 index 73fbdfff..00000000 --- a/spec/acceptance/nodesets/ubuntu-16.04.yml +++ /dev/null @@ -1,17 +0,0 @@ ---- -HOSTS: - ubuntu-1604-x64: - default_apply_opts: - order: random - strict_variables: - platform: ubuntu-16.04-amd64 - hypervisor: docker - image: ubuntu:16.04 - docker_preserve_image: true - docker_cmd: '["/sbin/init"]' - docker_image_commands: - - 'apt-get install -y net-tools wget' - - 'locale-gen en_US.UTF-8' -CONFIG: - type: aio - log_level: debug From 3243cf22d576eb53c6d2567fb5c98894acbece23 Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Mon, 14 Jun 2021 10:38:04 +0200 Subject: [PATCH 11/17] rubocop: disable RSpec/MessageSpies --- spec/unit/facter/systemd_version_spec.rb | 4 ++-- spec/unit/puppet/provider/loginctl_user/ruby_spec.rb | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/spec/unit/facter/systemd_version_spec.rb b/spec/unit/facter/systemd_version_spec.rb index 6342c8ad..2b3845ce 100644 --- a/spec/unit/facter/systemd_version_spec.rb +++ b/spec/unit/facter/systemd_version_spec.rb @@ -13,7 +13,7 @@ let(:facts) { { systemd: true } } it do - expect(Facter::Util::Resolution).to receive(:exec).with("systemctl --version | awk '/systemd/{ print $2 }'").and_return('229') + expect(Facter::Util::Resolution).to receive(:exec).with("systemctl --version | awk '/systemd/{ print $2 }'").and_return('229') # rubocop:disable RSpec/MessageSpies expect(Facter.value(:systemd_version)).to eq('229') end end @@ -24,7 +24,7 @@ let(:facts) { { systemd: false } } it do - expect(Facter::Util::Resolution).not_to receive(:exec).with("systemctl --version | awk '/systemd/{ print $2 }'") + expect(Facter::Util::Resolution).not_to receive(:exec).with("systemctl --version | awk '/systemd/{ print $2 }'") # rubocop:disable RSpec/MessageSpies expect(Facter.value(:systemd_version)).to eq(nil) end end diff --git a/spec/unit/puppet/provider/loginctl_user/ruby_spec.rb b/spec/unit/puppet/provider/loginctl_user/ruby_spec.rb index 76eb813b..b3a7db17 100644 --- a/spec/unit/puppet/provider/loginctl_user/ruby_spec.rb +++ b/spec/unit/puppet/provider/loginctl_user/ruby_spec.rb @@ -12,10 +12,10 @@ context 'when listing instances' do it 'finds all entries' do - expect(provider_class).to receive(:loginctl). + expect(provider_class).to receive(:loginctl). # rubocop:disable RSpec/MessageSpies with('list-users', '--no-legend'). and_return("0 root\n42 foo\n314 bar\n") - expect(provider_class).to receive(:loginctl). + expect(provider_class).to receive(:loginctl). # rubocop:disable RSpec/MessageSpies with('show-user', '-p', 'Name', '-p', 'Linger', 'root', 'foo', 'bar'). and_return("Name=root\nLinger=no\n\nName=foo\nLinger=yes\n\nName=bar\nLinger=no\n") inst = provider_class.instances.map do |p| @@ -27,13 +27,13 @@ it 'enables linger' do resource = Puppet::Type.type(:loginctl_user).new(common_params) - expect(provider_class).to receive(:loginctl).with('enable-linger', 'foo') + expect(provider_class).to receive(:loginctl).with('enable-linger', 'foo') # rubocop:disable RSpec/MessageSpies resource.provider.linger = :enabled end it 'disables linger' do resource = Puppet::Type.type(:loginctl_user).new(common_params) - expect(provider_class).to receive(:loginctl).with('disable-linger', 'foo') + expect(provider_class).to receive(:loginctl).with('disable-linger', 'foo') # rubocop:disable RSpec/MessageSpies resource.provider.linger = :disabled end end From d88d2d386dec224cf5e4839c03e8fc9468b8f8a9 Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Mon, 14 Jun 2021 10:38:49 +0200 Subject: [PATCH 12/17] cleanup .fixtures.yml --- .fixtures.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.fixtures.yml b/.fixtures.yml index 042021c2..a716d338 100644 --- a/.fixtures.yml +++ b/.fixtures.yml @@ -3,5 +3,3 @@ fixtures: repositories: stdlib: https://github.com/puppetlabs/puppetlabs-stdlib inifile: https://github.com/puppetlabs/puppetlabs-inifile - symlinks: - systemd: "#{source_dir}" From e498b9fb5392da34037075b8fedbeaee5d4e1802 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Pinson?= Date: Mon, 12 Jul 2021 12:04:56 +0200 Subject: [PATCH 13/17] tests: Rename spec/default_module_facts.yaml to spec/default_module_facts.yml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Raphaël Pinson --- spec/{default_module_facts.yaml => default_module_facts.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename spec/{default_module_facts.yaml => default_module_facts.yml} (100%) diff --git a/spec/default_module_facts.yaml b/spec/default_module_facts.yml similarity index 100% rename from spec/default_module_facts.yaml rename to spec/default_module_facts.yml From f4b4de3afd2ed6e7851eee15b4442d5c91dd6f99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Pinson?= Date: Mon, 12 Jul 2021 12:16:39 +0200 Subject: [PATCH 14/17] tests: remove spec_helper_local.rb MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Raphaël Pinson --- spec/spec_helper_local.rb | 23 ----------------------- 1 file changed, 23 deletions(-) delete mode 100644 spec/spec_helper_local.rb diff --git a/spec/spec_helper_local.rb b/spec/spec_helper_local.rb deleted file mode 100644 index af039aa4..00000000 --- a/spec/spec_helper_local.rb +++ /dev/null @@ -1,23 +0,0 @@ -include RspecPuppetFacts -add_custom_fact :systemd_internal_services, YAML.safe_load(File.read(File.expand_path('../default_module_facts.yaml', __FILE__))) - -# HACK: to enable all the expect syntax (like allow_any_instance_of) in rspec-puppet examples -RSpec::Mocks::Syntax.enable_expect(RSpec::Puppet::ManifestMatchers) - -RSpec.configure do |config| - config.before do - # Ensure that we don't accidentally cache facts and environment between - # test cases. This requires each example group to explicitly load the - # facts being exercised with something like - # Facter.collection.loader.load(:ipaddress) - Facter.clear - Facter.clear_messages - - RSpec::Mocks.setup - end - - config.after do - RSpec::Mocks.verify - RSpec::Mocks.teardown - end -end From bcc5894d43291c5f02fa8dda707ae5a7668d99bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Pinson?= Date: Mon, 12 Jul 2021 12:19:11 +0200 Subject: [PATCH 15/17] tests: test default_module_facts to contain systemd_internal_services fact MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Raphaël Pinson --- spec/default_module_facts.yml | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/spec/default_module_facts.yml b/spec/default_module_facts.yml index d89376cc..45841ae7 100644 --- a/spec/default_module_facts.yml +++ b/spec/default_module_facts.yml @@ -1,10 +1,11 @@ --- -systemd-fsck-root.service: enabled-runtime -systemd-journal-gatewayd.service: indirect -systemd-journal-remote.service: indirect -systemd-journal-upload.service: disabled -systemd-networkd-wait-online.service: enabled -systemd-networkd.service: enabled -systemd-nspawn@.service: disabled -systemd-resolved.service: enabled -systemd-timesyncd.service: disabled +systemd_internal_services: + systemd-fsck-root.service: enabled-runtime + systemd-journal-gatewayd.service: indirect + systemd-journal-remote.service: indirect + systemd-journal-upload.service: disabled + systemd-networkd-wait-online.service: enabled + systemd-networkd.service: enabled + systemd-nspawn@.service: disabled + systemd-resolved.service: enabled + systemd-timesyncd.service: disabled From 95f1d6677770256f9103322eeaa5311bedf46d73 Mon Sep 17 00:00:00 2001 From: Cocker Koch Date: Tue, 29 Jun 2021 23:08:55 +0200 Subject: [PATCH 16/17] Accept Datatype Sensitive for $content - just as for systemd::dropin_file, accept Datatype Sensitive for $content - Rspec-Test for sensitive Content --- manifests/unit_file.pp | 2 +- spec/defines/unit_file_spec.rb | 26 +++++++++++++++++++++----- 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/manifests/unit_file.pp b/manifests/unit_file.pp index 09076004..eb5363fd 100644 --- a/manifests/unit_file.pp +++ b/manifests/unit_file.pp @@ -52,7 +52,7 @@ define systemd::unit_file ( Enum['present', 'absent', 'file'] $ensure = 'present', Stdlib::Absolutepath $path = '/etc/systemd/system', - Optional[String] $content = undef, + Optional[Variant[String, Sensitive[String]]] $content = undef, Optional[String] $source = undef, Optional[Stdlib::Absolutepath] $target = undef, String $owner = 'root', diff --git a/spec/defines/unit_file_spec.rb b/spec/defines/unit_file_spec.rb index abd6bdd4..60971097 100644 --- a/spec/defines/unit_file_spec.rb +++ b/spec/defines/unit_file_spec.rb @@ -10,11 +10,27 @@ it { is_expected.to compile.with_all_deps } - it do - is_expected.to create_file("/etc/systemd/system/#{title}"). - with_ensure('file'). - with_content(%r{#{params[:content]}}). - with_mode('0444') + context 'with non-sensitive Content' do + let(:params) { { content: 'non-sensitive Content' } } + + it do + is_expected.to create_file("/etc/systemd/system/#{title}"). + with_ensure('file'). + with_content(params[:content]). + with_mode('0444') + end + end + + context 'with sensitive Content' do + let(:params) { { content: sensitive('sensitive Content') } } + + it do + resource = catalogue.resource("File[/etc/systemd/system/#{title}]") + expect(resource[:content]).to eq(params[:content].unwrap) + + is_expected.to contain_file("/etc/systemd/system/#{title}"). + with({ content: sensitive('sensitive Content') }) + end end context 'with a bad unit type' do From 8bbfd3ec46d9744201c5e532b7c726a84717ab70 Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Mon, 12 Jul 2021 16:37:43 +0200 Subject: [PATCH 17/17] release 3.1.0 --- CHANGELOG.md | 408 ++++++++++++++++++++++++++++++-------------------- README.md | 12 +- metadata.json | 2 +- 3 files changed, 257 insertions(+), 165 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a470b645..ccd01c78 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,270 +1,358 @@ -# Change log +# Changelog -All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org). +All notable changes to this project will be documented in this file. +Each new release typically also includes the latest modulesync defaults. +These should not affect the functionality of the module. -## [3.0.0](https://github.com/camptocamp/puppet-systemd/tree/3.0.0) (2021-04-16) +## [v3.1.0](https://github.com/voxpupuli/puppet-systemd/tree/v3.1.0) (2021-07-12) -[Full Changelog](https://github.com/camptocamp/puppet-systemd/compare/2.12.0...3.0.0) +[Full Changelog](https://github.com/voxpupuli/puppet-systemd/compare/3.0.0...v3.1.0) + +**Implemented enhancements:** + +- Accept Datatype Sensitive for $content [\#201](https://github.com/voxpupuli/puppet-systemd/pull/201) ([cocker-cc](https://github.com/cocker-cc)) + +**Merged pull requests:** + +- Correct puppet-strings documentation [\#192](https://github.com/voxpupuli/puppet-systemd/pull/192) ([ekohl](https://github.com/ekohl)) +- Add notify\_service support to dropin\_file [\#191](https://github.com/voxpupuli/puppet-systemd/pull/191) ([ekohl](https://github.com/ekohl)) + +## [3.0.0](https://github.com/voxpupuli/puppet-systemd/tree/3.0.0) (2021-04-16) + +[Full Changelog](https://github.com/voxpupuli/puppet-systemd/compare/2.12.0...3.0.0) **Breaking changes:** -- Drop Puppet 4 and 5 support + daemon-reload code [\#171](https://github.com/camptocamp/puppet-systemd/pull/171) ([ekohl](https://github.com/ekohl)) +- Drop Puppet 4 and 5 support + daemon-reload code [\#171](https://github.com/voxpupuli/puppet-systemd/pull/171) ([ekohl](https://github.com/ekohl)) + +**Implemented enhancements:** + +- add ubuntu2004 [\#187](https://github.com/voxpupuli/puppet-systemd/pull/187) ([GervaisdeM](https://github.com/GervaisdeM)) +- allow Puppet 7 and add to Travis testing; remove Puppet 5 from Travis testing [\#183](https://github.com/voxpupuli/puppet-systemd/pull/183) ([kenyon](https://github.com/kenyon)) +- metadata: allow stdlib 7.0.0 and inifile 5.0.0 [\#182](https://github.com/voxpupuli/puppet-systemd/pull/182) ([kenyon](https://github.com/kenyon)) + +**Closed issues:** + +- Static units cannot be enabled [\#180](https://github.com/voxpupuli/puppet-systemd/issues/180) +- Cyclic dependency error when using systemd::unit\_file in multiple classes [\#178](https://github.com/voxpupuli/puppet-systemd/issues/178) + +**Merged pull requests:** + +- release 3.0.0 [\#189](https://github.com/voxpupuli/puppet-systemd/pull/189) ([bastelfreak](https://github.com/bastelfreak)) +- Bump version to 3.0.0-rc0 [\#186](https://github.com/voxpupuli/puppet-systemd/pull/186) ([ekohl](https://github.com/ekohl)) +- Correct path in use\_stub\_resolver documentation [\#177](https://github.com/voxpupuli/puppet-systemd/pull/177) ([ekohl](https://github.com/ekohl)) + +## [2.12.0](https://github.com/voxpupuli/puppet-systemd/tree/2.12.0) (2021-02-10) + +[Full Changelog](https://github.com/voxpupuli/puppet-systemd/compare/2.11.0...2.12.0) + +**Implemented enhancements:** + +- Allow service reloading \#159 [\#175](https://github.com/voxpupuli/puppet-systemd/pull/175) ([k0ka](https://github.com/k0ka)) +- Allow additional option for $cache parameter [\#169](https://github.com/voxpupuli/puppet-systemd/pull/169) ([bryangwilliam](https://github.com/bryangwilliam)) +- Add management of udev objects [\#165](https://github.com/voxpupuli/puppet-systemd/pull/165) ([jcpunk](https://github.com/jcpunk)) + +## [2.11.0](https://github.com/voxpupuli/puppet-systemd/tree/2.11.0) (2021-01-19) + +[Full Changelog](https://github.com/voxpupuli/puppet-systemd/compare/2.10.0...2.11.0) + +**Implemented enhancements:** + +- Move lint control statements out of documentation [\#172](https://github.com/voxpupuli/puppet-systemd/pull/172) ([ekohl](https://github.com/ekohl)) +- Permit using arrays to make extending lists easier [\#164](https://github.com/voxpupuli/puppet-systemd/pull/164) ([jcpunk](https://github.com/jcpunk)) +- Add parameter for ENCs to make loginctl\_users easily [\#163](https://github.com/voxpupuli/puppet-systemd/pull/163) ([jcpunk](https://github.com/jcpunk)) +- Fix yamllint [\#161](https://github.com/voxpupuli/puppet-systemd/pull/161) ([jcpunk](https://github.com/jcpunk)) +- Resolve puppet-lint warnings [\#160](https://github.com/voxpupuli/puppet-systemd/pull/160) ([jcpunk](https://github.com/jcpunk)) +- Convert from mocha to rspec-mocks [\#158](https://github.com/voxpupuli/puppet-systemd/pull/158) ([ekohl](https://github.com/ekohl)) +- Add ability to specify supported option 'infinity' for LimitNPROC [\#152](https://github.com/voxpupuli/puppet-systemd/pull/152) ([hdeheer](https://github.com/hdeheer)) + +**Closed issues:** + +- Add support to use infinity with LimitNPROC [\#173](https://github.com/voxpupuli/puppet-systemd/issues/173) +- Need a new release [\#155](https://github.com/voxpupuli/puppet-systemd/issues/155) + +**Merged pull requests:** + +- Fix tests with rspec-puppet 2.8.0 [\#174](https://github.com/voxpupuli/puppet-systemd/pull/174) ([raphink](https://github.com/raphink)) + +## [2.10.0](https://github.com/voxpupuli/puppet-systemd/tree/2.10.0) (2020-08-21) + +[Full Changelog](https://github.com/voxpupuli/puppet-systemd/compare/2.9.0...2.10.0) **Implemented enhancements:** -- add ubuntu2004 [\#187](https://github.com/camptocamp/puppet-systemd/pull/187) ([GervaisdeM](https://github.com/GervaisdeM)) -- allow Puppet 7 and add to Travis testing; remove Puppet 5 from Travis testing [\#183](https://github.com/camptocamp/puppet-systemd/pull/183) ([kenyon](https://github.com/kenyon)) -- metadata: allow stdlib 7.0.0 and inifile 5.0.0 [\#182](https://github.com/camptocamp/puppet-systemd/pull/182) ([kenyon](https://github.com/kenyon)) +- Fix typo in parameter name in class documentation [\#156](https://github.com/voxpupuli/puppet-systemd/pull/156) ([ekohl](https://github.com/ekohl)) +- Add selinux\_ignore\_defaults support to dropin\_file and service\_limits [\#151](https://github.com/voxpupuli/puppet-systemd/pull/151) ([tobias-urdin](https://github.com/tobias-urdin)) +- pdk update [\#150](https://github.com/voxpupuli/puppet-systemd/pull/150) ([TheMeier](https://github.com/TheMeier)) +- add factory for dropin files [\#149](https://github.com/voxpupuli/puppet-systemd/pull/149) ([TheMeier](https://github.com/TheMeier)) **Closed issues:** -- Static units cannot be enabled [\#180](https://github.com/camptocamp/puppet-systemd/issues/180) -- Cyclic dependency error when using systemd::unit\_file in multiple classes [\#178](https://github.com/camptocamp/puppet-systemd/issues/178) +- add timer support [\#118](https://github.com/voxpupuli/puppet-systemd/issues/118) +- Cache cannot be set to no in /etc/systemd/resolved.conf [\#113](https://github.com/voxpupuli/puppet-systemd/issues/113) +- Please release a new version with stdlib 6 support [\#105](https://github.com/voxpupuli/puppet-systemd/issues/105) +- Regex error when tying to set CPUQuota service limit. [\#91](https://github.com/voxpupuli/puppet-systemd/issues/91) +- Include puppetlabs-inifile in the dependencies list [\#77](https://github.com/voxpupuli/puppet-systemd/issues/77) +- migration path drop in file from 0.4.0 to 1.0.0 [\#40](https://github.com/voxpupuli/puppet-systemd/issues/40) +- 'systemctl daemon-reload' is not qualified [\#22](https://github.com/voxpupuli/puppet-systemd/issues/22) **Merged pull requests:** -- Bump version to 3.0.0-rc0 [\#186](https://github.com/camptocamp/puppet-systemd/pull/186) ([ekohl](https://github.com/ekohl)) -- Correct path in use\_stub\_resolver documentation [\#177](https://github.com/camptocamp/puppet-systemd/pull/177) ([ekohl](https://github.com/ekohl)) +- Use @api private instead of a NOTE [\#157](https://github.com/voxpupuli/puppet-systemd/pull/157) ([raphink](https://github.com/raphink)) +- Allow CPUQuota greater than 100% [\#147](https://github.com/voxpupuli/puppet-systemd/pull/147) ([Hexta](https://github.com/Hexta)) + +## [2.9.0](https://github.com/voxpupuli/puppet-systemd/tree/2.9.0) (2020-03-11) -## [2.12.0](https://github.com/camptocamp/puppet-systemd/tree/2.12.0) (2021-02-10) +[Full Changelog](https://github.com/voxpupuli/puppet-systemd/compare/2.8.0...2.9.0) -[Full Changelog](https://github.com/camptocamp/puppet-systemd/compare/2.11.0...2.12.0) +**Breaking changes:** -### Added +- Revert "add option for persistent logging \(\#127\)" [\#146](https://github.com/voxpupuli/puppet-systemd/pull/146) ([bastelfreak](https://github.com/bastelfreak)) +- add option for persistent logging [\#127](https://github.com/voxpupuli/puppet-systemd/pull/127) ([djvl](https://github.com/djvl)) -- Allow service reloading \#159 [\#175](https://github.com/camptocamp/puppet-systemd/pull/175) ([k0ka](https://github.com/k0ka)) -- Allow additional option for $cache parameter [\#169](https://github.com/camptocamp/puppet-systemd/pull/169) ([bryangwilliam](https://github.com/bryangwilliam)) -- Add management of udev objects [\#165](https://github.com/camptocamp/puppet-systemd/pull/165) ([jcpunk](https://github.com/jcpunk)) +**Implemented enhancements:** -## [2.11.0](https://github.com/camptocamp/puppet-systemd/tree/2.11.0) (2021-01-19) +- Add EL8 Support [\#144](https://github.com/voxpupuli/puppet-systemd/pull/144) ([trevor-vaughan](https://github.com/trevor-vaughan)) +- Add Fedora 30/31 compatibility [\#141](https://github.com/voxpupuli/puppet-systemd/pull/141) ([bastelfreak](https://github.com/bastelfreak)) +- New systemd::timer define type [\#138](https://github.com/voxpupuli/puppet-systemd/pull/138) ([mmoll](https://github.com/mmoll)) +- Add SLES 12/15 support [\#137](https://github.com/voxpupuli/puppet-systemd/pull/137) ([msurato](https://github.com/msurato)) -[Full Changelog](https://github.com/camptocamp/puppet-systemd/compare/2.10.0...2.11.0) +**Closed issues:** -### Added +- Discussion: use class instead of exec for notification [\#2](https://github.com/voxpupuli/puppet-systemd/issues/2) + +**Merged pull requests:** -- Permit using arrays to make extending lists easier [\#164](https://github.com/camptocamp/puppet-systemd/pull/164) ([jcpunk](https://github.com/jcpunk)) -- Add parameter for ENCs to make loginctl\_users easily [\#163](https://github.com/camptocamp/puppet-systemd/pull/163) ([jcpunk](https://github.com/jcpunk)) -- Add ability to specify supported option 'infinity' for LimitNPROC [\#152](https://github.com/camptocamp/puppet-systemd/pull/152) ([hdeheer](https://github.com/hdeheer)) +- Release of 2.9.0 [\#145](https://github.com/voxpupuli/puppet-systemd/pull/145) ([trevor-vaughan](https://github.com/trevor-vaughan)) +- fix Issue 113 [\#140](https://github.com/voxpupuli/puppet-systemd/pull/140) ([schlitzered](https://github.com/schlitzered)) -### Fixed +## [2.8.0](https://github.com/voxpupuli/puppet-systemd/tree/2.8.0) (2020-01-08) -- Fix tests with rspec-puppet 2.8.0 [\#174](https://github.com/camptocamp/puppet-systemd/pull/174) ([raphink](https://github.com/raphink)) +[Full Changelog](https://github.com/voxpupuli/puppet-systemd/compare/2.7.0...2.8.0) -## [2.10.0](https://github.com/camptocamp/puppet-systemd/tree/2.10.0) (2020-08-21) +**Implemented enhancements:** + +- Rubocop [\#135](https://github.com/voxpupuli/puppet-systemd/pull/135) ([raphink](https://github.com/raphink)) +- Convert to PDK [\#132](https://github.com/voxpupuli/puppet-systemd/pull/132) ([raphink](https://github.com/raphink)) +- Add loginctl\_user type/provider [\#131](https://github.com/voxpupuli/puppet-systemd/pull/131) ([raphink](https://github.com/raphink)) +- Update types to avoid / in unit or drop file name [\#130](https://github.com/voxpupuli/puppet-systemd/pull/130) ([traylenator](https://github.com/traylenator)) +- Force tmpfiles.d drop file to end in .conf [\#129](https://github.com/voxpupuli/puppet-systemd/pull/129) ([traylenator](https://github.com/traylenator)) +- Add OOMScoreAdjust to Systemd::ServiceLimits type [\#128](https://github.com/voxpupuli/puppet-systemd/pull/128) ([jlutran](https://github.com/jlutran)) +- allow puppetlabs/inifile 4.x [\#126](https://github.com/voxpupuli/puppet-systemd/pull/126) ([bastelfreak](https://github.com/bastelfreak)) + +**Merged pull requests:** -[Full Changelog](https://github.com/camptocamp/puppet-systemd/compare/2.9.0...2.10.0) +- Release 2.8.0 [\#134](https://github.com/voxpupuli/puppet-systemd/pull/134) ([raphink](https://github.com/raphink)) +- Correct CPUQuota service limit regex [\#92](https://github.com/voxpupuli/puppet-systemd/pull/92) ([matt6697](https://github.com/matt6697)) -### Added +## [2.7.0](https://github.com/voxpupuli/puppet-systemd/tree/2.7.0) (2019-10-29) -- Fix typo in parameter name in class documentation [\#156](https://github.com/camptocamp/puppet-systemd/pull/156) ([ekohl](https://github.com/ekohl)) -- Readme formatting [\#154](https://github.com/camptocamp/puppet-systemd/pull/154) ([kenyon](https://github.com/kenyon)) -- Add selinux\_ignore\_defaults support to dropin\_file and service\_limits [\#151](https://github.com/camptocamp/puppet-systemd/pull/151) ([tobias-urdin](https://github.com/tobias-urdin)) -- pdk update [\#150](https://github.com/camptocamp/puppet-systemd/pull/150) ([TheMeier](https://github.com/TheMeier)) -- add factory for dropin files [\#149](https://github.com/camptocamp/puppet-systemd/pull/149) ([TheMeier](https://github.com/TheMeier)) +[Full Changelog](https://github.com/voxpupuli/puppet-systemd/compare/2.6.0...2.7.0) -### Fixed +**Implemented enhancements:** -- Allow CPUQuota greater than 100% [\#147](https://github.com/camptocamp/puppet-systemd/pull/147) ([Hexta](https://github.com/Hexta)) +- add support for 'VirtuozzoLinux 7' [\#121](https://github.com/voxpupuli/puppet-systemd/pull/121) ([kBite](https://github.com/kBite)) +- Manage logind service and configuration [\#120](https://github.com/voxpupuli/puppet-systemd/pull/120) ([fraenki](https://github.com/fraenki)) +- allow Sensitive type for content param [\#115](https://github.com/voxpupuli/puppet-systemd/pull/115) ([TheMeier](https://github.com/TheMeier)) -## [2.9.0](https://github.com/camptocamp/puppet-systemd/tree/2.9.0) (2020-03-11) +**Closed issues:** -[Full Changelog](https://github.com/camptocamp/puppet-systemd/compare/2.8.0...2.9.0) +- vacuum as routine task [\#123](https://github.com/voxpupuli/puppet-systemd/issues/123) +- Manage dropin\_file for target type systemd unit [\#117](https://github.com/voxpupuli/puppet-systemd/issues/117) +- Allow Sensitive type for systemd::dropin\_file::content [\#114](https://github.com/voxpupuli/puppet-systemd/issues/114) -### Added +**Merged pull requests:** -- Add EL8 Support [\#144](https://github.com/camptocamp/puppet-systemd/pull/144) ([trevor-vaughan](https://github.com/trevor-vaughan)) -- Add Fedora 30/31 compatibility [\#141](https://github.com/camptocamp/puppet-systemd/pull/141) ([bastelfreak](https://github.com/bastelfreak)) -- New systemd::timer define type [\#138](https://github.com/camptocamp/puppet-systemd/pull/138) ([mmoll](https://github.com/mmoll)) -- Add SLES 12/15 support [\#137](https://github.com/camptocamp/puppet-systemd/pull/137) ([msurato](https://github.com/msurato)) +- Correct order when ensuring unit files are absent [\#122](https://github.com/voxpupuli/puppet-systemd/pull/122) ([ekohl](https://github.com/ekohl)) -### Fixed +## [2.6.0](https://github.com/voxpupuli/puppet-systemd/tree/2.6.0) (2019-06-17) -- fix Issue 113 [\#140](https://github.com/camptocamp/puppet-systemd/pull/140) ([schlitzered](https://github.com/schlitzered)) +[Full Changelog](https://github.com/voxpupuli/puppet-systemd/compare/2.5.1...2.6.0) -## [2.8.0](https://github.com/camptocamp/puppet-systemd/tree/2.8.0) (2020-01-08) +**Implemented enhancements:** -[Full Changelog](https://github.com/camptocamp/puppet-systemd/compare/2.7.0...2.8.0) +- Allow for lazy/eager systemctl daemon reloading [\#111](https://github.com/voxpupuli/puppet-systemd/pull/111) ([JohnLyman](https://github.com/JohnLyman)) +- Remove stray `v` from Changelog `config.future_release` [\#110](https://github.com/voxpupuli/puppet-systemd/pull/110) ([alexjfisher](https://github.com/alexjfisher)) -### Added +## [2.5.1](https://github.com/voxpupuli/puppet-systemd/tree/2.5.1) (2019-05-29) -- Rubocop [\#135](https://github.com/camptocamp/puppet-systemd/pull/135) ([raphink](https://github.com/raphink)) -- Convert to PDK [\#132](https://github.com/camptocamp/puppet-systemd/pull/132) ([raphink](https://github.com/raphink)) -- Add loginctl\_user type/provider [\#131](https://github.com/camptocamp/puppet-systemd/pull/131) ([raphink](https://github.com/raphink)) -- Update types to avoid / in unit or drop file name [\#130](https://github.com/camptocamp/puppet-systemd/pull/130) ([traylenator](https://github.com/traylenator)) -- Force tmpfiles.d drop file to end in .conf [\#129](https://github.com/camptocamp/puppet-systemd/pull/129) ([traylenator](https://github.com/traylenator)) -- Add OOMScoreAdjust to Systemd::ServiceLimits type [\#128](https://github.com/camptocamp/puppet-systemd/pull/128) ([jlutran](https://github.com/jlutran)) -- allow puppetlabs/inifile 4.x [\#126](https://github.com/camptocamp/puppet-systemd/pull/126) ([bastelfreak](https://github.com/bastelfreak)) +[Full Changelog](https://github.com/voxpupuli/puppet-systemd/compare/2.5.0...2.5.1) -### Fixed +**Implemented enhancements:** -- Correct CPUQuota service limit regex [\#92](https://github.com/camptocamp/puppet-systemd/pull/92) ([matt6697](https://github.com/matt6697)) +- Pin `public_suffix` to `3.0.3` on rvm 2.1.9 builds [\#108](https://github.com/voxpupuli/puppet-systemd/pull/108) ([alexjfisher](https://github.com/alexjfisher)) +- run CI jobs on xenial instead of trusty [\#107](https://github.com/voxpupuli/puppet-systemd/pull/107) ([bastelfreak](https://github.com/bastelfreak)) -## [2.7.0](https://github.com/camptocamp/puppet-systemd/tree/2.7.0) (2019-10-29) +## [2.5.0](https://github.com/voxpupuli/puppet-systemd/tree/2.5.0) (2019-05-29) -[Full Changelog](https://github.com/camptocamp/puppet-systemd/compare/2.6.0...2.7.0) +[Full Changelog](https://github.com/voxpupuli/puppet-systemd/compare/2.4.0...2.5.0) -### Added +**Implemented enhancements:** -- add support for 'VirtuozzoLinux 7' [\#121](https://github.com/camptocamp/puppet-systemd/pull/121) ([kBite](https://github.com/kBite)) -- Manage logind service and configuration [\#120](https://github.com/camptocamp/puppet-systemd/pull/120) ([fraenki](https://github.com/fraenki)) -- allow Sensitive type for content param [\#115](https://github.com/camptocamp/puppet-systemd/pull/115) ([TheMeier](https://github.com/TheMeier)) +- Allow `puppetlabs/stdlib` 6.x [\#103](https://github.com/voxpupuli/puppet-systemd/pull/103) ([alexjfisher](https://github.com/alexjfisher)) -### Fixed +## [2.4.0](https://github.com/voxpupuli/puppet-systemd/tree/2.4.0) (2019-04-29) -- Correct order when ensuring unit files are absent [\#122](https://github.com/camptocamp/puppet-systemd/pull/122) ([ekohl](https://github.com/ekohl)) +[Full Changelog](https://github.com/voxpupuli/puppet-systemd/compare/2.3.0...2.4.0) -## [2.6.0](https://github.com/camptocamp/puppet-systemd/tree/2.6.0) (2019-06-17) +**Implemented enhancements:** -[Full Changelog](https://github.com/camptocamp/puppet-systemd/compare/2.5.1...2.6.0) +- Allow `puppetlabs/inifile` 3.x [\#101](https://github.com/voxpupuli/puppet-systemd/pull/101) ([alexjfisher](https://github.com/alexjfisher)) -### Added +## [2.3.0](https://github.com/voxpupuli/puppet-systemd/tree/2.3.0) (2019-04-10) -- Allow for lazy/eager systemctl daemon reloading [\#111](https://github.com/camptocamp/puppet-systemd/pull/111) ([JohnLyman](https://github.com/JohnLyman)) -- Remove stray `v` from Changelog `config.future_release` [\#110](https://github.com/camptocamp/puppet-systemd/pull/110) ([alexjfisher](https://github.com/alexjfisher)) +[Full Changelog](https://github.com/voxpupuli/puppet-systemd/compare/2.2.0...2.3.0) -## [2.5.1](https://github.com/camptocamp/puppet-systemd/tree/2.5.1) (2019-05-29) +**Implemented enhancements:** -[Full Changelog](https://github.com/camptocamp/puppet-systemd/compare/2.5.0...2.5.1) +- Add parameter to enable/disable the management of journald [\#99](https://github.com/voxpupuli/puppet-systemd/pull/99) ([dhoppe](https://github.com/dhoppe)) -### Added +**Closed issues:** -- Pin `public_suffix` to `3.0.3` on rvm 2.1.9 builds [\#108](https://github.com/camptocamp/puppet-systemd/pull/108) ([alexjfisher](https://github.com/alexjfisher)) -- run CI jobs on xenial instead of trusty [\#107](https://github.com/camptocamp/puppet-systemd/pull/107) ([bastelfreak](https://github.com/bastelfreak)) +- Puppet version compatibility [\#34](https://github.com/voxpupuli/puppet-systemd/issues/34) -## [2.5.0](https://github.com/camptocamp/puppet-systemd/tree/2.5.0) (2019-05-29) +## [2.2.0](https://github.com/voxpupuli/puppet-systemd/tree/2.2.0) (2019-02-25) -[Full Changelog](https://github.com/camptocamp/puppet-systemd/compare/2.4.0...2.5.0) +[Full Changelog](https://github.com/voxpupuli/puppet-systemd/compare/2.1.0...2.2.0) -### Added +**Implemented enhancements:** -- Allow `puppetlabs/stdlib` 6.x [\#103](https://github.com/camptocamp/puppet-systemd/pull/103) ([alexjfisher](https://github.com/alexjfisher)) +- Puppet 6 support [\#96](https://github.com/voxpupuli/puppet-systemd/pull/96) ([ekohl](https://github.com/ekohl)) +- Allow specifying owner/group/mode/show\_diff [\#94](https://github.com/voxpupuli/puppet-systemd/pull/94) ([simondeziel](https://github.com/simondeziel)) +- Manage journald service and configuration [\#89](https://github.com/voxpupuli/puppet-systemd/pull/89) ([treydock](https://github.com/treydock)) +- Add support for DNSoverTLS [\#88](https://github.com/voxpupuli/puppet-systemd/pull/88) ([shibumi](https://github.com/shibumi)) +- unit.d directory should be purged of unmanaged dropin files [\#41](https://github.com/voxpupuli/puppet-systemd/pull/41) ([treydock](https://github.com/treydock)) +- Add Journald support [\#14](https://github.com/voxpupuli/puppet-systemd/pull/14) ([duritong](https://github.com/duritong)) -## [2.4.0](https://github.com/camptocamp/puppet-systemd/tree/2.4.0) (2019-04-29) +**Closed issues:** -[Full Changelog](https://github.com/camptocamp/puppet-systemd/compare/2.3.0...2.4.0) +- Hiera usage for systemd::unit\_file [\#86](https://github.com/voxpupuli/puppet-systemd/issues/86) +- Please push a new module to the forge that includes service\_limits [\#25](https://github.com/voxpupuli/puppet-systemd/issues/25) -### Added +## [2.1.0](https://github.com/voxpupuli/puppet-systemd/tree/2.1.0) (2018-08-31) -- Allow `puppetlabs/inifile` 3.x [\#101](https://github.com/camptocamp/puppet-systemd/pull/101) ([alexjfisher](https://github.com/alexjfisher)) +[Full Changelog](https://github.com/voxpupuli/puppet-systemd/compare/2.0.0...2.1.0) -## [2.3.0](https://github.com/camptocamp/puppet-systemd/tree/2.3.0) (2019-04-10) +**Implemented enhancements:** -[Full Changelog](https://github.com/camptocamp/puppet-systemd/compare/2.2.0...2.3.0) +- do not access facts as top scope variable [\#85](https://github.com/voxpupuli/puppet-systemd/pull/85) ([bastelfreak](https://github.com/bastelfreak)) +- allow puppetlabs/stdlib 5.x [\#83](https://github.com/voxpupuli/puppet-systemd/pull/83) ([bastelfreak](https://github.com/bastelfreak)) +- Modify service limit type [\#81](https://github.com/voxpupuli/puppet-systemd/pull/81) ([bastelfreak](https://github.com/bastelfreak)) +- Add parameter to select resolver [\#79](https://github.com/voxpupuli/puppet-systemd/pull/79) ([amateo](https://github.com/amateo)) +- Fix CHANGELOG.md duplicate footer [\#78](https://github.com/voxpupuli/puppet-systemd/pull/78) ([alexjfisher](https://github.com/alexjfisher)) -### Added +**Merged pull requests:** -- Add parameter to enable/disable the management of journald [\#99](https://github.com/camptocamp/puppet-systemd/pull/99) ([dhoppe](https://github.com/dhoppe)) +- Handle ensuring service\_limits to be absent [\#80](https://github.com/voxpupuli/puppet-systemd/pull/80) ([ekohl](https://github.com/ekohl)) -## [2.2.0](https://github.com/camptocamp/puppet-systemd/tree/2.2.0) (2019-02-25) +## [2.0.0](https://github.com/voxpupuli/puppet-systemd/tree/2.0.0) (2018-07-11) -[Full Changelog](https://github.com/camptocamp/puppet-systemd/compare/2.1.0...2.2.0) +[Full Changelog](https://github.com/voxpupuli/puppet-systemd/compare/1.1.1...2.0.0) -### Added +**Breaking changes:** -- Puppet 6 support [\#96](https://github.com/camptocamp/puppet-systemd/pull/96) ([ekohl](https://github.com/ekohl)) -- Allow specifying owner/group/mode/show\_diff [\#94](https://github.com/camptocamp/puppet-systemd/pull/94) ([simondeziel](https://github.com/simondeziel)) -- Manage journald service and configuration [\#89](https://github.com/camptocamp/puppet-systemd/pull/89) ([treydock](https://github.com/treydock)) -- Add support for DNSoverTLS [\#88](https://github.com/camptocamp/puppet-systemd/pull/88) ([shibumi](https://github.com/shibumi)) -- unit.d directory should be purged of unmanaged dropin files [\#41](https://github.com/camptocamp/puppet-systemd/pull/41) ([treydock](https://github.com/treydock)) -- Add Journald support [\#14](https://github.com/camptocamp/puppet-systemd/pull/14) ([duritong](https://github.com/duritong)) +- move params to data-in-modules [\#67](https://github.com/voxpupuli/puppet-systemd/pull/67) ([bastelfreak](https://github.com/bastelfreak)) -## [2.1.0](https://github.com/camptocamp/puppet-systemd/tree/2.1.0) (2018-08-31) +**Implemented enhancements:** -[Full Changelog](https://github.com/camptocamp/puppet-systemd/compare/2.0.0...2.1.0) +- add ubuntu 18.04 support [\#72](https://github.com/voxpupuli/puppet-systemd/pull/72) ([bastelfreak](https://github.com/bastelfreak)) +- bump facter to latest 2.x version [\#71](https://github.com/voxpupuli/puppet-systemd/pull/71) ([bastelfreak](https://github.com/bastelfreak)) +- Add enable and active parameters to unit\_file [\#69](https://github.com/voxpupuli/puppet-systemd/pull/69) ([jcharaoui](https://github.com/jcharaoui)) +- Update the documentation of facts [\#68](https://github.com/voxpupuli/puppet-systemd/pull/68) ([ekohl](https://github.com/ekohl)) +- purge legacy puppet-lint checks [\#66](https://github.com/voxpupuli/puppet-systemd/pull/66) ([bastelfreak](https://github.com/bastelfreak)) +- Add support for Resource Accounting via systemd [\#65](https://github.com/voxpupuli/puppet-systemd/pull/65) ([bastelfreak](https://github.com/bastelfreak)) +- Reuse the systemd::dropin\_file in service\_limits [\#61](https://github.com/voxpupuli/puppet-systemd/pull/61) ([ekohl](https://github.com/ekohl)) +- Allow resolved class to configure DNS settings [\#59](https://github.com/voxpupuli/puppet-systemd/pull/59) ([hfm](https://github.com/hfm)) +- Replace iterator with stdlib function [\#58](https://github.com/voxpupuli/puppet-systemd/pull/58) ([jfleury-at-ovh](https://github.com/jfleury-at-ovh)) +- implement github changelog generator [\#45](https://github.com/voxpupuli/puppet-systemd/pull/45) ([bastelfreak](https://github.com/bastelfreak)) -### Added +**Closed issues:** -- do not access facts as top scope variable [\#85](https://github.com/camptocamp/puppet-systemd/pull/85) ([bastelfreak](https://github.com/bastelfreak)) -- allow puppetlabs/stdlib 5.x [\#83](https://github.com/camptocamp/puppet-systemd/pull/83) ([bastelfreak](https://github.com/bastelfreak)) -- Modify service limit type [\#81](https://github.com/camptocamp/puppet-systemd/pull/81) ([bastelfreak](https://github.com/bastelfreak)) -- Add parameter to select resolver [\#79](https://github.com/camptocamp/puppet-systemd/pull/79) ([amateo](https://github.com/amateo)) -- Fix CHANGELOG.md duplicate footer [\#78](https://github.com/camptocamp/puppet-systemd/pull/78) ([alexjfisher](https://github.com/alexjfisher)) +- Better test for systemd \(and other init systems\) [\#37](https://github.com/voxpupuli/puppet-systemd/issues/37) -### Fixed +**Merged pull requests:** -- Handle ensuring service\_limits to be absent [\#80](https://github.com/camptocamp/puppet-systemd/pull/80) ([ekohl](https://github.com/ekohl)) +- fix puppet-linter warnings in README.md [\#75](https://github.com/voxpupuli/puppet-systemd/pull/75) ([bastelfreak](https://github.com/bastelfreak)) +- cleanup README.md [\#60](https://github.com/voxpupuli/puppet-systemd/pull/60) ([bastelfreak](https://github.com/bastelfreak)) -## [2.0.0](https://github.com/camptocamp/puppet-systemd/tree/2.0.0) (2018-07-11) +## [1.1.1](https://github.com/voxpupuli/puppet-systemd/tree/1.1.1) (2017-11-29) -[Full Changelog](https://github.com/camptocamp/puppet-systemd/compare/1.1.1...2.0.0) +[Full Changelog](https://github.com/voxpupuli/puppet-systemd/compare/1.1.0...1.1.1) -### Changed +**Implemented enhancements:** -- move params to data-in-modules [\#67](https://github.com/camptocamp/puppet-systemd/pull/67) ([bastelfreak](https://github.com/bastelfreak)) +- Clean up test tooling [\#54](https://github.com/voxpupuli/puppet-systemd/pull/54) ([ekohl](https://github.com/ekohl)) +- Correct parameter documentation [\#53](https://github.com/voxpupuli/puppet-systemd/pull/53) ([ekohl](https://github.com/ekohl)) +- Use a space-separated in timesyncd.conf [\#50](https://github.com/voxpupuli/puppet-systemd/pull/50) ([hfm](https://github.com/hfm)) +- Use the same systemd drop-in file for different units [\#46](https://github.com/voxpupuli/puppet-systemd/pull/46) ([countsudoku](https://github.com/countsudoku)) -### Added +**Closed issues:** -- add ubuntu 18.04 support [\#72](https://github.com/camptocamp/puppet-systemd/pull/72) ([bastelfreak](https://github.com/bastelfreak)) -- bump facter to latest 2.x version [\#71](https://github.com/camptocamp/puppet-systemd/pull/71) ([bastelfreak](https://github.com/bastelfreak)) -- Add enable and active parameters to unit\_file [\#69](https://github.com/camptocamp/puppet-systemd/pull/69) ([jcharaoui](https://github.com/jcharaoui)) -- Update the documentation of facts [\#68](https://github.com/camptocamp/puppet-systemd/pull/68) ([ekohl](https://github.com/ekohl)) -- purge legacy puppet-lint checks [\#66](https://github.com/camptocamp/puppet-systemd/pull/66) ([bastelfreak](https://github.com/bastelfreak)) -- Add support for Resource Accounting via systemd [\#65](https://github.com/camptocamp/puppet-systemd/pull/65) ([bastelfreak](https://github.com/bastelfreak)) -- Reuse the systemd::dropin\_file in service\_limits [\#61](https://github.com/camptocamp/puppet-systemd/pull/61) ([ekohl](https://github.com/ekohl)) -- Allow resolved class to configure DNS settings [\#59](https://github.com/camptocamp/puppet-systemd/pull/59) ([hfm](https://github.com/hfm)) -- Replace iterator with stdlib function [\#58](https://github.com/camptocamp/puppet-systemd/pull/58) ([jfleury-at-ovh](https://github.com/jfleury-at-ovh)) -- implement github changelog generator [\#45](https://github.com/camptocamp/puppet-systemd/pull/45) ([bastelfreak](https://github.com/bastelfreak)) +- Not able to set limits via systemd class [\#49](https://github.com/voxpupuli/puppet-systemd/issues/49) +- fact systemd\_internal\_services is empty [\#47](https://github.com/voxpupuli/puppet-systemd/issues/47) -### Fixed +**Merged pull requests:** -- fix puppet-linter warnings in README.md [\#75](https://github.com/camptocamp/puppet-systemd/pull/75) ([bastelfreak](https://github.com/bastelfreak)) +- Use the correct type on $service\_limits [\#52](https://github.com/voxpupuli/puppet-systemd/pull/52) ([ekohl](https://github.com/ekohl)) +- Fix issue \#47 [\#48](https://github.com/voxpupuli/puppet-systemd/pull/48) ([axxelG](https://github.com/axxelG)) -## [1.1.1](https://github.com/camptocamp/puppet-systemd/tree/1.1.1) (2017-11-29) +## [1.1.0](https://github.com/voxpupuli/puppet-systemd/tree/1.1.0) (2017-10-24) -[Full Changelog](https://github.com/camptocamp/puppet-systemd/compare/1.1.0...1.1.1) +[Full Changelog](https://github.com/voxpupuli/puppet-systemd/compare/1.0.0...1.1.0) -### Added +**Implemented enhancements:** -- Clean up test tooling [\#54](https://github.com/camptocamp/puppet-systemd/pull/54) ([ekohl](https://github.com/ekohl)) -- Correct parameter documentation [\#53](https://github.com/camptocamp/puppet-systemd/pull/53) ([ekohl](https://github.com/ekohl)) -- Use a space-separated in timesyncd.conf [\#50](https://github.com/camptocamp/puppet-systemd/pull/50) ([hfm](https://github.com/hfm)) -- Use the same systemd drop-in file for different units [\#46](https://github.com/camptocamp/puppet-systemd/pull/46) ([countsudoku](https://github.com/countsudoku)) +- Add systemd-timesyncd support [\#43](https://github.com/voxpupuli/puppet-systemd/pull/43) ([bastelfreak](https://github.com/bastelfreak)) +- Reuse the service\_provider fact from stdlib [\#42](https://github.com/voxpupuli/puppet-systemd/pull/42) ([ekohl](https://github.com/ekohl)) +- \(doc\) Adds examples of running the service created [\#29](https://github.com/voxpupuli/puppet-systemd/pull/29) ([petems](https://github.com/petems)) +- Quote hash keys in example of service limits [\#20](https://github.com/voxpupuli/puppet-systemd/pull/20) ([stbenjam](https://github.com/stbenjam)) -### Fixed +**Closed issues:** -- Use the correct type on $service\_limits [\#52](https://github.com/camptocamp/puppet-systemd/pull/52) ([ekohl](https://github.com/ekohl)) -- Fix issue \#47 [\#48](https://github.com/camptocamp/puppet-systemd/pull/48) ([axxelG](https://github.com/axxelG)) +- Add explicit ordering to README.md [\#24](https://github.com/voxpupuli/puppet-systemd/issues/24) +- Manage drop-in files [\#15](https://github.com/voxpupuli/puppet-systemd/issues/15) -## [1.1.0](https://github.com/camptocamp/puppet-systemd/tree/1.1.0) (2017-10-24) +## [1.0.0](https://github.com/voxpupuli/puppet-systemd/tree/1.0.0) (2017-09-04) -[Full Changelog](https://github.com/camptocamp/puppet-systemd/compare/1.0.0...1.1.0) +[Full Changelog](https://github.com/voxpupuli/puppet-systemd/compare/0.4.0...1.0.0) -### Added +**Implemented enhancements:** -- Add systemd-timesyncd support [\#43](https://github.com/camptocamp/puppet-systemd/pull/43) ([bastelfreak](https://github.com/bastelfreak)) -- Reuse the service\_provider fact from stdlib [\#42](https://github.com/camptocamp/puppet-systemd/pull/42) ([ekohl](https://github.com/ekohl)) -- \(doc\) Adds examples of running the service created [\#29](https://github.com/camptocamp/puppet-systemd/pull/29) ([petems](https://github.com/petems)) -- Quote hash keys in example of service limits [\#20](https://github.com/camptocamp/puppet-systemd/pull/20) ([stbenjam](https://github.com/stbenjam)) +- Add support for drop-in files [\#39](https://github.com/voxpupuli/puppet-systemd/pull/39) ([countsudoku](https://github.com/countsudoku)) +- Adds control group limits to ServiceLimits [\#36](https://github.com/voxpupuli/puppet-systemd/pull/36) ([trevor-vaughan](https://github.com/trevor-vaughan)) +- General cleanup + add Puppet4 datatypes [\#32](https://github.com/voxpupuli/puppet-systemd/pull/32) ([bastelfreak](https://github.com/bastelfreak)) +- add management for systemd-resolved [\#31](https://github.com/voxpupuli/puppet-systemd/pull/31) ([bastelfreak](https://github.com/bastelfreak)) +- Add a network defined resource [\#30](https://github.com/voxpupuli/puppet-systemd/pull/30) ([bastelfreak](https://github.com/bastelfreak)) +- Add seltype to systemd directory [\#27](https://github.com/voxpupuli/puppet-systemd/pull/27) ([petems](https://github.com/petems)) +- Add MemoryLimit to limits template [\#23](https://github.com/voxpupuli/puppet-systemd/pull/23) ([pkilambi](https://github.com/pkilambi)) +- Update to support Puppet 4 [\#18](https://github.com/voxpupuli/puppet-systemd/pull/18) ([trevor-vaughan](https://github.com/trevor-vaughan)) +- Manage resource limits of services [\#13](https://github.com/voxpupuli/puppet-systemd/pull/13) ([ruriky](https://github.com/ruriky)) +- Refactor systemd facts [\#12](https://github.com/voxpupuli/puppet-systemd/pull/12) ([petems](https://github.com/petems)) -## [1.0.0](https://github.com/camptocamp/puppet-systemd/tree/1.0.0) (2017-09-04) +**Closed issues:** -[Full Changelog](https://github.com/camptocamp/puppet-systemd/compare/0.4.0...1.0.0) +- PR\#18 broke service limits capacity [\#35](https://github.com/voxpupuli/puppet-systemd/issues/35) +- stdlib functions are used, but no stdlib requirement in metadata.json [\#28](https://github.com/voxpupuli/puppet-systemd/issues/28) +- investigate update to camptocamp/systemd module [\#21](https://github.com/voxpupuli/puppet-systemd/issues/21) +- Module should be updated to use the new Puppet 4 goodness [\#17](https://github.com/voxpupuli/puppet-systemd/issues/17) -### Added +**Merged pull requests:** -- Add support for drop-in files [\#39](https://github.com/camptocamp/puppet-systemd/pull/39) ([countsudoku](https://github.com/countsudoku)) -- Adds control group limits to ServiceLimits [\#36](https://github.com/camptocamp/puppet-systemd/pull/36) ([trevor-vaughan](https://github.com/trevor-vaughan)) -- General cleanup + add Puppet4 datatypes [\#32](https://github.com/camptocamp/puppet-systemd/pull/32) ([bastelfreak](https://github.com/bastelfreak)) -- add management for systemd-resolved [\#31](https://github.com/camptocamp/puppet-systemd/pull/31) ([bastelfreak](https://github.com/bastelfreak)) -- Add a network defined resource [\#30](https://github.com/camptocamp/puppet-systemd/pull/30) ([bastelfreak](https://github.com/bastelfreak)) -- Add seltype to systemd directory [\#27](https://github.com/camptocamp/puppet-systemd/pull/27) ([petems](https://github.com/petems)) -- Add MemoryLimit to limits template [\#23](https://github.com/camptocamp/puppet-systemd/pull/23) ([pkilambi](https://github.com/pkilambi)) -- Update to support Puppet 4 [\#18](https://github.com/camptocamp/puppet-systemd/pull/18) ([trevor-vaughan](https://github.com/trevor-vaughan)) -- Manage resource limits of services [\#13](https://github.com/camptocamp/puppet-systemd/pull/13) ([ruriky](https://github.com/ruriky)) -- Refactor systemd facts [\#12](https://github.com/camptocamp/puppet-systemd/pull/12) ([petems](https://github.com/petems)) +- it's systemd not SystemD [\#33](https://github.com/voxpupuli/puppet-systemd/pull/33) ([shibumi](https://github.com/shibumi)) -### Fixed +## [0.4.0](https://github.com/voxpupuli/puppet-systemd/tree/0.4.0) (2016-08-18) -- it's systemd not SystemD [\#33](https://github.com/camptocamp/puppet-systemd/pull/33) ([shibumi](https://github.com/shibumi)) +[Full Changelog](https://github.com/voxpupuli/puppet-systemd/compare/0.3.0...0.4.0) -## [0.4.0](https://github.com/camptocamp/puppet-systemd/tree/0.4.0) (2016-08-18) +**Implemented enhancements:** -[Full Changelog](https://github.com/camptocamp/puppet-systemd/compare/0.3.0...0.4.0) +- Add target param for the unit file [\#10](https://github.com/voxpupuli/puppet-systemd/pull/10) ([tampakrap](https://github.com/tampakrap)) +- only use awk, instead of grep and awk [\#9](https://github.com/voxpupuli/puppet-systemd/pull/9) ([igalic](https://github.com/igalic)) -### Added +**Closed issues:** -- Add target param for the unit file [\#10](https://github.com/camptocamp/puppet-systemd/pull/10) ([tampakrap](https://github.com/tampakrap)) -- only use awk, instead of grep and awk [\#9](https://github.com/camptocamp/puppet-systemd/pull/9) ([igalic](https://github.com/igalic)) +- No LICENSE file [\#11](https://github.com/voxpupuli/puppet-systemd/issues/11) +- Forge update [\#7](https://github.com/voxpupuli/puppet-systemd/issues/7) ## [0.3.0](https://forge.puppetlabs.com/camptocamp/systemd/0.3.0) (2016-05-16) [Full Changelog](https://github.com/camptocamp/puppet-systemd/compare/0.2.2...0.3.0) diff --git a/README.md b/README.md index 4fe1c0a7..cfc76546 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,13 @@ # Systemd -[![Puppet Forge](http://img.shields.io/puppetforge/v/camptocamp/systemd.svg)](https://forge.puppetlabs.com/camptocamp/systemd) -[![Puppet Forge Downloads](http://img.shields.io/puppetforge/dt/camptocamp/systemd.svg)](https://forge.puppetlabs.com/camptocamp/systemd) -[![Build Status](https://travis-ci.org/camptocamp/puppet-systemd.png?branch=master)](https://travis-ci.org/camptocamp/puppet-systemd) -[![Puppet Forge Endorsement](https://img.shields.io/puppetforge/e/camptocamp/systemd.svg)](https://forge.puppetlabs.com/camptocamp/systemd) +[![Build Status](https://github.com/voxpupuli/puppet-systemd/workflows/CI/badge.svg)](https://github.com/voxpupuli/puppet-systemd/actions?query=workflow%3ACI) +[![Release](https://github.com/voxpupuli/puppet-systemd/actions/workflows/release.yml/badge.svg)](https://github.com/voxpupuli/puppet-systemd/actions/workflows/release.yml) +[![Puppet Forge](https://img.shields.io/puppetforge/v/puppet/systemd.svg)](https://forge.puppetlabs.com/puppet/systemd) +[![Puppet Forge - downloads](https://img.shields.io/puppetforge/dt/puppet/systemd.svg)](https://forge.puppetlabs.com/puppet/systemd) +[![Puppet Forge - endorsement](https://img.shields.io/puppetforge/e/puppet/systemd.svg)](https://forge.puppetlabs.com/puppet/systemd) +[![Puppet Forge - scores](https://img.shields.io/puppetforge/f/puppet/systemd.svg)](https://forge.puppetlabs.com/puppet/systemd) +[![puppetmodule.info docs](http://www.puppetmodule.info/images/badge.png)](http://www.puppetmodule.info/m/puppet-systemd) +[![Apache-2 License](https://img.shields.io/github/license/voxpupuli/puppet-systemd.svg)](LICENSE) [![Donated by Camptocamp](https://img.shields.io/badge/donated%20by-camptocamp-fb7047.svg)](#transfer-notice) diff --git a/metadata.json b/metadata.json index f1e2172a..d2d4de8d 100644 --- a/metadata.json +++ b/metadata.json @@ -1,6 +1,6 @@ { "name": "puppet-systemd", - "version": "3.0.0", + "version": "3.1.0", "author": "Vox Pupuli", "summary": "Puppet Systemd module", "license": "Apache-2.0",