Page MenuHomeSoftware Heritage

D4753.id16827.diff
No OneTemporary

D4753.id16827.diff

diff --git a/data/hostname/clearly-defined.internal.staging.swh.network.yaml b/data/hostname/clearly-defined.internal.staging.swh.network.yaml
new file mode 100644
--- /dev/null
+++ b/data/hostname/clearly-defined.internal.staging.swh.network.yaml
@@ -0,0 +1,13 @@
+---
+swh::postgres::service::users:
+ - tg1999
+ - root
+
+swh::postgres::service::dbs:
+ - alias: clearly-defined
+ name: clearly_defined
+ host: "%{alias('swh::deploy::storage::db::host')}"
+ port: "%{alias('swh::deploy::db::pgbouncer::port')}"
+ user: guest
+ passwd: "%{alias('swh::deploy::clearly_defined::db::password')}"
+
diff --git a/data/subnets/vagrant.yaml b/data/subnets/vagrant.yaml
--- a/data/subnets/vagrant.yaml
+++ b/data/subnets/vagrant.yaml
@@ -125,3 +125,5 @@
host: search-esnode0.internal.staging.swh.network
10.168.130.90:
host: search0.internal.staging.swh.network
+ 10.168.130.200:
+ host: clearly-defined.internal.staging.swh.network
diff --git a/manifests/site.pp b/manifests/site.pp
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -188,6 +188,10 @@
include role::swh_netbox
}
+node 'clearly-defined.internal.staging.swh.network' {
+ include role::swh_db_client
+}
+
node default {
include role::swh_base
}
diff --git a/site-modules/profile/manifests/postgresql/client.pp b/site-modules/profile/manifests/postgresql/client.pp
--- a/site-modules/profile/manifests/postgresql/client.pp
+++ b/site-modules/profile/manifests/postgresql/client.pp
@@ -7,11 +7,11 @@
# This part installs per user the postgresql client files ~/.pg_service.conf
# and ~/.pgpass https://intranet.softwareheritage.org/wiki/Databases
- $dbs = lookup('swh::postgres::service::dbs', Array, 'deep')
+ $dbs = lookup('swh::postgres::service::dbs')
# Explicitly install the configuration files per user's home
# TL;DR the pgpass must be readonly per user so we can't use the global one
- $users = lookup('swh::postgres::service::users', Array, 'deep')
+ $users = lookup('swh::postgres::service::users')
each ($users) | $user | {
if $user == 'root' {
$home = '/root'
diff --git a/site-modules/role/manifests/swh_db_client.pp b/site-modules/role/manifests/swh_db_client.pp
new file mode 100644
--- /dev/null
+++ b/site-modules/role/manifests/swh_db_client.pp
@@ -0,0 +1,3 @@
+class role::swh_db_client inherits role::swh_base {
+ include profile::postgresql::client
+}

File Metadata

Mime Type
text/plain
Expires
Thu, Jul 3, 3:24 PM (1 w, 9 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3225532

Event Timeline