feat: Added optional postgres replication

This commit is contained in:
Oleksandr Stepanov
2024-11-19 16:11:28 +01:00
parent dde435ca95
commit 2bf98e9273
4 changed files with 33 additions and 0 deletions

View File

@ -32,6 +32,20 @@
- l2_chain_id
- l1_chain_id
- name: "Verify that required variables for replication is set"
when: enable_postgres_replication
ansible.builtin.assert:
that:
- required_var != ""
fail_msg: "{{ postgress_replication_required_var }} needs to be set for the role for postgres replication to work"
success_msg: "Required variable for postgres replication {{ postgress_replication_required_var }} isn't empty"
loop_control:
loop_var: postgress_replication_required_var
with_items:
- enable_postgres_replication
- postgres_replication_bind_address
- postgres_replica_address
- name: Check required en vars empty
ansible.builtin.fail:
msg: "Variable '{{ item }}' is empty"