From ce0fcb8482f7ea055f1c9c12c741d4b64dd085fb Mon Sep 17 00:00:00 2001 From: noelmcloughlin Date: Sat, 5 Jun 2021 00:14:02 +0100 Subject: [PATCH 01/10] feat(cluster): join state with erlang_cookie --- docs/README.rst | 10 ++++++++-- pillar.example | 18 +++++++++-------- rabbitmq/config/cluster/install.sls | 31 ++++++++++++++++++++++------- rabbitmq/config/init.sls | 2 +- rabbitmq/package/repo/clean.sls | 1 - rabbitmq/service/running.sls | 11 ++-------- 6 files changed, 45 insertions(+), 28 deletions(-) diff --git a/docs/README.rst b/docs/README.rst index 5aaeb517..0a7054ec 100644 --- a/docs/README.rst +++ b/docs/README.rst @@ -67,7 +67,7 @@ now ``pre-commit`` will run automatically on each ``git commit``. :: Special notes ------------- -None +The main state ``rabbitmq`` excludes ``rabbitmq.config.cluster`` (initial cluster setup) state. Available states ---------------- @@ -99,7 +99,13 @@ This state will install the rabbitmqadmin package only. ^^^^^^^^^^^^^^^^^^^ This state will configure the rabbitmq service and has a dependency on ``rabbitmq.install`` -via include list. See ``pillar.example``. +via include list. It excludes ``rabbitmq.config.cluster`` state + +``rabbitmq.config.cluster`` +^^^^^^^^^^^^^^^^^^^^^^^^^ + +For initial setup this state writes the erlang cookie, joins cluster, and restarts service. +The erlang cookie comes from pillar data and must the identical for all cluster members ``rabbitmq.service`` ^^^^^^^^^^^^^^^^^^^^ diff --git a/pillar.example b/pillar.example index f4d56ad9..f9ab7fa0 100644 --- a/pillar.example +++ b/pillar.example @@ -2,13 +2,22 @@ # vim: ft=yaml --- rabbitmq: + cluster: + rabbitmq@locahost: + user: rabbitmq + host: rabbitmq # short hostname of node to join to, not fqdn + ram_node: None + runas: rabbitmq + erlang_cookie: + name: /var/lib/rabbitmq/.erlang_cookie + value: shared-value-for-all-cluster-members + pkg: # https://github.com/rabbitmq/rabbitmq-server/releases/tag/v3.8.14 use_upstream: repo # if available (i.e. packagecloud) service: enabled: true running: true - config: # see rabbitmq.conf.example from rabbitmq-server github docs context: {} @@ -59,13 +68,6 @@ rabbitmq: - 'alternate-**exchange': 'amq.fanout' - 'test-header': 'testing' - cluster: - rabbit@locahost: - - user: rabbit - - host: localhost - - ram_node: None - - runas: root - plugin: rabbitmq_management: runas: root diff --git a/rabbitmq/config/cluster/install.sls b/rabbitmq/config/cluster/install.sls index a084c3cf..701c36d8 100644 --- a/rabbitmq/config/cluster/install.sls +++ b/rabbitmq/config/cluster/install.sls @@ -10,15 +10,32 @@ include: - {{ sls_service_running }} - {{ sls_config_user }} - {% for name, cluster in salt["pillar.get"]("rabbitmq:cluster", {}).items() %} + {%- for name, cluster in salt["pillar.get"]("rabbitmq:cluster", {}).items() %} + {%- if 'erlang_cookie' in cluster and cluster.erlang_cookie is mapping %} rabbitmq-config-cluster-join-{{ name }}: - rabbitmq_cluster.join: - {% for value in cluster %} - - {{ value | json }} - {% endfor %} + file.managed: + - name: {{ cluster.erlang_cookie.name }} + - contents: {{ cluster.erlang_cookie.value }} + - mode: 400 + - user: {{ cluster.user }} + - group: root + - makedirs: True + - watch_in: + - service: rabbitmq-service-running-service-running + + {%- if 'host' in grains and grains.host not in cluster.host %} + + rabbitmq_cluster.joined: + - user: {{ cluster.user }} + - host: {{ cluster.host }} + - ram_node: {{ cluster.ram_node }} + - runas: {{ cluster.runas }} - require: - - service: {{ rabbitmq.service.name }} + - file: rabbitmq-config-cluster-join-{{ name }} - sls: {{ sls_config_user }} + - service: rabbitmq-service-running-service-running - {% endfor %} + {%- endif %} + {%- endif %} + {%- endfor %} diff --git a/rabbitmq/config/init.sls b/rabbitmq/config/init.sls index 84e1cd59..ab1e7d9c 100644 --- a/rabbitmq/config/init.sls +++ b/rabbitmq/config/init.sls @@ -8,4 +8,4 @@ include: - .policy - .plugin - .upstream - # .cluster + # .cluster should be run once, not always diff --git a/rabbitmq/package/repo/clean.sls b/rabbitmq/package/repo/clean.sls index d5ce2970..deb16235 100644 --- a/rabbitmq/package/repo/clean.sls +++ b/rabbitmq/package/repo/clean.sls @@ -15,7 +15,6 @@ rabbitmq-package-repo-erlang-clean: pkgrepo.absent: - names: - rabbitmq-rabbitmq-erlang - - rabbitmq_rabbitmq-erlang - rabbitmq-rabbitmq - rabbitmq_rabbitmq-server - deb https://dl.bintray.com/rabbitmq-erlang/debian {{ salt['grains.get']('oscodename') }} erlang diff --git a/rabbitmq/service/running.sls b/rabbitmq/service/running.sls index 3afcc15b..4d5e597f 100644 --- a/rabbitmq/service/running.sls +++ b/rabbitmq/service/running.sls @@ -20,15 +20,8 @@ rabbitmq-service-running-service-running: - enable: True - watch: - sls: {{ sls_config_file }} + - onfail_in: + - cmd: rabbitmq-service-running-service-running cmd.run: - names: - - localectl || true - journalctl -xe -u {{ rabbitmq.service.name }} || true - - systemctl status {{ rabbitmq.service.name }} || true - - systemd-analyze blame || true - - hostname - - hostname -s - - hostname -A - - ip addr - - onfail: - - service: rabbitmq-service-running-service-running From 5bac4bb0234651339449a9443a0f128de70d056e Mon Sep 17 00:00:00 2001 From: noelmcloughlin Date: Sat, 5 Jun 2021 03:16:12 +0100 Subject: [PATCH 02/10] docs(examples): use airflow instead in pillar.example --- pillar.example | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/pillar.example b/pillar.example index f9ab7fa0..fad4cf6c 100644 --- a/pillar.example +++ b/pillar.example @@ -30,26 +30,26 @@ rabbitmq: base: /var/lib/rabbitmq vhost: - - test_vhost + - airflow binding: my-new-binding: - destination_type: queue - destination: my-new-queue - routing_key: a_routing_key_string - - user: saltstack + - user: airflow - passwd: 'password' - - vhost: test_vhost + - vhost: airflow - arguments: - 'x-message-ttl': 8640000 queue: my-new-queue: - - user: saltstack + - user: airflow - passwd: 'password' - durable: true - auto_delete: false - - vhost: test_vhost + - vhost: airflow - arguments: - 'x-message-ttl': 8640000 - 'x-expires': 8640000 @@ -57,13 +57,13 @@ rabbitmq: exchange: my-new-exchange: - - user: saltstack + - user: airflow - passwd: 'password' - type: fanout - durable: true - internal: false - auto_delete: false - - vhost: test_vhost + - vhost: airflow - arguments: - 'alternate-**exchange': 'amq.fanout' - 'test-header': 'testing' @@ -82,7 +82,7 @@ rabbitmq: upstream: upstream_1: - - uri: amqp://saltstack:password@localhost + - uri: amqp://airflow:password@localhost - trust_user_id: true - ack_mode: on-confirm - max_hops: 1 @@ -108,13 +108,13 @@ rabbitmq: - '.*' - '.*' - runas: root - saltstack: + airflow: - password: password - force: false - tags: - administrator - perms: - - test_vhost: + - airflow: - '.*' - '.*' - '.*' From d5e7410068333ae292b7cc19b127fa82a88fe5ac Mon Sep 17 00:00:00 2001 From: noelmcloughlin Date: Sat, 5 Jun 2021 03:42:43 +0100 Subject: [PATCH 03/10] fix(config): remove requisite (in case of failure); add user/group --- rabbitmq/config/cluster/install.sls | 10 +++++----- rabbitmq/config/vhost/install.sls | 2 +- rabbitmq/parameters/defaults.yaml | 2 ++ rabbitmq/service/clean.sls | 3 +-- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/rabbitmq/config/cluster/install.sls b/rabbitmq/config/cluster/install.sls index 701c36d8..bb4dfce4 100644 --- a/rabbitmq/config/cluster/install.sls +++ b/rabbitmq/config/cluster/install.sls @@ -11,15 +11,15 @@ include: - {{ sls_config_user }} {%- for name, cluster in salt["pillar.get"]("rabbitmq:cluster", {}).items() %} - {%- if 'erlang_cookie' in cluster and cluster.erlang_cookie is mapping %} + {%- if cluster.host and 'erlang_cookie' in cluster and cluster.erlang_cookie is mapping %} -rabbitmq-config-cluster-join-{{ name }}: +rabbitmq-config-cluster-{{ name }}-join-{{ cluster.host }}: file.managed: - name: {{ cluster.erlang_cookie.name }} - contents: {{ cluster.erlang_cookie.value }} - mode: 400 - - user: {{ cluster.user }} - - group: root + - user: {{ rabbitmq.config.user }} + - group: {{ rabbitmq.config.user }} - makedirs: True - watch_in: - service: rabbitmq-service-running-service-running @@ -32,7 +32,7 @@ rabbitmq-config-cluster-join-{{ name }}: - ram_node: {{ cluster.ram_node }} - runas: {{ cluster.runas }} - require: - - file: rabbitmq-config-cluster-join-{{ name }} + - file: rabbitmq-config-cluster-{{ name }}-join-{{ cluster.host }} - sls: {{ sls_config_user }} - service: rabbitmq-service-running-service-running diff --git a/rabbitmq/config/vhost/install.sls b/rabbitmq/config/vhost/install.sls index 491e446d..66b2d507 100644 --- a/rabbitmq/config/vhost/install.sls +++ b/rabbitmq/config/vhost/install.sls @@ -14,6 +14,6 @@ rabbitmq-config-vhost-present-{{ name }}: rabbitmq_vhost.present: - name: {{ name }} - require: - - service: {{ rabbitmq.service.name }} + - service: rabbitmq-service-running-service-running {% endfor %} diff --git a/rabbitmq/parameters/defaults.yaml b/rabbitmq/parameters/defaults.yaml index 9c42ed65..51406f9f 100644 --- a/rabbitmq/parameters/defaults.yaml +++ b/rabbitmq/parameters/defaults.yaml @@ -23,6 +23,8 @@ values: RABBITMQ_BASE: /var/lib/rabbitmq config: name: /etc/rabbitmq/rabbitmq.conf + user: rabbitmq + group: rabbitmq # see rabbitmq.conf.example from rabbitmq-server github docs context: {} service: diff --git a/rabbitmq/service/clean.sls b/rabbitmq/service/clean.sls index c6c0e2ff..855f0818 100644 --- a/rabbitmq/service/clean.sls +++ b/rabbitmq/service/clean.sls @@ -12,5 +12,4 @@ rabbitmq-service-clean-service-dead: service.dead: - name: {{ rabbitmq.service.name }} - enable: False - - require_in: - - sls: {{ sls_package_clean }} + - sig: 'rabbit boot' From 6953fe2154c7c2d9388e751238516a3270b16d72 Mon Sep 17 00:00:00 2001 From: noelmcloughlin Date: Sat, 5 Jun 2021 23:58:57 +0100 Subject: [PATCH 04/10] fix(example): add working cluster example to pillar.example --- pillar.example | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pillar.example b/pillar.example index fad4cf6c..2ac00a34 100644 --- a/pillar.example +++ b/pillar.example @@ -3,13 +3,13 @@ --- rabbitmq: cluster: - rabbitmq@locahost: - user: rabbitmq + rabbit@locahost: + user: rabbit # 'user: rabbit' is confusing; its actually 'node: rabbit' but ... host: rabbitmq # short hostname of node to join to, not fqdn ram_node: None runas: rabbitmq erlang_cookie: - name: /var/lib/rabbitmq/.erlang_cookie + name: /var/lib/rabbitmq/.erlang.cookie value: shared-value-for-all-cluster-members pkg: From 866a6c135ad308d9094398482d80479016ae40d5 Mon Sep 17 00:00:00 2001 From: noelmcloughlin Date: Sun, 6 Jun 2021 00:20:01 +0100 Subject: [PATCH 05/10] docs(readme): expand cluster join/forget documentation --- docs/README.rst | 5 ++--- pillar.example | 8 ++++++-- rabbitmq/config/user/clean.sls | 2 +- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/docs/README.rst b/docs/README.rst index 0a7054ec..bd473633 100644 --- a/docs/README.rst +++ b/docs/README.rst @@ -67,7 +67,7 @@ now ``pre-commit`` will run automatically on each ``git commit``. :: Special notes ------------- -The main state ``rabbitmq`` excludes ``rabbitmq.config.cluster`` (initial cluster setup) state. +The ``rabbitmq`` state does not include ``rabbitmq.config.cluster`` state (initial cluster setup). This formula does not provide any 'forget' state (for inconsistent cluster fixing) during cluster join (could be future feature). Available states ---------------- @@ -104,8 +104,7 @@ via include list. It excludes ``rabbitmq.config.cluster`` state ``rabbitmq.config.cluster`` ^^^^^^^^^^^^^^^^^^^^^^^^^ -For initial setup this state writes the erlang cookie, joins cluster, and restarts service. -The erlang cookie comes from pillar data and must the identical for all cluster members +For initial setup this state writes the erlang cookie, joins cluster, and restarts service. The erlang cookie comes from pillar data and must the identical for all cluster members. Join fails if cluster is inconsistent (see rabbitmqctl forget_cluster_node rabbit@somehost). ``rabbitmq.service`` ^^^^^^^^^^^^^^^^^^^^ diff --git a/pillar.example b/pillar.example index 2ac00a34..dfe3fd32 100644 --- a/pillar.example +++ b/pillar.example @@ -109,8 +109,8 @@ rabbitmq: - '.*' - runas: root airflow: - - password: password - - force: false + - password: airflow + - force: true - tags: - administrator - perms: @@ -118,6 +118,10 @@ rabbitmq: - '.*' - '.*' - '.*' + - '/': + - '.*' + - '.*' + - '.*' - runas: root tofs: diff --git a/rabbitmq/config/user/clean.sls b/rabbitmq/config/user/clean.sls index 3c4a1f50..7f0560bf 100644 --- a/rabbitmq/config/user/clean.sls +++ b/rabbitmq/config/user/clean.sls @@ -8,7 +8,7 @@ include: - {{ sls_package_clean }} - {% for name in rabbitmq.user %} + {% for name, user in salt["pillar.get"]("rabbitmq:user", {}).items() %} rabbitmq-config-user-absent-{{ name }}: rabbitmq_user.absent: From 41085231bfc20c923f46d0df1d093c486767089b Mon Sep 17 00:00:00 2001 From: noelmcloughlin Date: Sun, 6 Jun 2021 13:45:51 +0100 Subject: [PATCH 06/10] fix(user): ensure user.present fully works --- pillar.example | 32 ++++++++++++++----------------- rabbitmq/config/user/install.sls | 4 +++- rabbitmq/parameters/defaults.yaml | 1 + 3 files changed, 18 insertions(+), 19 deletions(-) diff --git a/pillar.example b/pillar.example index dfe3fd32..6a80ace8 100644 --- a/pillar.example +++ b/pillar.example @@ -4,8 +4,8 @@ rabbitmq: cluster: rabbit@locahost: - user: rabbit # 'user: rabbit' is confusing; its actually 'node: rabbit' but ... - host: rabbitmq # short hostname of node to join to, not fqdn + user: rabbit # 'user: rabbit' is confusing; 'node: rabbit' would be better + host: hostname # short hostname of node to join to, not fqdn ram_node: None runas: rabbitmq erlang_cookie: @@ -30,26 +30,26 @@ rabbitmq: base: /var/lib/rabbitmq vhost: - - airflow + - test_vhost binding: my-new-binding: - destination_type: queue - destination: my-new-queue - routing_key: a_routing_key_string - - user: airflow + - user: saltstack - passwd: 'password' - - vhost: airflow + - vhost: test_vhost - arguments: - 'x-message-ttl': 8640000 queue: my-new-queue: - - user: airflow + - user: saltstack - passwd: 'password' - durable: true - auto_delete: false - - vhost: airflow + - vhost: test_vhost - arguments: - 'x-message-ttl': 8640000 - 'x-expires': 8640000 @@ -57,13 +57,13 @@ rabbitmq: exchange: my-new-exchange: - - user: airflow + - user: saltstack - passwd: 'password' - type: fanout - durable: true - internal: false - auto_delete: false - - vhost: airflow + - vhost: test_vhost - arguments: - 'alternate-**exchange': 'amq.fanout' - 'test-header': 'testing' @@ -82,7 +82,7 @@ rabbitmq: upstream: upstream_1: - - uri: amqp://airflow:password@localhost + - uri: amqp://saltstack:password@localhost - trust_user_id: true - ack_mode: on-confirm - max_hops: 1 @@ -108,17 +108,13 @@ rabbitmq: - '.*' - '.*' - runas: root - airflow: - - password: airflow - - force: true + saltstack: + - password: password + - force: false - tags: - administrator - perms: - - airflow: - - '.*' - - '.*' - - '.*' - - '/': + - test_vhost: - '.*' - '.*' - '.*' diff --git a/rabbitmq/config/user/install.sls b/rabbitmq/config/user/install.sls index f1bfc082..c37ac658 100644 --- a/rabbitmq/config/user/install.sls +++ b/rabbitmq/config/user/install.sls @@ -15,7 +15,9 @@ include: rabbitmq-config-user-present-{{ name }}: rabbitmq_user.present: - name: {{ name }} - - {{ user|yaml }} + {%- for item in user %} + - {{ item|json }} + {%- endfor %} - require: - sls: {{ sls_service_running }} - sls: {{ sls_config_vhost }} diff --git a/rabbitmq/parameters/defaults.yaml b/rabbitmq/parameters/defaults.yaml index 51406f9f..07f66bcf 100644 --- a/rabbitmq/parameters/defaults.yaml +++ b/rabbitmq/parameters/defaults.yaml @@ -15,6 +15,7 @@ values: cleanlist: - /usr/local/bin/rabbitmq-env - /usr/local/bin/rabbitmq-plugins + - /var/run/rabbitmq env: name: /etc/rabbitmq/rabbitmq-env.conf locale_all: null From ec02702d27f04313ea25c0b133b0a61cf2cc78e4 Mon Sep 17 00:00:00 2001 From: noelmcloughlin Date: Wed, 9 Jun 2021 01:15:55 +0100 Subject: [PATCH 07/10] feat(queues): create/delete queues using cli --- pillar.example | 19 ++++++++++--------- rabbitmq/config/clean.sls | 1 + rabbitmq/config/init.sls | 1 + rabbitmq/config/queue/clean.sls | 19 +++++++++++++++++++ rabbitmq/config/queue/init.sls | 5 +++++ rabbitmq/config/queue/install.sls | 21 +++++++++++++++++++++ 6 files changed, 57 insertions(+), 9 deletions(-) create mode 100644 rabbitmq/config/queue/clean.sls create mode 100644 rabbitmq/config/queue/init.sls create mode 100644 rabbitmq/config/queue/install.sls diff --git a/pillar.example b/pillar.example index 6a80ace8..aa6243ca 100644 --- a/pillar.example +++ b/pillar.example @@ -45,15 +45,16 @@ rabbitmq: queue: my-new-queue: - - user: saltstack - - passwd: 'password' - - durable: true - - auto_delete: false - - vhost: test_vhost - - arguments: - - 'x-message-ttl': 8640000 - - 'x-expires': 8640000 - - 'x-dead-letter-exchange': 'my-new-exchange' + ## note : dict format + user: saltstack + passwd: 'password' + durable: true + auto_delete: false + vhost: test_vhost + arguments: + - 'x-message-ttl': 8640000 + - 'x-expires': 8640000 + - 'x-dead-letter-exchange': 'my-new-exchange' exchange: my-new-exchange: diff --git a/rabbitmq/config/clean.sls b/rabbitmq/config/clean.sls index 69d9a9f2..326b47b3 100644 --- a/rabbitmq/config/clean.sls +++ b/rabbitmq/config/clean.sls @@ -12,6 +12,7 @@ include: - .policy.clean - .plugin.clean - .upstream.clean + - .queue.clean - .vhost.clean - .user.clean - .file.clean diff --git a/rabbitmq/config/init.sls b/rabbitmq/config/init.sls index ab1e7d9c..93320b7e 100644 --- a/rabbitmq/config/init.sls +++ b/rabbitmq/config/init.sls @@ -5,6 +5,7 @@ include: - .file - .user - .vhost + - .queue - .policy - .plugin - .upstream diff --git a/rabbitmq/config/queue/clean.sls b/rabbitmq/config/queue/clean.sls new file mode 100644 index 00000000..faba5158 --- /dev/null +++ b/rabbitmq/config/queue/clean.sls @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +# vim: ft=sls + +{%- set tplroot = tpldir.split('/')[0] %} +{%- from tplroot ~ "/map.jinja" import mapdata as rabbitmq with context %} +{%- set sls_service_running = tplroot ~ '.service.running' %} + +include: + - {{ sls_service_running }} + + {% for name, q in salt["pillar.get"]("rabbitmq:queue", {}).items() %} + +rabbitmq-config-queue-absent-{{ name }}: + cmd.run: + - name: /usr/local/sbin/rabbitmqadmin delete queue --vhost={{ q.vhost }} --username={{ q.user }} --password={{ q.passwd }} name={{ name }} + - require: + - service: {{ rabbitmq.service.name }} + + {% endfor %} diff --git a/rabbitmq/config/queue/init.sls b/rabbitmq/config/queue/init.sls new file mode 100644 index 00000000..d3e55181 --- /dev/null +++ b/rabbitmq/config/queue/init.sls @@ -0,0 +1,5 @@ +# -*- coding: utf-8 -*- +# vim: ft=sls + +include: + - .install diff --git a/rabbitmq/config/queue/install.sls b/rabbitmq/config/queue/install.sls new file mode 100644 index 00000000..4d85bc8e --- /dev/null +++ b/rabbitmq/config/queue/install.sls @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +# vim: ft=sls + +{%- set tplroot = tpldir.split('/')[0] %} +{%- from tplroot ~ "/map.jinja" import mapdata as rabbitmq with context %} +{%- set sls_service_running = tplroot ~ '.service.running' %} + +include: + - {{ sls_service_running }} + + {% for name, q in salt["pillar.get"]("rabbitmq:queue", {}).items() %} + +rabbitmq-config-queue-present-{{ name }}: + cmd.run: + - name: /usr/local/sbin/rabbitmqadmin declare queue --vhost={{ q.vhost }} --username={{ q.user }} --password={{ q.passwd }} name={{ name }} durable={{ q.durable|to_bool|lower }} auto_delete={{ q.auto_delete|to_bool|lower }} + + ### note: arguments='{# q.arguments|json #}' causes "mapping values are not allowed in this context" + - require: + - service: {{ rabbitmq.service.name }} + + {% endfor %} From af42400ff5bd70331fc5593bc2891bbdb2030e54 Mon Sep 17 00:00:00 2001 From: noelmcloughlin Date: Wed, 9 Jun 2021 09:22:51 +0100 Subject: [PATCH 08/10] fix(requisites): match state name and ci --- pillar.example | 13 +++++----- rabbitmq/config/policy/install.sls | 2 +- rabbitmq/config/queue/clean.sls | 4 +-- rabbitmq/config/queue/install.sls | 6 ++--- rabbitmq/config/upstream/install.sls | 2 +- rabbitmq/parameters/defaults.yaml | 13 +++++++--- .../default/files/_mapdata/amazonlinux-2.yaml | 24 ++++++++++-------- .../files/_mapdata/arch-base-latest.yaml | 24 ++++++++++-------- .../default/files/_mapdata/centos-7.yaml | 25 +++++++++++-------- .../default/files/_mapdata/centos-8.yaml | 24 ++++++++++-------- .../default/files/_mapdata/debian-10.yaml | 24 ++++++++++-------- .../default/files/_mapdata/debian-9.yaml | 24 ++++++++++-------- .../default/files/_mapdata/fedora-32.yaml | 24 ++++++++++-------- .../default/files/_mapdata/fedora-33.yaml | 24 ++++++++++-------- .../default/files/_mapdata/fedora-34.yaml | 24 ++++++++++-------- .../default/files/_mapdata/gentoo-2-sysd.yaml | 24 ++++++++++-------- .../default/files/_mapdata/gentoo-2-sysv.yaml | 24 ++++++++++-------- .../default/files/_mapdata/opensuse-15.yaml | 24 ++++++++++-------- .../files/_mapdata/opensuse-tumbleweed.yaml | 24 ++++++++++-------- .../default/files/_mapdata/oraclelinux-7.yaml | 24 ++++++++++-------- .../default/files/_mapdata/oraclelinux-8.yaml | 24 ++++++++++-------- .../default/files/_mapdata/ubuntu-16.yaml | 24 ++++++++++-------- .../default/files/_mapdata/ubuntu-18.yaml | 24 ++++++++++-------- .../default/files/_mapdata/ubuntu-20.yaml | 24 ++++++++++-------- 24 files changed, 275 insertions(+), 198 deletions(-) diff --git a/pillar.example b/pillar.example index aa6243ca..dacc5a84 100644 --- a/pillar.example +++ b/pillar.example @@ -4,14 +4,13 @@ rabbitmq: cluster: rabbit@locahost: - user: rabbit # 'user: rabbit' is confusing; 'node: rabbit' would be better - host: hostname # short hostname of node to join to, not fqdn + host: localhost # short hostname of node to join to, not fqdn ram_node: None runas: rabbitmq + user: rabbit # 'node' would make more sense here erlang_cookie: name: /var/lib/rabbitmq/.erlang.cookie value: shared-value-for-all-cluster-members - pkg: # https://github.com/rabbitmq/rabbitmq-server/releases/tag/v3.8.14 use_upstream: repo # if available (i.e. packagecloud) @@ -47,14 +46,14 @@ rabbitmq: my-new-queue: ## note : dict format user: saltstack - passwd: 'password' + passwd: password durable: true auto_delete: false vhost: test_vhost arguments: - - 'x-message-ttl': 8640000 - - 'x-expires': 8640000 - - 'x-dead-letter-exchange': 'my-new-exchange' + - x-message-ttl: 8640000 + - x-expires: 8640000 + - x-dead-letter-exchange: my-new-exchange exchange: my-new-exchange: diff --git a/rabbitmq/config/policy/install.sls b/rabbitmq/config/policy/install.sls index 9980b63a..4eaa67c8 100644 --- a/rabbitmq/config/policy/install.sls +++ b/rabbitmq/config/policy/install.sls @@ -16,6 +16,6 @@ rabbitmq-config-policy-present-{{ name }}: - {{ value | json }} {% endfor %} - require: - - service: {{ rabbitmq.service.name }} + - service: rabbitmq-service-running-service-running {% endfor %} diff --git a/rabbitmq/config/queue/clean.sls b/rabbitmq/config/queue/clean.sls index faba5158..687fd3a5 100644 --- a/rabbitmq/config/queue/clean.sls +++ b/rabbitmq/config/queue/clean.sls @@ -12,8 +12,8 @@ include: rabbitmq-config-queue-absent-{{ name }}: cmd.run: - - name: /usr/local/sbin/rabbitmqadmin delete queue --vhost={{ q.vhost }} --username={{ q.user }} --password={{ q.passwd }} name={{ name }} + - name: /usr/local/sbin/rabbitmqadmin delete queue --vhost={{ q.vhost }} --username={{ q.user }} --password={{ q.passwd }} name={{ name }} # noqa 204 - require: - - service: {{ rabbitmq.service.name }} + - service: rabbitmq-service-running-service-running {% endfor %} diff --git a/rabbitmq/config/queue/install.sls b/rabbitmq/config/queue/install.sls index 4d85bc8e..8e64bc5a 100644 --- a/rabbitmq/config/queue/install.sls +++ b/rabbitmq/config/queue/install.sls @@ -12,10 +12,8 @@ include: rabbitmq-config-queue-present-{{ name }}: cmd.run: - - name: /usr/local/sbin/rabbitmqadmin declare queue --vhost={{ q.vhost }} --username={{ q.user }} --password={{ q.passwd }} name={{ name }} durable={{ q.durable|to_bool|lower }} auto_delete={{ q.auto_delete|to_bool|lower }} - - ### note: arguments='{# q.arguments|json #}' causes "mapping values are not allowed in this context" + - name: /usr/local/sbin/rabbitmqadmin declare queue --vhost={{ q.vhost }} --username={{ q.user }} --password={{ q.passwd }} name={{ name }} durable={{ q.durable|to_bool|lower }} auto_delete={{ q.auto_delete|to_bool|lower }} # noqa 204 - require: - - service: {{ rabbitmq.service.name }} + - service: rabbitmq-service-running-service-running {% endfor %} diff --git a/rabbitmq/config/upstream/install.sls b/rabbitmq/config/upstream/install.sls index 61899d34..ac560b5b 100644 --- a/rabbitmq/config/upstream/install.sls +++ b/rabbitmq/config/upstream/install.sls @@ -16,6 +16,6 @@ rabbitmq-config-upstream-present-{{ name }}: - {{ value | json }} {% endfor %} - require: - - service: {{ rabbitmq.service.name }} + - service: rabbitmq-service-running-service-running {% endfor %} diff --git a/rabbitmq/parameters/defaults.yaml b/rabbitmq/parameters/defaults.yaml index 07f66bcf..0e8ef0c7 100644 --- a/rabbitmq/parameters/defaults.yaml +++ b/rabbitmq/parameters/defaults.yaml @@ -4,6 +4,15 @@ # Set default values. --- values: + cluster: + rabbit@locahost: + erlang_cookie: + name: /var/lib/rabbitmq/.erlang.cookie + value: shared-value-for-all-cluster-members + host: localhost # short hostname of node to join to, not fqdn + ram_node: None + runas: root + user: rabbit # 'node' would make more sense here pkg: name: rabbitmq-server # https://github.com/rabbitmq/rabbitmq-server/releases/tag/v3.8.14 @@ -23,11 +32,9 @@ values: rabbitmq_mnesia_base: /var/lib/rabbitmq RABBITMQ_BASE: /var/lib/rabbitmq config: + context: {} name: /etc/rabbitmq/rabbitmq.conf - user: rabbitmq - group: rabbitmq # see rabbitmq.conf.example from rabbitmq-server github docs - context: {} service: name: rabbitmq-server enabled: true diff --git a/test/integration/default/files/_mapdata/amazonlinux-2.yaml b/test/integration/default/files/_mapdata/amazonlinux-2.yaml index 38f7a098..0532d7aa 100644 --- a/test/integration/default/files/_mapdata/amazonlinux-2.yaml +++ b/test/integration/default/files/_mapdata/amazonlinux-2.yaml @@ -17,10 +17,13 @@ values: - x-message-ttl: 8640000 cluster: rabbit@locahost: - - user: rabbit - - host: localhost - - ram_node: None - - runas: root + erlang_cookie: + name: /var/lib/rabbitmq/.erlang.cookie + value: shared-value-for-all-cluster-members + host: localhost + ram_node: None + runas: root + user: rabbit config: context: {} name: /etc/rabbitmq.conf @@ -29,6 +32,7 @@ values: cleanlist: - /usr/local/bin/rabbitmq-env - /usr/local/bin/rabbitmq-plugins + - /var/run/rabbitmq data: /var/lib/rabbitmq env: context: @@ -72,15 +76,15 @@ values: - definition: '{"ha-mode": "all"}' queue: my-new-queue: - - user: saltstack - - passwd: password - - durable: true - - auto_delete: false - - vhost: test_vhost - - arguments: + arguments: - x-message-ttl: 8640000 - x-expires: 8640000 - x-dead-letter-exchange: my-new-exchange + auto_delete: false + durable: true + passwd: password + user: saltstack + vhost: test_vhost remove_guest_user: true retry_option: attempts: 0 diff --git a/test/integration/default/files/_mapdata/arch-base-latest.yaml b/test/integration/default/files/_mapdata/arch-base-latest.yaml index 3081a555..6b239634 100644 --- a/test/integration/default/files/_mapdata/arch-base-latest.yaml +++ b/test/integration/default/files/_mapdata/arch-base-latest.yaml @@ -17,10 +17,13 @@ values: - x-message-ttl: 8640000 cluster: rabbit@locahost: - - user: rabbit - - host: localhost - - ram_node: None - - runas: root + erlang_cookie: + name: /var/lib/rabbitmq/.erlang.cookie + value: shared-value-for-all-cluster-members + host: localhost + ram_node: None + runas: root + user: rabbit config: context: {} name: /etc/rabbitmq/rabbitmq.conf @@ -29,6 +32,7 @@ values: cleanlist: - /usr/local/bin/rabbitmq-env - /usr/local/bin/rabbitmq-plugins + - /var/run/rabbitmq data: /var/lib/rabbitmq env: context: @@ -72,15 +76,15 @@ values: - definition: '{"ha-mode": "all"}' queue: my-new-queue: - - user: saltstack - - passwd: password - - durable: true - - auto_delete: false - - vhost: test_vhost - - arguments: + arguments: - x-message-ttl: 8640000 - x-expires: 8640000 - x-dead-letter-exchange: my-new-exchange + auto_delete: false + durable: true + passwd: password + user: saltstack + vhost: test_vhost remove_guest_user: true retry_option: attempts: 0 diff --git a/test/integration/default/files/_mapdata/centos-7.yaml b/test/integration/default/files/_mapdata/centos-7.yaml index 51b04c3b..86eb7dc9 100644 --- a/test/integration/default/files/_mapdata/centos-7.yaml +++ b/test/integration/default/files/_mapdata/centos-7.yaml @@ -17,10 +17,14 @@ values: - x-message-ttl: 8640000 cluster: rabbit@locahost: - - user: rabbit - - host: localhost - - ram_node: None - - runas: root + erlang_cookie: + name: /var/lib/rabbitmq/.erlang.cookie + value: shared-value-for-all-cluster-members + host: localhost + ram_node: None + runas: root + user: rabbit + config: context: {} name: /etc/rabbitmq.conf @@ -29,6 +33,7 @@ values: cleanlist: - /usr/local/bin/rabbitmq-env - /usr/local/bin/rabbitmq-plugins + - /var/run/rabbitmq data: /var/lib/rabbitmq env: context: @@ -72,15 +77,15 @@ values: - definition: '{"ha-mode": "all"}' queue: my-new-queue: - - user: saltstack - - passwd: password - - durable: true - - auto_delete: false - - vhost: test_vhost - - arguments: + arguments: - x-message-ttl: 8640000 - x-expires: 8640000 - x-dead-letter-exchange: my-new-exchange + auto_delete: false + durable: true + passwd: password + user: saltstack + vhost: test_vhost remove_guest_user: true retry_option: attempts: 0 diff --git a/test/integration/default/files/_mapdata/centos-8.yaml b/test/integration/default/files/_mapdata/centos-8.yaml index ae2da7ed..22e9dd51 100644 --- a/test/integration/default/files/_mapdata/centos-8.yaml +++ b/test/integration/default/files/_mapdata/centos-8.yaml @@ -17,10 +17,13 @@ values: - x-message-ttl: 8640000 cluster: rabbit@locahost: - - user: rabbit - - host: localhost - - ram_node: None - - runas: root + erlang_cookie: + name: /var/lib/rabbitmq/.erlang.cookie + value: shared-value-for-all-cluster-members + host: localhost + ram_node: None + runas: root + user: rabbit config: context: {} name: /etc/rabbitmq.conf @@ -29,6 +32,7 @@ values: cleanlist: - /usr/local/bin/rabbitmq-env - /usr/local/bin/rabbitmq-plugins + - /var/run/rabbitmq data: /var/lib/rabbitmq env: context: @@ -72,15 +76,15 @@ values: - definition: '{"ha-mode": "all"}' queue: my-new-queue: - - user: saltstack - - passwd: password - - durable: true - - auto_delete: false - - vhost: test_vhost - - arguments: + arguments: - x-message-ttl: 8640000 - x-expires: 8640000 - x-dead-letter-exchange: my-new-exchange + auto_delete: false + durable: true + passwd: password + user: saltstack + vhost: test_vhost remove_guest_user: true retry_option: attempts: 0 diff --git a/test/integration/default/files/_mapdata/debian-10.yaml b/test/integration/default/files/_mapdata/debian-10.yaml index 20a62c3a..285af1df 100644 --- a/test/integration/default/files/_mapdata/debian-10.yaml +++ b/test/integration/default/files/_mapdata/debian-10.yaml @@ -17,10 +17,13 @@ values: - x-message-ttl: 8640000 cluster: rabbit@locahost: - - user: rabbit - - host: localhost - - ram_node: None - - runas: root + erlang_cookie: + name: /var/lib/rabbitmq/.erlang.cookie + value: shared-value-for-all-cluster-members + host: localhost + ram_node: None + runas: root + user: rabbit config: context: {} name: /etc/rabbitmq/rabbitmq.conf @@ -29,6 +32,7 @@ values: cleanlist: - /usr/local/bin/rabbitmq-env - /usr/local/bin/rabbitmq-plugins + - /var/run/rabbitmq data: /var/lib/rabbitmq env: context: @@ -74,15 +78,15 @@ values: - definition: '{"ha-mode": "all"}' queue: my-new-queue: - - user: saltstack - - passwd: password - - durable: true - - auto_delete: false - - vhost: test_vhost - - arguments: + arguments: - x-message-ttl: 8640000 - x-expires: 8640000 - x-dead-letter-exchange: my-new-exchange + auto_delete: false + durable: true + passwd: password + user: saltstack + vhost: test_vhost remove_guest_user: true retry_option: attempts: 0 diff --git a/test/integration/default/files/_mapdata/debian-9.yaml b/test/integration/default/files/_mapdata/debian-9.yaml index 6a5d7169..ea98412b 100644 --- a/test/integration/default/files/_mapdata/debian-9.yaml +++ b/test/integration/default/files/_mapdata/debian-9.yaml @@ -17,10 +17,13 @@ values: - x-message-ttl: 8640000 cluster: rabbit@locahost: - - user: rabbit - - host: localhost - - ram_node: None - - runas: root + erlang_cookie: + name: /var/lib/rabbitmq/.erlang.cookie + value: shared-value-for-all-cluster-members + host: localhost + ram_node: None + runas: root + user: rabbit config: context: {} name: /etc/rabbitmq/rabbitmq.conf @@ -29,6 +32,7 @@ values: cleanlist: - /usr/local/bin/rabbitmq-env - /usr/local/bin/rabbitmq-plugins + - /var/run/rabbitmq data: /var/lib/rabbitmq env: context: @@ -74,15 +78,15 @@ values: - definition: '{"ha-mode": "all"}' queue: my-new-queue: - - user: saltstack - - passwd: password - - durable: true - - auto_delete: false - - vhost: test_vhost - - arguments: + arguments: - x-message-ttl: 8640000 - x-expires: 8640000 - x-dead-letter-exchange: my-new-exchange + auto_delete: false + durable: true + passwd: password + user: saltstack + vhost: test_vhost remove_guest_user: true retry_option: attempts: 0 diff --git a/test/integration/default/files/_mapdata/fedora-32.yaml b/test/integration/default/files/_mapdata/fedora-32.yaml index 289c39d1..f4530035 100644 --- a/test/integration/default/files/_mapdata/fedora-32.yaml +++ b/test/integration/default/files/_mapdata/fedora-32.yaml @@ -17,10 +17,13 @@ values: - x-message-ttl: 8640000 cluster: rabbit@locahost: - - user: rabbit - - host: localhost - - ram_node: None - - runas: root + erlang_cookie: + name: /var/lib/rabbitmq/.erlang.cookie + value: shared-value-for-all-cluster-members + host: localhost + ram_node: None + runas: root + user: rabbit config: context: {} name: /etc/rabbitmq.conf @@ -29,6 +32,7 @@ values: cleanlist: - /usr/local/bin/rabbitmq-env - /usr/local/bin/rabbitmq-plugins + - /var/run/rabbitmq data: /var/lib/rabbitmq env: context: @@ -73,15 +77,15 @@ values: - definition: '{"ha-mode": "all"}' queue: my-new-queue: - - user: saltstack - - passwd: password - - durable: true - - auto_delete: false - - vhost: test_vhost - - arguments: + arguments: - x-message-ttl: 8640000 - x-expires: 8640000 - x-dead-letter-exchange: my-new-exchange + auto_delete: false + durable: true + passwd: password + user: saltstack + vhost: test_vhost remove_guest_user: true retry_option: attempts: 0 diff --git a/test/integration/default/files/_mapdata/fedora-33.yaml b/test/integration/default/files/_mapdata/fedora-33.yaml index 1a751b83..192f5e6d 100644 --- a/test/integration/default/files/_mapdata/fedora-33.yaml +++ b/test/integration/default/files/_mapdata/fedora-33.yaml @@ -17,10 +17,13 @@ values: - x-message-ttl: 8640000 cluster: rabbit@locahost: - - user: rabbit - - host: localhost - - ram_node: None - - runas: root + erlang_cookie: + name: /var/lib/rabbitmq/.erlang.cookie + value: shared-value-for-all-cluster-members + host: localhost + ram_node: None + runas: root + user: rabbit config: context: {} name: /etc/rabbitmq.conf @@ -29,6 +32,7 @@ values: cleanlist: - /usr/local/bin/rabbitmq-env - /usr/local/bin/rabbitmq-plugins + - /var/run/rabbitmq data: /var/lib/rabbitmq env: context: @@ -73,15 +77,15 @@ values: - definition: '{"ha-mode": "all"}' queue: my-new-queue: - - user: saltstack - - passwd: password - - durable: true - - auto_delete: false - - vhost: test_vhost - - arguments: + arguments: - x-message-ttl: 8640000 - x-expires: 8640000 - x-dead-letter-exchange: my-new-exchange + auto_delete: false + durable: true + passwd: password + user: saltstack + vhost: test_vhost remove_guest_user: true retry_option: attempts: 0 diff --git a/test/integration/default/files/_mapdata/fedora-34.yaml b/test/integration/default/files/_mapdata/fedora-34.yaml index 6980a32e..a46c90e2 100644 --- a/test/integration/default/files/_mapdata/fedora-34.yaml +++ b/test/integration/default/files/_mapdata/fedora-34.yaml @@ -17,10 +17,13 @@ values: - x-message-ttl: 8640000 cluster: rabbit@locahost: - - user: rabbit - - host: localhost - - ram_node: None - - runas: root + erlang_cookie: + name: /var/lib/rabbitmq/.erlang.cookie + value: shared-value-for-all-cluster-members + host: localhost + ram_node: None + runas: root + user: rabbit config: context: {} name: /etc/rabbitmq.conf @@ -29,6 +32,7 @@ values: cleanlist: - /usr/local/bin/rabbitmq-env - /usr/local/bin/rabbitmq-plugins + - /var/run/rabbitmq data: /var/lib/rabbitmq env: context: @@ -73,15 +77,15 @@ values: - definition: '{"ha-mode": "all"}' queue: my-new-queue: - - user: saltstack - - passwd: password - - durable: true - - auto_delete: false - - vhost: test_vhost - - arguments: + arguments: - x-message-ttl: 8640000 - x-expires: 8640000 - x-dead-letter-exchange: my-new-exchange + auto_delete: false + durable: true + passwd: password + user: saltstack + vhost: test_vhost remove_guest_user: true retry_option: attempts: 0 diff --git a/test/integration/default/files/_mapdata/gentoo-2-sysd.yaml b/test/integration/default/files/_mapdata/gentoo-2-sysd.yaml index 7dcad0d2..6ca4a475 100644 --- a/test/integration/default/files/_mapdata/gentoo-2-sysd.yaml +++ b/test/integration/default/files/_mapdata/gentoo-2-sysd.yaml @@ -17,10 +17,13 @@ values: - x-message-ttl: 8640000 cluster: rabbit@locahost: - - user: rabbit - - host: localhost - - ram_node: None - - runas: root + erlang_cookie: + name: /var/lib/rabbitmq/.erlang.cookie + value: shared-value-for-all-cluster-members + host: localhost + ram_node: None + runas: root + user: rabbit config: context: {} name: /etc/rabbitmq/rabbitmq.conf @@ -29,6 +32,7 @@ values: cleanlist: - /usr/local/bin/rabbitmq-env - /usr/local/bin/rabbitmq-plugins + - /var/run/rabbitmq data: /var/lib/rabbitmq env: context: @@ -72,15 +76,15 @@ values: - definition: '{"ha-mode": "all"}' queue: my-new-queue: - - user: saltstack - - passwd: password - - durable: true - - auto_delete: false - - vhost: test_vhost - - arguments: + arguments: - x-message-ttl: 8640000 - x-expires: 8640000 - x-dead-letter-exchange: my-new-exchange + auto_delete: false + durable: true + passwd: password + user: saltstack + vhost: test_vhost remove_guest_user: true retry_option: attempts: 0 diff --git a/test/integration/default/files/_mapdata/gentoo-2-sysv.yaml b/test/integration/default/files/_mapdata/gentoo-2-sysv.yaml index 7dcad0d2..6ca4a475 100644 --- a/test/integration/default/files/_mapdata/gentoo-2-sysv.yaml +++ b/test/integration/default/files/_mapdata/gentoo-2-sysv.yaml @@ -17,10 +17,13 @@ values: - x-message-ttl: 8640000 cluster: rabbit@locahost: - - user: rabbit - - host: localhost - - ram_node: None - - runas: root + erlang_cookie: + name: /var/lib/rabbitmq/.erlang.cookie + value: shared-value-for-all-cluster-members + host: localhost + ram_node: None + runas: root + user: rabbit config: context: {} name: /etc/rabbitmq/rabbitmq.conf @@ -29,6 +32,7 @@ values: cleanlist: - /usr/local/bin/rabbitmq-env - /usr/local/bin/rabbitmq-plugins + - /var/run/rabbitmq data: /var/lib/rabbitmq env: context: @@ -72,15 +76,15 @@ values: - definition: '{"ha-mode": "all"}' queue: my-new-queue: - - user: saltstack - - passwd: password - - durable: true - - auto_delete: false - - vhost: test_vhost - - arguments: + arguments: - x-message-ttl: 8640000 - x-expires: 8640000 - x-dead-letter-exchange: my-new-exchange + auto_delete: false + durable: true + passwd: password + user: saltstack + vhost: test_vhost remove_guest_user: true retry_option: attempts: 0 diff --git a/test/integration/default/files/_mapdata/opensuse-15.yaml b/test/integration/default/files/_mapdata/opensuse-15.yaml index 7255b555..de9810d1 100644 --- a/test/integration/default/files/_mapdata/opensuse-15.yaml +++ b/test/integration/default/files/_mapdata/opensuse-15.yaml @@ -17,10 +17,13 @@ values: - x-message-ttl: 8640000 cluster: rabbit@locahost: - - user: rabbit - - host: localhost - - ram_node: None - - runas: root + erlang_cookie: + name: /var/lib/rabbitmq/.erlang.cookie + value: shared-value-for-all-cluster-members + host: localhost + ram_node: None + runas: root + user: rabbit config: context: {} name: /etc/rabbitmq/rabbitmq.conf @@ -29,6 +32,7 @@ values: cleanlist: - /usr/local/bin/rabbitmq-env - /usr/local/bin/rabbitmq-plugins + - /var/run/rabbitmq data: /var/lib/rabbitmq env: context: @@ -72,15 +76,15 @@ values: - definition: '{"ha-mode": "all"}' queue: my-new-queue: - - user: saltstack - - passwd: password - - durable: true - - auto_delete: false - - vhost: test_vhost - - arguments: + arguments: - x-message-ttl: 8640000 - x-expires: 8640000 - x-dead-letter-exchange: my-new-exchange + auto_delete: false + durable: true + passwd: password + user: saltstack + vhost: test_vhost remove_guest_user: true retry_option: attempts: 0 diff --git a/test/integration/default/files/_mapdata/opensuse-tumbleweed.yaml b/test/integration/default/files/_mapdata/opensuse-tumbleweed.yaml index 56a9c050..46785592 100644 --- a/test/integration/default/files/_mapdata/opensuse-tumbleweed.yaml +++ b/test/integration/default/files/_mapdata/opensuse-tumbleweed.yaml @@ -17,10 +17,13 @@ values: - x-message-ttl: 8640000 cluster: rabbit@locahost: - - user: rabbit - - host: localhost - - ram_node: None - - runas: root + erlang_cookie: + name: /var/lib/rabbitmq/.erlang.cookie + value: shared-value-for-all-cluster-members + host: localhost + ram_node: None + runas: root + user: rabbit config: context: {} name: /etc/rabbitmq/rabbitmq.conf @@ -29,6 +32,7 @@ values: cleanlist: - /usr/local/bin/rabbitmq-env - /usr/local/bin/rabbitmq-plugins + - /var/run/rabbitmq data: /var/lib/rabbitmq env: context: @@ -72,15 +76,15 @@ values: - definition: '{"ha-mode": "all"}' queue: my-new-queue: - - user: saltstack - - passwd: password - - durable: true - - auto_delete: false - - vhost: test_vhost - - arguments: + arguments: - x-message-ttl: 8640000 - x-expires: 8640000 - x-dead-letter-exchange: my-new-exchange + auto_delete: false + durable: true + passwd: password + user: saltstack + vhost: test_vhost remove_guest_user: true retry_option: attempts: 0 diff --git a/test/integration/default/files/_mapdata/oraclelinux-7.yaml b/test/integration/default/files/_mapdata/oraclelinux-7.yaml index aec30716..c24f37e3 100644 --- a/test/integration/default/files/_mapdata/oraclelinux-7.yaml +++ b/test/integration/default/files/_mapdata/oraclelinux-7.yaml @@ -17,10 +17,13 @@ values: - x-message-ttl: 8640000 cluster: rabbit@locahost: - - user: rabbit - - host: localhost - - ram_node: None - - runas: root + erlang_cookie: + name: /var/lib/rabbitmq/.erlang.cookie + value: shared-value-for-all-cluster-members + host: localhost + ram_node: None + runas: root + user: rabbit config: context: {} name: /etc/rabbitmq.conf @@ -29,6 +32,7 @@ values: cleanlist: - /usr/local/bin/rabbitmq-env - /usr/local/bin/rabbitmq-plugins + - /var/run/rabbitmq data: /var/lib/rabbitmq env: context: @@ -72,15 +76,15 @@ values: - definition: '{"ha-mode": "all"}' queue: my-new-queue: - - user: saltstack - - passwd: password - - durable: true - - auto_delete: false - - vhost: test_vhost - - arguments: + arguments: - x-message-ttl: 8640000 - x-expires: 8640000 - x-dead-letter-exchange: my-new-exchange + auto_delete: false + durable: true + passwd: password + user: saltstack + vhost: test_vhost remove_guest_user: true retry_option: attempts: 0 diff --git a/test/integration/default/files/_mapdata/oraclelinux-8.yaml b/test/integration/default/files/_mapdata/oraclelinux-8.yaml index 75e9bc36..dc2fed71 100644 --- a/test/integration/default/files/_mapdata/oraclelinux-8.yaml +++ b/test/integration/default/files/_mapdata/oraclelinux-8.yaml @@ -17,10 +17,13 @@ values: - x-message-ttl: 8640000 cluster: rabbit@locahost: - - user: rabbit - - host: localhost - - ram_node: None - - runas: root + erlang_cookie: + name: /var/lib/rabbitmq/.erlang.cookie + value: shared-value-for-all-cluster-members + host: localhost + ram_node: None + runas: root + user: rabbit config: context: {} name: /etc/rabbitmq.conf @@ -29,6 +32,7 @@ values: cleanlist: - /usr/local/bin/rabbitmq-env - /usr/local/bin/rabbitmq-plugins + - /var/run/rabbitmq data: /var/lib/rabbitmq env: context: @@ -72,15 +76,15 @@ values: - definition: '{"ha-mode": "all"}' queue: my-new-queue: - - user: saltstack - - passwd: password - - durable: true - - auto_delete: false - - vhost: test_vhost - - arguments: + arguments: - x-message-ttl: 8640000 - x-expires: 8640000 - x-dead-letter-exchange: my-new-exchange + auto_delete: false + durable: true + passwd: password + user: saltstack + vhost: test_vhost remove_guest_user: true retry_option: attempts: 0 diff --git a/test/integration/default/files/_mapdata/ubuntu-16.yaml b/test/integration/default/files/_mapdata/ubuntu-16.yaml index f11d4070..3a7a707c 100644 --- a/test/integration/default/files/_mapdata/ubuntu-16.yaml +++ b/test/integration/default/files/_mapdata/ubuntu-16.yaml @@ -17,10 +17,13 @@ values: - x-message-ttl: 8640000 cluster: rabbit@locahost: - - user: rabbit - - host: localhost - - ram_node: None - - runas: root + erlang_cookie: + name: /var/lib/rabbitmq/.erlang.cookie + value: shared-value-for-all-cluster-members + host: localhost + ram_node: None + runas: root + user: rabbit config: context: {} name: /etc/rabbitmq/rabbitmq.conf @@ -29,6 +32,7 @@ values: cleanlist: - /usr/local/bin/rabbitmq-env - /usr/local/bin/rabbitmq-plugins + - /var/run/rabbitmq data: /var/lib/rabbitmq env: context: @@ -74,15 +78,15 @@ values: - definition: '{"ha-mode": "all"}' queue: my-new-queue: - - user: saltstack - - passwd: password - - durable: true - - auto_delete: false - - vhost: test_vhost - - arguments: + arguments: - x-message-ttl: 8640000 - x-expires: 8640000 - x-dead-letter-exchange: my-new-exchange + auto_delete: false + durable: true + passwd: password + user: saltstack + vhost: test_vhost remove_guest_user: true retry_option: attempts: 0 diff --git a/test/integration/default/files/_mapdata/ubuntu-18.yaml b/test/integration/default/files/_mapdata/ubuntu-18.yaml index 7bc246b9..af294ab7 100644 --- a/test/integration/default/files/_mapdata/ubuntu-18.yaml +++ b/test/integration/default/files/_mapdata/ubuntu-18.yaml @@ -17,10 +17,13 @@ values: - x-message-ttl: 8640000 cluster: rabbit@locahost: - - user: rabbit - - host: localhost - - ram_node: None - - runas: root + erlang_cookie: + name: /var/lib/rabbitmq/.erlang.cookie + value: shared-value-for-all-cluster-members + host: localhost + ram_node: None + runas: root + user: rabbit config: context: {} name: /etc/rabbitmq/rabbitmq.conf @@ -29,6 +32,7 @@ values: cleanlist: - /usr/local/bin/rabbitmq-env - /usr/local/bin/rabbitmq-plugins + - /var/run/rabbitmq data: /var/lib/rabbitmq env: context: @@ -74,15 +78,15 @@ values: - definition: '{"ha-mode": "all"}' queue: my-new-queue: - - user: saltstack - - passwd: password - - durable: true - - auto_delete: false - - vhost: test_vhost - - arguments: + arguments: - x-message-ttl: 8640000 - x-expires: 8640000 - x-dead-letter-exchange: my-new-exchange + auto_delete: false + durable: true + passwd: password + user: saltstack + vhost: test_vhost remove_guest_user: true retry_option: attempts: 0 diff --git a/test/integration/default/files/_mapdata/ubuntu-20.yaml b/test/integration/default/files/_mapdata/ubuntu-20.yaml index 6cbc2b51..27704fe3 100644 --- a/test/integration/default/files/_mapdata/ubuntu-20.yaml +++ b/test/integration/default/files/_mapdata/ubuntu-20.yaml @@ -17,10 +17,13 @@ values: - x-message-ttl: 8640000 cluster: rabbit@locahost: - - user: rabbit - - host: localhost - - ram_node: None - - runas: root + erlang_cookie: + name: /var/lib/rabbitmq/.erlang.cookie + value: shared-value-for-all-cluster-members + host: localhost + ram_node: None + runas: root + user: rabbit config: context: {} name: /etc/rabbitmq/rabbitmq.conf @@ -29,6 +32,7 @@ values: cleanlist: - /usr/local/bin/rabbitmq-env - /usr/local/bin/rabbitmq-plugins + - /var/run/rabbitmq data: /var/lib/rabbitmq env: context: @@ -74,15 +78,15 @@ values: - definition: '{"ha-mode": "all"}' queue: my-new-queue: - - user: saltstack - - passwd: password - - durable: true - - auto_delete: false - - vhost: test_vhost - - arguments: + arguments: - x-message-ttl: 8640000 - x-expires: 8640000 - x-dead-letter-exchange: my-new-exchange + auto_delete: false + durable: true + passwd: password + user: saltstack + vhost: test_vhost remove_guest_user: true retry_option: attempts: 0 From e8f6207fbbdb71b2edd65d6b4686476a991a7559 Mon Sep 17 00:00:00 2001 From: noelmcloughlin Date: Tue, 15 Jun 2021 16:17:00 +0100 Subject: [PATCH 09/10] fix(ci): try this --- pillar.example | 2 +- rabbitmq/parameters/defaults.yaml | 8 ++++---- .../default/files/_mapdata/amazonlinux-2.yaml | 8 ++++---- .../default/files/_mapdata/arch-base-latest.yaml | 8 ++++---- test/integration/default/files/_mapdata/centos-7.yaml | 9 ++++----- test/integration/default/files/_mapdata/centos-8.yaml | 8 ++++---- test/integration/default/files/_mapdata/debian-10.yaml | 8 ++++---- test/integration/default/files/_mapdata/debian-9.yaml | 8 ++++---- test/integration/default/files/_mapdata/fedora-32.yaml | 8 ++++---- test/integration/default/files/_mapdata/fedora-33.yaml | 8 ++++---- test/integration/default/files/_mapdata/fedora-34.yaml | 8 ++++---- .../default/files/_mapdata/gentoo-2-sysd.yaml | 8 ++++---- .../default/files/_mapdata/gentoo-2-sysv.yaml | 8 ++++---- test/integration/default/files/_mapdata/opensuse-15.yaml | 8 ++++---- .../default/files/_mapdata/opensuse-tumbleweed.yaml | 8 ++++---- .../default/files/_mapdata/oraclelinux-7.yaml | 8 ++++---- .../default/files/_mapdata/oraclelinux-8.yaml | 8 ++++---- test/integration/default/files/_mapdata/ubuntu-16.yaml | 8 ++++---- test/integration/default/files/_mapdata/ubuntu-18.yaml | 8 ++++---- test/integration/default/files/_mapdata/ubuntu-20.yaml | 8 ++++---- 20 files changed, 77 insertions(+), 78 deletions(-) diff --git a/pillar.example b/pillar.example index dacc5a84..1b3c6efc 100644 --- a/pillar.example +++ b/pillar.example @@ -4,10 +4,10 @@ rabbitmq: cluster: rabbit@locahost: + user: rabbit # 'node' would make more sense here host: localhost # short hostname of node to join to, not fqdn ram_node: None runas: rabbitmq - user: rabbit # 'node' would make more sense here erlang_cookie: name: /var/lib/rabbitmq/.erlang.cookie value: shared-value-for-all-cluster-members diff --git a/rabbitmq/parameters/defaults.yaml b/rabbitmq/parameters/defaults.yaml index 0e8ef0c7..3b0bc70f 100644 --- a/rabbitmq/parameters/defaults.yaml +++ b/rabbitmq/parameters/defaults.yaml @@ -6,13 +6,13 @@ values: cluster: rabbit@locahost: + user: rabbit # 'node' would make more sense here + host: localhost # short hostname of node to join to, not fqdn + ram_node: None + runas: rabbitmq erlang_cookie: name: /var/lib/rabbitmq/.erlang.cookie value: shared-value-for-all-cluster-members - host: localhost # short hostname of node to join to, not fqdn - ram_node: None - runas: root - user: rabbit # 'node' would make more sense here pkg: name: rabbitmq-server # https://github.com/rabbitmq/rabbitmq-server/releases/tag/v3.8.14 diff --git a/test/integration/default/files/_mapdata/amazonlinux-2.yaml b/test/integration/default/files/_mapdata/amazonlinux-2.yaml index 0532d7aa..031677c3 100644 --- a/test/integration/default/files/_mapdata/amazonlinux-2.yaml +++ b/test/integration/default/files/_mapdata/amazonlinux-2.yaml @@ -17,13 +17,13 @@ values: - x-message-ttl: 8640000 cluster: rabbit@locahost: + user: rabbit # 'node' would make more sense here + host: localhost # short hostname of node to join to, not fqdn + ram_node: None + runas: rabbitmq erlang_cookie: name: /var/lib/rabbitmq/.erlang.cookie value: shared-value-for-all-cluster-members - host: localhost - ram_node: None - runas: root - user: rabbit config: context: {} name: /etc/rabbitmq.conf diff --git a/test/integration/default/files/_mapdata/arch-base-latest.yaml b/test/integration/default/files/_mapdata/arch-base-latest.yaml index 6b239634..740aef44 100644 --- a/test/integration/default/files/_mapdata/arch-base-latest.yaml +++ b/test/integration/default/files/_mapdata/arch-base-latest.yaml @@ -17,13 +17,13 @@ values: - x-message-ttl: 8640000 cluster: rabbit@locahost: + user: rabbit # 'node' would make more sense here + host: localhost # short hostname of node to join to, not fqdn + ram_node: None + runas: rabbitmq erlang_cookie: name: /var/lib/rabbitmq/.erlang.cookie value: shared-value-for-all-cluster-members - host: localhost - ram_node: None - runas: root - user: rabbit config: context: {} name: /etc/rabbitmq/rabbitmq.conf diff --git a/test/integration/default/files/_mapdata/centos-7.yaml b/test/integration/default/files/_mapdata/centos-7.yaml index 86eb7dc9..e99b61c8 100644 --- a/test/integration/default/files/_mapdata/centos-7.yaml +++ b/test/integration/default/files/_mapdata/centos-7.yaml @@ -17,14 +17,13 @@ values: - x-message-ttl: 8640000 cluster: rabbit@locahost: + user: rabbit # 'node' would make more sense here + host: localhost # short hostname of node to join to, not fqdn + ram_node: None + runas: rabbitmq erlang_cookie: name: /var/lib/rabbitmq/.erlang.cookie value: shared-value-for-all-cluster-members - host: localhost - ram_node: None - runas: root - user: rabbit - config: context: {} name: /etc/rabbitmq.conf diff --git a/test/integration/default/files/_mapdata/centos-8.yaml b/test/integration/default/files/_mapdata/centos-8.yaml index 22e9dd51..213dae2f 100644 --- a/test/integration/default/files/_mapdata/centos-8.yaml +++ b/test/integration/default/files/_mapdata/centos-8.yaml @@ -17,13 +17,13 @@ values: - x-message-ttl: 8640000 cluster: rabbit@locahost: + user: rabbit # 'node' would make more sense here + host: localhost # short hostname of node to join to, not fqdn + ram_node: None + runas: rabbitmq erlang_cookie: name: /var/lib/rabbitmq/.erlang.cookie value: shared-value-for-all-cluster-members - host: localhost - ram_node: None - runas: root - user: rabbit config: context: {} name: /etc/rabbitmq.conf diff --git a/test/integration/default/files/_mapdata/debian-10.yaml b/test/integration/default/files/_mapdata/debian-10.yaml index 285af1df..1bdad3e6 100644 --- a/test/integration/default/files/_mapdata/debian-10.yaml +++ b/test/integration/default/files/_mapdata/debian-10.yaml @@ -17,13 +17,13 @@ values: - x-message-ttl: 8640000 cluster: rabbit@locahost: + user: rabbit # 'node' would make more sense here + host: localhost # short hostname of node to join to, not fqdn + ram_node: None + runas: rabbitmq erlang_cookie: name: /var/lib/rabbitmq/.erlang.cookie value: shared-value-for-all-cluster-members - host: localhost - ram_node: None - runas: root - user: rabbit config: context: {} name: /etc/rabbitmq/rabbitmq.conf diff --git a/test/integration/default/files/_mapdata/debian-9.yaml b/test/integration/default/files/_mapdata/debian-9.yaml index ea98412b..06a686d7 100644 --- a/test/integration/default/files/_mapdata/debian-9.yaml +++ b/test/integration/default/files/_mapdata/debian-9.yaml @@ -17,13 +17,13 @@ values: - x-message-ttl: 8640000 cluster: rabbit@locahost: + user: rabbit # 'node' would make more sense here + host: localhost # short hostname of node to join to, not fqdn + ram_node: None + runas: rabbitmq erlang_cookie: name: /var/lib/rabbitmq/.erlang.cookie value: shared-value-for-all-cluster-members - host: localhost - ram_node: None - runas: root - user: rabbit config: context: {} name: /etc/rabbitmq/rabbitmq.conf diff --git a/test/integration/default/files/_mapdata/fedora-32.yaml b/test/integration/default/files/_mapdata/fedora-32.yaml index f4530035..af26ae83 100644 --- a/test/integration/default/files/_mapdata/fedora-32.yaml +++ b/test/integration/default/files/_mapdata/fedora-32.yaml @@ -17,13 +17,13 @@ values: - x-message-ttl: 8640000 cluster: rabbit@locahost: + user: rabbit # 'node' would make more sense here + host: localhost # short hostname of node to join to, not fqdn + ram_node: None + runas: rabbitmq erlang_cookie: name: /var/lib/rabbitmq/.erlang.cookie value: shared-value-for-all-cluster-members - host: localhost - ram_node: None - runas: root - user: rabbit config: context: {} name: /etc/rabbitmq.conf diff --git a/test/integration/default/files/_mapdata/fedora-33.yaml b/test/integration/default/files/_mapdata/fedora-33.yaml index 192f5e6d..2f12e9b6 100644 --- a/test/integration/default/files/_mapdata/fedora-33.yaml +++ b/test/integration/default/files/_mapdata/fedora-33.yaml @@ -17,13 +17,13 @@ values: - x-message-ttl: 8640000 cluster: rabbit@locahost: + user: rabbit # 'node' would make more sense here + host: localhost # short hostname of node to join to, not fqdn + ram_node: None + runas: rabbitmq erlang_cookie: name: /var/lib/rabbitmq/.erlang.cookie value: shared-value-for-all-cluster-members - host: localhost - ram_node: None - runas: root - user: rabbit config: context: {} name: /etc/rabbitmq.conf diff --git a/test/integration/default/files/_mapdata/fedora-34.yaml b/test/integration/default/files/_mapdata/fedora-34.yaml index a46c90e2..c55e3f16 100644 --- a/test/integration/default/files/_mapdata/fedora-34.yaml +++ b/test/integration/default/files/_mapdata/fedora-34.yaml @@ -17,13 +17,13 @@ values: - x-message-ttl: 8640000 cluster: rabbit@locahost: + user: rabbit # 'node' would make more sense here + host: localhost # short hostname of node to join to, not fqdn + ram_node: None + runas: rabbitmq erlang_cookie: name: /var/lib/rabbitmq/.erlang.cookie value: shared-value-for-all-cluster-members - host: localhost - ram_node: None - runas: root - user: rabbit config: context: {} name: /etc/rabbitmq.conf diff --git a/test/integration/default/files/_mapdata/gentoo-2-sysd.yaml b/test/integration/default/files/_mapdata/gentoo-2-sysd.yaml index 6ca4a475..266e343a 100644 --- a/test/integration/default/files/_mapdata/gentoo-2-sysd.yaml +++ b/test/integration/default/files/_mapdata/gentoo-2-sysd.yaml @@ -17,13 +17,13 @@ values: - x-message-ttl: 8640000 cluster: rabbit@locahost: + user: rabbit # 'node' would make more sense here + host: localhost # short hostname of node to join to, not fqdn + ram_node: None + runas: rabbitmq erlang_cookie: name: /var/lib/rabbitmq/.erlang.cookie value: shared-value-for-all-cluster-members - host: localhost - ram_node: None - runas: root - user: rabbit config: context: {} name: /etc/rabbitmq/rabbitmq.conf diff --git a/test/integration/default/files/_mapdata/gentoo-2-sysv.yaml b/test/integration/default/files/_mapdata/gentoo-2-sysv.yaml index 6ca4a475..266e343a 100644 --- a/test/integration/default/files/_mapdata/gentoo-2-sysv.yaml +++ b/test/integration/default/files/_mapdata/gentoo-2-sysv.yaml @@ -17,13 +17,13 @@ values: - x-message-ttl: 8640000 cluster: rabbit@locahost: + user: rabbit # 'node' would make more sense here + host: localhost # short hostname of node to join to, not fqdn + ram_node: None + runas: rabbitmq erlang_cookie: name: /var/lib/rabbitmq/.erlang.cookie value: shared-value-for-all-cluster-members - host: localhost - ram_node: None - runas: root - user: rabbit config: context: {} name: /etc/rabbitmq/rabbitmq.conf diff --git a/test/integration/default/files/_mapdata/opensuse-15.yaml b/test/integration/default/files/_mapdata/opensuse-15.yaml index de9810d1..d5ce9369 100644 --- a/test/integration/default/files/_mapdata/opensuse-15.yaml +++ b/test/integration/default/files/_mapdata/opensuse-15.yaml @@ -17,13 +17,13 @@ values: - x-message-ttl: 8640000 cluster: rabbit@locahost: + user: rabbit # 'node' would make more sense here + host: localhost # short hostname of node to join to, not fqdn + ram_node: None + runas: rabbitmq erlang_cookie: name: /var/lib/rabbitmq/.erlang.cookie value: shared-value-for-all-cluster-members - host: localhost - ram_node: None - runas: root - user: rabbit config: context: {} name: /etc/rabbitmq/rabbitmq.conf diff --git a/test/integration/default/files/_mapdata/opensuse-tumbleweed.yaml b/test/integration/default/files/_mapdata/opensuse-tumbleweed.yaml index 46785592..3572c92e 100644 --- a/test/integration/default/files/_mapdata/opensuse-tumbleweed.yaml +++ b/test/integration/default/files/_mapdata/opensuse-tumbleweed.yaml @@ -17,13 +17,13 @@ values: - x-message-ttl: 8640000 cluster: rabbit@locahost: + user: rabbit # 'node' would make more sense here + host: localhost # short hostname of node to join to, not fqdn + ram_node: None + runas: rabbitmq erlang_cookie: name: /var/lib/rabbitmq/.erlang.cookie value: shared-value-for-all-cluster-members - host: localhost - ram_node: None - runas: root - user: rabbit config: context: {} name: /etc/rabbitmq/rabbitmq.conf diff --git a/test/integration/default/files/_mapdata/oraclelinux-7.yaml b/test/integration/default/files/_mapdata/oraclelinux-7.yaml index c24f37e3..90a72293 100644 --- a/test/integration/default/files/_mapdata/oraclelinux-7.yaml +++ b/test/integration/default/files/_mapdata/oraclelinux-7.yaml @@ -17,13 +17,13 @@ values: - x-message-ttl: 8640000 cluster: rabbit@locahost: + user: rabbit # 'node' would make more sense here + host: localhost # short hostname of node to join to, not fqdn + ram_node: None + runas: rabbitmq erlang_cookie: name: /var/lib/rabbitmq/.erlang.cookie value: shared-value-for-all-cluster-members - host: localhost - ram_node: None - runas: root - user: rabbit config: context: {} name: /etc/rabbitmq.conf diff --git a/test/integration/default/files/_mapdata/oraclelinux-8.yaml b/test/integration/default/files/_mapdata/oraclelinux-8.yaml index dc2fed71..78c05cd8 100644 --- a/test/integration/default/files/_mapdata/oraclelinux-8.yaml +++ b/test/integration/default/files/_mapdata/oraclelinux-8.yaml @@ -17,13 +17,13 @@ values: - x-message-ttl: 8640000 cluster: rabbit@locahost: + user: rabbit # 'node' would make more sense here + host: localhost # short hostname of node to join to, not fqdn + ram_node: None + runas: rabbitmq erlang_cookie: name: /var/lib/rabbitmq/.erlang.cookie value: shared-value-for-all-cluster-members - host: localhost - ram_node: None - runas: root - user: rabbit config: context: {} name: /etc/rabbitmq.conf diff --git a/test/integration/default/files/_mapdata/ubuntu-16.yaml b/test/integration/default/files/_mapdata/ubuntu-16.yaml index 3a7a707c..03639a7b 100644 --- a/test/integration/default/files/_mapdata/ubuntu-16.yaml +++ b/test/integration/default/files/_mapdata/ubuntu-16.yaml @@ -17,13 +17,13 @@ values: - x-message-ttl: 8640000 cluster: rabbit@locahost: + user: rabbit # 'node' would make more sense here + host: localhost # short hostname of node to join to, not fqdn + ram_node: None + runas: rabbitmq erlang_cookie: name: /var/lib/rabbitmq/.erlang.cookie value: shared-value-for-all-cluster-members - host: localhost - ram_node: None - runas: root - user: rabbit config: context: {} name: /etc/rabbitmq/rabbitmq.conf diff --git a/test/integration/default/files/_mapdata/ubuntu-18.yaml b/test/integration/default/files/_mapdata/ubuntu-18.yaml index af294ab7..8241d61d 100644 --- a/test/integration/default/files/_mapdata/ubuntu-18.yaml +++ b/test/integration/default/files/_mapdata/ubuntu-18.yaml @@ -17,13 +17,13 @@ values: - x-message-ttl: 8640000 cluster: rabbit@locahost: + user: rabbit # 'node' would make more sense here + host: localhost # short hostname of node to join to, not fqdn + ram_node: None + runas: rabbitmq erlang_cookie: name: /var/lib/rabbitmq/.erlang.cookie value: shared-value-for-all-cluster-members - host: localhost - ram_node: None - runas: root - user: rabbit config: context: {} name: /etc/rabbitmq/rabbitmq.conf diff --git a/test/integration/default/files/_mapdata/ubuntu-20.yaml b/test/integration/default/files/_mapdata/ubuntu-20.yaml index 27704fe3..43017b55 100644 --- a/test/integration/default/files/_mapdata/ubuntu-20.yaml +++ b/test/integration/default/files/_mapdata/ubuntu-20.yaml @@ -17,13 +17,13 @@ values: - x-message-ttl: 8640000 cluster: rabbit@locahost: + user: rabbit # 'node' would make more sense here + host: localhost # short hostname of node to join to, not fqdn + ram_node: None + runas: rabbitmq erlang_cookie: name: /var/lib/rabbitmq/.erlang.cookie value: shared-value-for-all-cluster-members - host: localhost - ram_node: None - runas: root - user: rabbit config: context: {} name: /etc/rabbitmq/rabbitmq.conf From d4e50b13d813fa11e9a5e7e1bf83a47c0ab44f8d Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Wed, 16 Jun 2021 08:03:51 +0100 Subject: [PATCH 10/10] test(_mapdata): finalise updates to verification files --- .../default/files/_mapdata/amazonlinux-2.yaml | 9 +++++---- .../default/files/_mapdata/arch-base-latest.yaml | 9 +++++---- test/integration/default/files/_mapdata/centos-7.yaml | 9 +++++---- test/integration/default/files/_mapdata/centos-8.yaml | 9 +++++---- test/integration/default/files/_mapdata/debian-10.yaml | 8 ++++---- test/integration/default/files/_mapdata/debian-9.yaml | 8 ++++---- test/integration/default/files/_mapdata/fedora-32.yaml | 8 ++++---- test/integration/default/files/_mapdata/fedora-33.yaml | 8 ++++---- test/integration/default/files/_mapdata/fedora-34.yaml | 8 ++++---- .../default/files/_mapdata/gentoo-2-sysd.yaml | 9 +++++---- .../default/files/_mapdata/gentoo-2-sysv.yaml | 9 +++++---- test/integration/default/files/_mapdata/opensuse-15.yaml | 9 +++++---- .../default/files/_mapdata/opensuse-tumbleweed.yaml | 9 +++++---- .../default/files/_mapdata/oraclelinux-7.yaml | 9 +++++---- .../default/files/_mapdata/oraclelinux-8.yaml | 9 +++++---- test/integration/default/files/_mapdata/ubuntu-16.yaml | 8 ++++---- test/integration/default/files/_mapdata/ubuntu-18.yaml | 8 ++++---- test/integration/default/files/_mapdata/ubuntu-20.yaml | 8 ++++---- 18 files changed, 82 insertions(+), 72 deletions(-) diff --git a/test/integration/default/files/_mapdata/amazonlinux-2.yaml b/test/integration/default/files/_mapdata/amazonlinux-2.yaml index 031677c3..2b8a3b22 100644 --- a/test/integration/default/files/_mapdata/amazonlinux-2.yaml +++ b/test/integration/default/files/_mapdata/amazonlinux-2.yaml @@ -17,13 +17,13 @@ values: - x-message-ttl: 8640000 cluster: rabbit@locahost: - user: rabbit # 'node' would make more sense here - host: localhost # short hostname of node to join to, not fqdn - ram_node: None - runas: rabbitmq erlang_cookie: name: /var/lib/rabbitmq/.erlang.cookie value: shared-value-for-all-cluster-members + host: localhost # short hostname of node to join to, not fqdn + ram_node: None + runas: rabbitmq + user: rabbit # 'node' would make more sense here config: context: {} name: /etc/rabbitmq.conf @@ -62,6 +62,7 @@ values: - C@rabbitmq - Y:G@id pkg: + deps: [] name: rabbitmq-server use_upstream: repo plugin: diff --git a/test/integration/default/files/_mapdata/arch-base-latest.yaml b/test/integration/default/files/_mapdata/arch-base-latest.yaml index 740aef44..32c2a4ee 100644 --- a/test/integration/default/files/_mapdata/arch-base-latest.yaml +++ b/test/integration/default/files/_mapdata/arch-base-latest.yaml @@ -17,13 +17,13 @@ values: - x-message-ttl: 8640000 cluster: rabbit@locahost: - user: rabbit # 'node' would make more sense here - host: localhost # short hostname of node to join to, not fqdn - ram_node: None - runas: rabbitmq erlang_cookie: name: /var/lib/rabbitmq/.erlang.cookie value: shared-value-for-all-cluster-members + host: localhost # short hostname of node to join to, not fqdn + ram_node: None + runas: rabbitmq + user: rabbit # 'node' would make more sense here config: context: {} name: /etc/rabbitmq/rabbitmq.conf @@ -62,6 +62,7 @@ values: - C@rabbitmq - Y:G@id pkg: + deps: [] name: rabbitmq use_upstream: repo plugin: diff --git a/test/integration/default/files/_mapdata/centos-7.yaml b/test/integration/default/files/_mapdata/centos-7.yaml index e99b61c8..32af993a 100644 --- a/test/integration/default/files/_mapdata/centos-7.yaml +++ b/test/integration/default/files/_mapdata/centos-7.yaml @@ -17,13 +17,13 @@ values: - x-message-ttl: 8640000 cluster: rabbit@locahost: - user: rabbit # 'node' would make more sense here - host: localhost # short hostname of node to join to, not fqdn - ram_node: None - runas: rabbitmq erlang_cookie: name: /var/lib/rabbitmq/.erlang.cookie value: shared-value-for-all-cluster-members + host: localhost # short hostname of node to join to, not fqdn + ram_node: None + runas: rabbitmq + user: rabbit # 'node' would make more sense here config: context: {} name: /etc/rabbitmq.conf @@ -62,6 +62,7 @@ values: - C@rabbitmq - Y:G@id pkg: + deps: [] name: rabbitmq-server use_upstream: repo plugin: diff --git a/test/integration/default/files/_mapdata/centos-8.yaml b/test/integration/default/files/_mapdata/centos-8.yaml index 213dae2f..d81b02fb 100644 --- a/test/integration/default/files/_mapdata/centos-8.yaml +++ b/test/integration/default/files/_mapdata/centos-8.yaml @@ -17,13 +17,13 @@ values: - x-message-ttl: 8640000 cluster: rabbit@locahost: - user: rabbit # 'node' would make more sense here - host: localhost # short hostname of node to join to, not fqdn - ram_node: None - runas: rabbitmq erlang_cookie: name: /var/lib/rabbitmq/.erlang.cookie value: shared-value-for-all-cluster-members + host: localhost # short hostname of node to join to, not fqdn + ram_node: None + runas: rabbitmq + user: rabbit # 'node' would make more sense here config: context: {} name: /etc/rabbitmq.conf @@ -62,6 +62,7 @@ values: - C@rabbitmq - Y:G@id pkg: + deps: [] name: rabbitmq-server use_upstream: repo plugin: diff --git a/test/integration/default/files/_mapdata/debian-10.yaml b/test/integration/default/files/_mapdata/debian-10.yaml index 1bdad3e6..596269a5 100644 --- a/test/integration/default/files/_mapdata/debian-10.yaml +++ b/test/integration/default/files/_mapdata/debian-10.yaml @@ -17,13 +17,13 @@ values: - x-message-ttl: 8640000 cluster: rabbit@locahost: - user: rabbit # 'node' would make more sense here - host: localhost # short hostname of node to join to, not fqdn - ram_node: None - runas: rabbitmq erlang_cookie: name: /var/lib/rabbitmq/.erlang.cookie value: shared-value-for-all-cluster-members + host: localhost # short hostname of node to join to, not fqdn + ram_node: None + runas: rabbitmq + user: rabbit # 'node' would make more sense here config: context: {} name: /etc/rabbitmq/rabbitmq.conf diff --git a/test/integration/default/files/_mapdata/debian-9.yaml b/test/integration/default/files/_mapdata/debian-9.yaml index 06a686d7..d6dc4502 100644 --- a/test/integration/default/files/_mapdata/debian-9.yaml +++ b/test/integration/default/files/_mapdata/debian-9.yaml @@ -17,13 +17,13 @@ values: - x-message-ttl: 8640000 cluster: rabbit@locahost: - user: rabbit # 'node' would make more sense here - host: localhost # short hostname of node to join to, not fqdn - ram_node: None - runas: rabbitmq erlang_cookie: name: /var/lib/rabbitmq/.erlang.cookie value: shared-value-for-all-cluster-members + host: localhost # short hostname of node to join to, not fqdn + ram_node: None + runas: rabbitmq + user: rabbit # 'node' would make more sense here config: context: {} name: /etc/rabbitmq/rabbitmq.conf diff --git a/test/integration/default/files/_mapdata/fedora-32.yaml b/test/integration/default/files/_mapdata/fedora-32.yaml index af26ae83..2615061e 100644 --- a/test/integration/default/files/_mapdata/fedora-32.yaml +++ b/test/integration/default/files/_mapdata/fedora-32.yaml @@ -17,13 +17,13 @@ values: - x-message-ttl: 8640000 cluster: rabbit@locahost: - user: rabbit # 'node' would make more sense here - host: localhost # short hostname of node to join to, not fqdn - ram_node: None - runas: rabbitmq erlang_cookie: name: /var/lib/rabbitmq/.erlang.cookie value: shared-value-for-all-cluster-members + host: localhost # short hostname of node to join to, not fqdn + ram_node: None + runas: rabbitmq + user: rabbit # 'node' would make more sense here config: context: {} name: /etc/rabbitmq.conf diff --git a/test/integration/default/files/_mapdata/fedora-33.yaml b/test/integration/default/files/_mapdata/fedora-33.yaml index 2f12e9b6..6905aab7 100644 --- a/test/integration/default/files/_mapdata/fedora-33.yaml +++ b/test/integration/default/files/_mapdata/fedora-33.yaml @@ -17,13 +17,13 @@ values: - x-message-ttl: 8640000 cluster: rabbit@locahost: - user: rabbit # 'node' would make more sense here - host: localhost # short hostname of node to join to, not fqdn - ram_node: None - runas: rabbitmq erlang_cookie: name: /var/lib/rabbitmq/.erlang.cookie value: shared-value-for-all-cluster-members + host: localhost # short hostname of node to join to, not fqdn + ram_node: None + runas: rabbitmq + user: rabbit # 'node' would make more sense here config: context: {} name: /etc/rabbitmq.conf diff --git a/test/integration/default/files/_mapdata/fedora-34.yaml b/test/integration/default/files/_mapdata/fedora-34.yaml index c55e3f16..942b3e19 100644 --- a/test/integration/default/files/_mapdata/fedora-34.yaml +++ b/test/integration/default/files/_mapdata/fedora-34.yaml @@ -17,13 +17,13 @@ values: - x-message-ttl: 8640000 cluster: rabbit@locahost: - user: rabbit # 'node' would make more sense here - host: localhost # short hostname of node to join to, not fqdn - ram_node: None - runas: rabbitmq erlang_cookie: name: /var/lib/rabbitmq/.erlang.cookie value: shared-value-for-all-cluster-members + host: localhost # short hostname of node to join to, not fqdn + ram_node: None + runas: rabbitmq + user: rabbit # 'node' would make more sense here config: context: {} name: /etc/rabbitmq.conf diff --git a/test/integration/default/files/_mapdata/gentoo-2-sysd.yaml b/test/integration/default/files/_mapdata/gentoo-2-sysd.yaml index 266e343a..5953135e 100644 --- a/test/integration/default/files/_mapdata/gentoo-2-sysd.yaml +++ b/test/integration/default/files/_mapdata/gentoo-2-sysd.yaml @@ -17,13 +17,13 @@ values: - x-message-ttl: 8640000 cluster: rabbit@locahost: - user: rabbit # 'node' would make more sense here - host: localhost # short hostname of node to join to, not fqdn - ram_node: None - runas: rabbitmq erlang_cookie: name: /var/lib/rabbitmq/.erlang.cookie value: shared-value-for-all-cluster-members + host: localhost # short hostname of node to join to, not fqdn + ram_node: None + runas: rabbitmq + user: rabbit # 'node' would make more sense here config: context: {} name: /etc/rabbitmq/rabbitmq.conf @@ -62,6 +62,7 @@ values: - C@rabbitmq - Y:G@id pkg: + deps: [] name: net-misc/rabbitmq-server use_upstream: repo plugin: diff --git a/test/integration/default/files/_mapdata/gentoo-2-sysv.yaml b/test/integration/default/files/_mapdata/gentoo-2-sysv.yaml index 266e343a..5953135e 100644 --- a/test/integration/default/files/_mapdata/gentoo-2-sysv.yaml +++ b/test/integration/default/files/_mapdata/gentoo-2-sysv.yaml @@ -17,13 +17,13 @@ values: - x-message-ttl: 8640000 cluster: rabbit@locahost: - user: rabbit # 'node' would make more sense here - host: localhost # short hostname of node to join to, not fqdn - ram_node: None - runas: rabbitmq erlang_cookie: name: /var/lib/rabbitmq/.erlang.cookie value: shared-value-for-all-cluster-members + host: localhost # short hostname of node to join to, not fqdn + ram_node: None + runas: rabbitmq + user: rabbit # 'node' would make more sense here config: context: {} name: /etc/rabbitmq/rabbitmq.conf @@ -62,6 +62,7 @@ values: - C@rabbitmq - Y:G@id pkg: + deps: [] name: net-misc/rabbitmq-server use_upstream: repo plugin: diff --git a/test/integration/default/files/_mapdata/opensuse-15.yaml b/test/integration/default/files/_mapdata/opensuse-15.yaml index d5ce9369..3babf893 100644 --- a/test/integration/default/files/_mapdata/opensuse-15.yaml +++ b/test/integration/default/files/_mapdata/opensuse-15.yaml @@ -17,13 +17,13 @@ values: - x-message-ttl: 8640000 cluster: rabbit@locahost: - user: rabbit # 'node' would make more sense here - host: localhost # short hostname of node to join to, not fqdn - ram_node: None - runas: rabbitmq erlang_cookie: name: /var/lib/rabbitmq/.erlang.cookie value: shared-value-for-all-cluster-members + host: localhost # short hostname of node to join to, not fqdn + ram_node: None + runas: rabbitmq + user: rabbit # 'node' would make more sense here config: context: {} name: /etc/rabbitmq/rabbitmq.conf @@ -62,6 +62,7 @@ values: - C@rabbitmq - Y:G@id pkg: + deps: [] name: rabbitmq-server use_upstream: repo plugin: diff --git a/test/integration/default/files/_mapdata/opensuse-tumbleweed.yaml b/test/integration/default/files/_mapdata/opensuse-tumbleweed.yaml index 3572c92e..377566c7 100644 --- a/test/integration/default/files/_mapdata/opensuse-tumbleweed.yaml +++ b/test/integration/default/files/_mapdata/opensuse-tumbleweed.yaml @@ -17,13 +17,13 @@ values: - x-message-ttl: 8640000 cluster: rabbit@locahost: - user: rabbit # 'node' would make more sense here - host: localhost # short hostname of node to join to, not fqdn - ram_node: None - runas: rabbitmq erlang_cookie: name: /var/lib/rabbitmq/.erlang.cookie value: shared-value-for-all-cluster-members + host: localhost # short hostname of node to join to, not fqdn + ram_node: None + runas: rabbitmq + user: rabbit # 'node' would make more sense here config: context: {} name: /etc/rabbitmq/rabbitmq.conf @@ -62,6 +62,7 @@ values: - C@rabbitmq - Y:G@id pkg: + deps: [] name: rabbitmq-server use_upstream: repo plugin: diff --git a/test/integration/default/files/_mapdata/oraclelinux-7.yaml b/test/integration/default/files/_mapdata/oraclelinux-7.yaml index 90a72293..d852c962 100644 --- a/test/integration/default/files/_mapdata/oraclelinux-7.yaml +++ b/test/integration/default/files/_mapdata/oraclelinux-7.yaml @@ -17,13 +17,13 @@ values: - x-message-ttl: 8640000 cluster: rabbit@locahost: - user: rabbit # 'node' would make more sense here - host: localhost # short hostname of node to join to, not fqdn - ram_node: None - runas: rabbitmq erlang_cookie: name: /var/lib/rabbitmq/.erlang.cookie value: shared-value-for-all-cluster-members + host: localhost # short hostname of node to join to, not fqdn + ram_node: None + runas: rabbitmq + user: rabbit # 'node' would make more sense here config: context: {} name: /etc/rabbitmq.conf @@ -62,6 +62,7 @@ values: - C@rabbitmq - Y:G@id pkg: + deps: [] name: rabbitmq-server use_upstream: repo plugin: diff --git a/test/integration/default/files/_mapdata/oraclelinux-8.yaml b/test/integration/default/files/_mapdata/oraclelinux-8.yaml index 78c05cd8..9c78d0dc 100644 --- a/test/integration/default/files/_mapdata/oraclelinux-8.yaml +++ b/test/integration/default/files/_mapdata/oraclelinux-8.yaml @@ -17,13 +17,13 @@ values: - x-message-ttl: 8640000 cluster: rabbit@locahost: - user: rabbit # 'node' would make more sense here - host: localhost # short hostname of node to join to, not fqdn - ram_node: None - runas: rabbitmq erlang_cookie: name: /var/lib/rabbitmq/.erlang.cookie value: shared-value-for-all-cluster-members + host: localhost # short hostname of node to join to, not fqdn + ram_node: None + runas: rabbitmq + user: rabbit # 'node' would make more sense here config: context: {} name: /etc/rabbitmq.conf @@ -62,6 +62,7 @@ values: - C@rabbitmq - Y:G@id pkg: + deps: [] name: rabbitmq-server use_upstream: repo plugin: diff --git a/test/integration/default/files/_mapdata/ubuntu-16.yaml b/test/integration/default/files/_mapdata/ubuntu-16.yaml index 03639a7b..d843de7f 100644 --- a/test/integration/default/files/_mapdata/ubuntu-16.yaml +++ b/test/integration/default/files/_mapdata/ubuntu-16.yaml @@ -17,13 +17,13 @@ values: - x-message-ttl: 8640000 cluster: rabbit@locahost: - user: rabbit # 'node' would make more sense here - host: localhost # short hostname of node to join to, not fqdn - ram_node: None - runas: rabbitmq erlang_cookie: name: /var/lib/rabbitmq/.erlang.cookie value: shared-value-for-all-cluster-members + host: localhost # short hostname of node to join to, not fqdn + ram_node: None + runas: rabbitmq + user: rabbit # 'node' would make more sense here config: context: {} name: /etc/rabbitmq/rabbitmq.conf diff --git a/test/integration/default/files/_mapdata/ubuntu-18.yaml b/test/integration/default/files/_mapdata/ubuntu-18.yaml index 8241d61d..a4eb65ab 100644 --- a/test/integration/default/files/_mapdata/ubuntu-18.yaml +++ b/test/integration/default/files/_mapdata/ubuntu-18.yaml @@ -17,13 +17,13 @@ values: - x-message-ttl: 8640000 cluster: rabbit@locahost: - user: rabbit # 'node' would make more sense here - host: localhost # short hostname of node to join to, not fqdn - ram_node: None - runas: rabbitmq erlang_cookie: name: /var/lib/rabbitmq/.erlang.cookie value: shared-value-for-all-cluster-members + host: localhost # short hostname of node to join to, not fqdn + ram_node: None + runas: rabbitmq + user: rabbit # 'node' would make more sense here config: context: {} name: /etc/rabbitmq/rabbitmq.conf diff --git a/test/integration/default/files/_mapdata/ubuntu-20.yaml b/test/integration/default/files/_mapdata/ubuntu-20.yaml index 43017b55..ccd7e194 100644 --- a/test/integration/default/files/_mapdata/ubuntu-20.yaml +++ b/test/integration/default/files/_mapdata/ubuntu-20.yaml @@ -17,13 +17,13 @@ values: - x-message-ttl: 8640000 cluster: rabbit@locahost: - user: rabbit # 'node' would make more sense here - host: localhost # short hostname of node to join to, not fqdn - ram_node: None - runas: rabbitmq erlang_cookie: name: /var/lib/rabbitmq/.erlang.cookie value: shared-value-for-all-cluster-members + host: localhost # short hostname of node to join to, not fqdn + ram_node: None + runas: rabbitmq + user: rabbit # 'node' would make more sense here config: context: {} name: /etc/rabbitmq/rabbitmq.conf