Add order to cgit package

The httpd module uses the file resource with the purge option to clear
out the httpd conf directory. On puppet 4, the resource ordering
algorithm changed such that the directory purge happens before the cgit
RPM adds a config file there, which means on the next puppet run it
purges it again and bounces the service again. This cause the
idempotency test in beaker to fail.

This patch adds an ordering parameter to ensure that the cgit package is
installed before the httpd class runs so that it doesn't have to clear
out the httpd config directory twice. Since puppet 4 more or less tries
to order resources in the order they appear, also swap the package
resourcs and httpd class just to make it clear what order things should
be in.

Change-Id: I813f6e9f82d3b44b1d38fb5773c5bd6160f58b78
This commit is contained in:
Colleen Murphy 2018-06-15 23:13:31 +02:00
parent 55c432baf6
commit f373b00bbc
1 changed files with 3 additions and 2 deletions

View File

@ -67,8 +67,6 @@ class cgit(
$daemon_port = 9418
}
include ::httpd
package { [
'git-daemon',
'highlight',
@ -78,8 +76,11 @@ class cgit(
package { 'cgit':
ensure => present,
install_options => ['--enablerepo', 'epel'],
before => Class['::httpd'],
}
include ::httpd
user { 'cgit':
ensure => present,
home => '/home/cgit',