From f373b00bbc853d27e4654949aba6bfae071f2808 Mon Sep 17 00:00:00 2001 From: Colleen Murphy Date: Fri, 15 Jun 2018 23:13:31 +0200 Subject: [PATCH] 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 --- manifests/init.pp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/manifests/init.pp b/manifests/init.pp index 926e702..1a6d0b1 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -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',