Alexandros Kosiaris has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/365041 )
Change subject: puppetmaster: profilize puppetdb hiera lookups
......................................................................
puppetmaster: profilize puppetdb hiera lookups
We move the use_puppetdb and puppetdb_host hiera lookups into the
profile namespace to be consistent with the standard we have. Also we
move the keys into the role per our standards as well
Change-Id: I1ce52dc3ed26558013eb5727aac358faf7b87177
---
D hieradata/codfw/puppetmaster/config.yaml
D hieradata/common/puppetmaster/config.yaml
D hieradata/eqiad/puppetmaster/config.yaml
A hieradata/role/codfw/puppetmaster/backend.yaml
A hieradata/role/codfw/puppetmaster/frontend.yaml
M hieradata/role/common/puppetmaster/backend.yaml
M hieradata/role/common/puppetmaster/frontend.yaml
A hieradata/role/eqiad/puppetmaster/backend.yaml
A hieradata/role/eqiad/puppetmaster/frontend.yaml
M modules/profile/manifests/puppetmaster/common.pp
10 files changed, 8 insertions(+), 6 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/puppet
refs/changes/41/365041/1
diff --git a/hieradata/codfw/puppetmaster/config.yaml
b/hieradata/codfw/puppetmaster/config.yaml
deleted file mode 100644
index e2a72ba..0000000
--- a/hieradata/codfw/puppetmaster/config.yaml
+++ /dev/null
@@ -1 +0,0 @@
-puppetmaster::config::puppetdb_host: nihal.codfw.wmnet
diff --git a/hieradata/common/puppetmaster/config.yaml
b/hieradata/common/puppetmaster/config.yaml
deleted file mode 100644
index 7b39652..0000000
--- a/hieradata/common/puppetmaster/config.yaml
+++ /dev/null
@@ -1 +0,0 @@
-puppetmaster::config::use_puppetdb: true
diff --git a/hieradata/eqiad/puppetmaster/config.yaml
b/hieradata/eqiad/puppetmaster/config.yaml
deleted file mode 100644
index b50c421..0000000
--- a/hieradata/eqiad/puppetmaster/config.yaml
+++ /dev/null
@@ -1 +0,0 @@
-puppetmaster::config::puppetdb_host: nitrogen.eqiad.wmnet
diff --git a/hieradata/role/codfw/puppetmaster/backend.yaml
b/hieradata/role/codfw/puppetmaster/backend.yaml
new file mode 100644
index 0000000..e124b99
--- /dev/null
+++ b/hieradata/role/codfw/puppetmaster/backend.yaml
@@ -0,0 +1 @@
+profile::puppetmaster::common::puppetdb_host: nihal.codfw.wmnet
diff --git a/hieradata/role/codfw/puppetmaster/frontend.yaml
b/hieradata/role/codfw/puppetmaster/frontend.yaml
new file mode 100644
index 0000000..e124b99
--- /dev/null
+++ b/hieradata/role/codfw/puppetmaster/frontend.yaml
@@ -0,0 +1 @@
+profile::puppetmaster::common::puppetdb_host: nihal.codfw.wmnet
diff --git a/hieradata/role/common/puppetmaster/backend.yaml
b/hieradata/role/common/puppetmaster/backend.yaml
index 3e66d52..5324324 100644
--- a/hieradata/role/common/puppetmaster/backend.yaml
+++ b/hieradata/role/common/puppetmaster/backend.yaml
@@ -11,3 +11,4 @@
- ulsfo.wmnet
cluster: puppet
profile::puppetmaster::common::directory_environments: true
+profile::puppetmaster::common::use_puppetdb: true
diff --git a/hieradata/role/common/puppetmaster/frontend.yaml
b/hieradata/role/common/puppetmaster/frontend.yaml
index 42141e5..d18b1c1 100644
--- a/hieradata/role/common/puppetmaster/frontend.yaml
+++ b/hieradata/role/common/puppetmaster/frontend.yaml
@@ -19,3 +19,4 @@
profile::discovery::path: "/srv/config-master/discovery"
profile::discovery::watch_interval: 60
profile::puppetmaster::common::directory_environments: true
+profile::puppetmaster::common::use_puppetdb: true
diff --git a/hieradata/role/eqiad/puppetmaster/backend.yaml
b/hieradata/role/eqiad/puppetmaster/backend.yaml
new file mode 100644
index 0000000..7ffc429
--- /dev/null
+++ b/hieradata/role/eqiad/puppetmaster/backend.yaml
@@ -0,0 +1 @@
+profile::puppetmaster::common::puppetdb_host: nitrogen.eqiad.wmnet
diff --git a/hieradata/role/eqiad/puppetmaster/frontend.yaml
b/hieradata/role/eqiad/puppetmaster/frontend.yaml
new file mode 100644
index 0000000..7ffc429
--- /dev/null
+++ b/hieradata/role/eqiad/puppetmaster/frontend.yaml
@@ -0,0 +1 @@
+profile::puppetmaster::common::puppetdb_host: nitrogen.eqiad.wmnet
diff --git a/modules/profile/manifests/puppetmaster/common.pp
b/modules/profile/manifests/puppetmaster/common.pp
index 7bf4b31..ece6b9e 100644
--- a/modules/profile/manifests/puppetmaster/common.pp
+++ b/modules/profile/manifests/puppetmaster/common.pp
@@ -1,6 +1,7 @@
class profile::puppetmaster::common (
$base_config,
$directory_environments =
hiera('profile::puppetmaster::common::directory_environments', false),
+ $use_puppetdb = hiera('profile::puppetmaster::common::use_puppetdb',
false),
) {
include passwords::puppet::database
@@ -34,10 +35,8 @@
reports => 'servermon',
}
- $use_puppetdb = hiera('puppetmaster::config::use_puppetdb', false)
-
if $use_puppetdb {
- $puppetdb_host = hiera('puppetmaster::config::puppetdb_host')
+ $puppetdb_host = hiera('profile::puppetmaster::common::puppetdb_host')
class { 'puppetmaster::puppetdb::client':
host => $puppetdb_host,
}
--
To view, visit https://gerrit.wikimedia.org/r/365041
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I1ce52dc3ed26558013eb5727aac358faf7b87177
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Alexandros Kosiaris <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits