feat: confine fact to patroni #158
@ -1,6 +1,7 @@
|
|||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
Facter.add(:psql_is_slave) do
|
Facter.add(:psql_is_slave) do
|
||||||
|
confine enc_role: 'roles::infra::sql::patroni'
|
||||||
setcode do
|
setcode do
|
||||||
# Command to check if PostgreSQL is in recovery mode
|
# Command to check if PostgreSQL is in recovery mode
|
||||||
command = 'sudo -iu postgres psql -tAc "select pg_is_in_recovery()"'
|
command = 'sudo -iu postgres psql -tAc "select pg_is_in_recovery()"'
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user