diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2018-05-14 01:12:04 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2018-05-14 01:14:03 +0200 |
commit | 808f822507d47cc6e47da41e206ff9b942b506df (patch) | |
tree | 1854f0d3b061312810e635206a67a1c548070015 /modules | |
parent | b0439bf9b68d4e11a1511b289cba15ea10588d8d (diff) | |
download | Puppet-808f822507d47cc6e47da41e206ff9b942b506df.tar.gz Puppet-808f822507d47cc6e47da41e206ff9b942b506df.tar.zst Puppet-808f822507d47cc6e47da41e206ff9b942b506df.zip |
Move postgresql replication to its right place
Diffstat (limited to 'modules')
-rw-r--r-- | modules/role/manifests/backup.pp | 3 | ||||
-rw-r--r-- | modules/role/manifests/backup/postgresql.pp (renamed from modules/role/manifests/cryptoportfolio/postgresql_backup.pp) | 8 | ||||
-rw-r--r-- | modules/role/templates/backup/postgresql.conf.erb (renamed from modules/role/templates/cryptoportfolio/postgresql_backup.conf.erb) | 0 | ||||
-rw-r--r-- | modules/role/templates/backup/postgresql_backup@.service.erb (renamed from modules/role/templates/cryptoportfolio/postgresql_backup@.service.erb) | 0 |
4 files changed, 6 insertions, 5 deletions
diff --git a/modules/role/manifests/backup.pp b/modules/role/manifests/backup.pp index 37e6138..b35c542 100644 --- a/modules/role/manifests/backup.pp +++ b/modules/role/manifests/backup.pp | |||
@@ -14,7 +14,8 @@ class role::backup ( | |||
14 | include "profile::xmr_stak" | 14 | include "profile::xmr_stak" |
15 | include "profile::known_hosts" | 15 | include "profile::known_hosts" |
16 | include "profile::boinc" | 16 | include "profile::boinc" |
17 | include "role::cryptoportfolio::postgresql_backup" | 17 | |
18 | include "role::backup::postgresql" | ||
18 | 19 | ||
19 | ensure_packages(["rsync"]) | 20 | ensure_packages(["rsync"]) |
20 | 21 | ||
diff --git a/modules/role/manifests/cryptoportfolio/postgresql_backup.pp b/modules/role/manifests/backup/postgresql.pp index 5d937bd..59e4669 100644 --- a/modules/role/manifests/cryptoportfolio/postgresql_backup.pp +++ b/modules/role/manifests/backup/postgresql.pp | |||
@@ -1,4 +1,4 @@ | |||
1 | class role::cryptoportfolio::postgresql_backup inherits role::backup { | 1 | class role::backup::postgresql inherits role::backup { |
2 | # This manifest is supposed to be part of the backup server | 2 | # This manifest is supposed to be part of the backup server |
3 | 3 | ||
4 | $password_seed = lookup("base_installation::puppet_pass_seed") | 4 | $password_seed = lookup("base_installation::puppet_pass_seed") |
@@ -14,7 +14,7 @@ class role::cryptoportfolio::postgresql_backup inherits role::backup { | |||
14 | 14 | ||
15 | ensure_packages(["postgresql"]) | 15 | ensure_packages(["postgresql"]) |
16 | 16 | ||
17 | $pg_backup_hosts = ["cryptoportfolio-dev.immae.eu", "cryptoportfolio.immae.eu"] | 17 | $pg_backup_hosts = lookup("role::backup::postgresql::backup_hosts", { "default_value" => [] }) |
18 | 18 | ||
19 | $pg_backup_hosts.each |$pg_backup_host| { | 19 | $pg_backup_hosts.each |$pg_backup_host| { |
20 | $pg_path = "$mountpoint/$pg_backup_host/postgresql" | 20 | $pg_path = "$mountpoint/$pg_backup_host/postgresql" |
@@ -139,7 +139,7 @@ class role::cryptoportfolio::postgresql_backup inherits role::backup { | |||
139 | owner => $pg_user, | 139 | owner => $pg_user, |
140 | group => $pg_group, | 140 | group => $pg_group, |
141 | mode => '0640', | 141 | mode => '0640', |
142 | content => template("role/cryptoportfolio/postgresql_backup.conf.erb"), | 142 | content => template("role/backup/postgresql.conf.erb"), |
143 | } | 143 | } |
144 | 144 | ||
145 | service { "postgresql_backup@$pg_backup_host": | 145 | service { "postgresql_backup@$pg_backup_host": |
@@ -158,6 +158,6 @@ class role::cryptoportfolio::postgresql_backup inherits role::backup { | |||
158 | mode => "0644", | 158 | mode => "0644", |
159 | owner => "root", | 159 | owner => "root", |
160 | group => "root", | 160 | group => "root", |
161 | content => template("role/cryptoportfolio/postgresql_backup@.service.erb"), | 161 | content => template("role/backup/postgresql_backup@.service.erb"), |
162 | } | 162 | } |
163 | } | 163 | } |
diff --git a/modules/role/templates/cryptoportfolio/postgresql_backup.conf.erb b/modules/role/templates/backup/postgresql.conf.erb index 860089b..860089b 100644 --- a/modules/role/templates/cryptoportfolio/postgresql_backup.conf.erb +++ b/modules/role/templates/backup/postgresql.conf.erb | |||
diff --git a/modules/role/templates/cryptoportfolio/postgresql_backup@.service.erb b/modules/role/templates/backup/postgresql_backup@.service.erb index 245a1cb..245a1cb 100644 --- a/modules/role/templates/cryptoportfolio/postgresql_backup@.service.erb +++ b/modules/role/templates/backup/postgresql_backup@.service.erb | |||