feat: confine fact to patroni

This commit is contained in:
Ben Vincent 2024-09-03 22:18:53 +10:00
parent afda425fab
commit 265400db91

View File

@ -1,6 +1,7 @@
# frozen_string_literal: true
Facter.add(:psql_is_slave) do
confine enc_role: 'roles::infra::sql::patroni'
setcode do
# Command to check if PostgreSQL is in recovery mode
command = 'sudo -iu postgres psql -tAc "select pg_is_in_recovery()"'