diff --git a/ansible/inventory/offline/99-static b/ansible/inventory/offline/99-static index f6e469574..0c8d3efcc 100644 --- a/ansible/inventory/offline/99-static +++ b/ansible/inventory/offline/99-static @@ -83,19 +83,7 @@ [postgresql:vars] postgresql_network_interface = enp1s0 -repmgr_node_config: - postgresql1: # Maps to postgresql_rw group - node_id: 1 - priority: 150 - role: primary - postgresql2: # Maps to first postgresql_ro - node_id: 2 - priority: 100 - role: standby - postgresql3: # Maps to second postgresql_ro - node_id: 3 - priority: 50 - role: standby +# repmgr_node_config is defined in group_vars/postgresql/postgresql.yml [elasticsearch:vars] # elasticsearch_network_interface = enp1s0 @@ -110,8 +98,10 @@ repmgr_node_config: # Rabbitmq specific variables [rmq-cluster:vars] -# host name here must match each node's actual hostname -rabbitmq_cluster_master: rabbitmq1 +# host name here must match each node's actual hostname (short hostname, not FQDN) +# e.g. if the node's FQDN is rabbitmq1.example.com, use: rabbitmq_cluster_master = rabbitmq1 +# Using FQDN here will cause rabbitmqctl join_cluster to fail with a :badarg error +rabbitmq_cluster_master = rabbitmq1 # rabbitmq_network_interface = enp1s0 # For the following groups, add all nodes defined above to the sections below. diff --git a/ansible/inventory/offline/group_vars/postgresql/postgresql.yml b/ansible/inventory/offline/group_vars/postgresql/postgresql.yml index 351b99539..dd6d6bde4 100644 --- a/ansible/inventory/offline/group_vars/postgresql/postgresql.yml +++ b/ansible/inventory/offline/group_vars/postgresql/postgresql.yml @@ -24,8 +24,22 @@ repmgr_namespace: "{{ wire_namespace | default('default') }}" wire_pg_secret_name: "wire-postgresql-external-secret" # Node configuration for repmgr -# NOTE: repmgr_node_config is defined in the inventory file ansible/inventory/offline/99-static, ansible/inventory/offline/staging.yml and terraform/examples/wire-server-deploy-offline-hetzner/outputs.tf -# to allow environment-specific node mappings. Do not define here. +# NOTE: staging inventory and terraform-generated envs override this in their own vars: +# - ansible/inventory/offline/staging.yml +# - terraform/examples/wire-server-deploy-offline-hetzner/outputs.tf +repmgr_node_config: + postgresql1: # Maps to postgresql_rw group + node_id: 1 + priority: 150 + role: primary + postgresql2: # Maps to first postgresql_ro + node_id: 2 + priority: 100 + role: standby + postgresql3: # Maps to second postgresql_ro + node_id: 3 + priority: 50 + role: standby # repmgr settings # repmgrd monitoring and reconnection configuration diff --git a/changelog.d/5-bug-fixes/fix-rabbitmq-repmgr-inventory-syntax b/changelog.d/5-bug-fixes/fix-rabbitmq-repmgr-inventory-syntax new file mode 100644 index 000000000..ccfe20e55 --- /dev/null +++ b/changelog.d/5-bug-fixes/fix-rabbitmq-repmgr-inventory-syntax @@ -0,0 +1 @@ +Fixed: rabbitmq_cluster_master and repmgr_node_config syntax errors in offline inventory 99-static