Skip to content

fix variable notation #331

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 8, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions plans/subplans/db_populate.pp
Original file line number Diff line number Diff line change
Expand Up @@ -65,18 +65,18 @@
sslcert=/opt/puppetlabs/server/data/pg_certs/_local.cert.pem
sslkey=/opt/puppetlabs/server/data/pg_certs/_local.private_key.pem
sslrootcert=/etc/puppetlabs/puppet/ssl/certs/ca.pem"
| - PGBASE
run_command(${pg_basebackup}, ${destination_target})
| - PGBASE
run_command($pg_basebackup, $destination_target)

# Delete the saved certs, they'll be properly re-populated by an agent run
run_command('rm -rf /opt/puppetlabs/server/data/pg_certs', ${destination_target})
run_command('rm -rf /opt/puppetlabs/server/data/pg_certs', $destination_target)

# Start pe-postgresql.service
run_command('systemctl start pe-postgresql.service', ${destination_target})
run_command('systemctl start pe-postgresql.service', $destination_target)

# Delete the previously add replication rules to prevent Puppet restarting
# thing later
apply(${source_target}) {
apply($source_target) {
file_line { 'replication-pe-ha-replication-map':
ensure => absent,
path => "/opt/puppetlabs/server/data/postgresql/${psql_version}/data/pg_ident.conf",
Expand All @@ -95,8 +95,7 @@
}

# Reload pe-postgresql to revoke replication rules
run_command('systemctl reload pe-postgresql.service', ${source_target})
run_command('systemctl reload pe-postgresql.service', $source_target)

return("Population of ${$destination_target.peadm::certname()} with data from s${$source_target.peadm::certname()} succeeded.")
}