Dzahn has uploaded a new change for review.
https://gerrit.wikimedia.org/r/225213
Change subject: use ensure_resource to avoid duplicate declarations
......................................................................
use ensure_resource to avoid duplicate declarations
These roles should work independently but also when combined on
the same node. Without this you either get a puppet fail because
/srv/deployment is missing or a fail because it is a duplicate
declaration in both places.
ensure_resource from stdlib only creates a resource if it doesn't
already exist
Change-Id: I7f89cc6ed43eb6cf7798134691b301ba6383732a
---
M modules/iegreview/manifests/init.pp
M modules/wikimania_scholarships/manifests/init.pp
2 files changed, 6 insertions(+), 2 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/puppet
refs/changes/13/225213/1
diff --git a/modules/iegreview/manifests/init.pp
b/modules/iegreview/manifests/init.pp
index b0aeea8..7b84824 100644
--- a/modules/iegreview/manifests/init.pp
+++ b/modules/iegreview/manifests/init.pp
@@ -73,7 +73,9 @@
content => template('iegreview/apache.conf.erb'),
}
- file { [ '/srv/deployment', '/srv/deployment/iegreview', $deploy_dir ]:
+ ensure_resource('file', '/srv/deployment', {'ensure' => 'directory' })
+
+ file { [ '/srv/deployment/iegreview', $deploy_dir ]:
ensure => directory,
}
diff --git a/modules/wikimania_scholarships/manifests/init.pp
b/modules/wikimania_scholarships/manifests/init.pp
index 82581a8..fff2998 100644
--- a/modules/wikimania_scholarships/manifests/init.pp
+++ b/modules/wikimania_scholarships/manifests/init.pp
@@ -50,7 +50,9 @@
content => template('wikimania_scholarships/apache.conf.erb'),
}
- file { [ '/srv/deployment', '/srv/deployment/scholarships', $deploy_dir ]:
+ ensure_resource('file', '/srv/deployment', {'ensure' => 'directory' })
+
+ file { [ '/srv/deployment/scholarships', $deploy_dir ]:
ensure => directory,
}
--
To view, visit https://gerrit.wikimedia.org/r/225213
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I7f89cc6ed43eb6cf7798134691b301ba6383732a
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits