Skip to content

Commit

Permalink
fix(requisites): match state name and ci
Browse files Browse the repository at this point in the history
  • Loading branch information
noelmcloughlin committed Jun 15, 2021
1 parent ec02702 commit af42400
Show file tree
Hide file tree
Showing 24 changed files with 275 additions and 198 deletions.
13 changes: 6 additions & 7 deletions pillar.example
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion rabbitmq/config/policy/install.sls
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ rabbitmq-config-policy-present-{{ name }}:
- {{ value | json }}
{% endfor %}
- require:
- service: {{ rabbitmq.service.name }}
- service: rabbitmq-service-running-service-running
{% endfor %}
4 changes: 2 additions & 2 deletions rabbitmq/config/queue/clean.sls
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}
6 changes: 2 additions & 4 deletions rabbitmq/config/queue/install.sls
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}
2 changes: 1 addition & 1 deletion rabbitmq/config/upstream/install.sls
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ rabbitmq-config-upstream-present-{{ name }}:
- {{ value | json }}
{% endfor %}
- require:
- service: {{ rabbitmq.service.name }}
- service: rabbitmq-service-running-service-running
{% endfor %}
13 changes: 10 additions & 3 deletions rabbitmq/parameters/defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
24 changes: 14 additions & 10 deletions test/integration/default/files/_mapdata/amazonlinux-2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down Expand Up @@ -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
Expand Down
24 changes: 14 additions & 10 deletions test/integration/default/files/_mapdata/arch-base-latest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down Expand Up @@ -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
Expand Down
25 changes: 15 additions & 10 deletions test/integration/default/files/_mapdata/centos-7.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down Expand Up @@ -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
Expand Down
24 changes: 14 additions & 10 deletions test/integration/default/files/_mapdata/centos-8.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down Expand Up @@ -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
Expand Down
24 changes: 14 additions & 10 deletions test/integration/default/files/_mapdata/debian-10.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down Expand Up @@ -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
Expand Down
24 changes: 14 additions & 10 deletions test/integration/default/files/_mapdata/debian-9.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down Expand Up @@ -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
Expand Down
Loading

0 comments on commit af42400

Please sign in to comment.