Skip to content

Commit

Permalink
fix(user): ensure user.present fully works
Browse files Browse the repository at this point in the history
  • Loading branch information
noelmcloughlin committed Jun 6, 2021
1 parent 866a6c1 commit 4108523
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 19 deletions.
32 changes: 14 additions & 18 deletions pillar.example
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -30,40 +30,40 @@ 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
- 'x-dead-letter-exchange': 'my-new-exchange'

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'
Expand All @@ -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
Expand All @@ -108,17 +108,13 @@ rabbitmq:
- '.*'
- '.*'
- runas: root
airflow:
- password: airflow
- force: true
saltstack:
- password: password
- force: false
- tags:
- administrator
- perms:
- airflow:
- '.*'
- '.*'
- '.*'
- '/':
- test_vhost:
- '.*'
- '.*'
- '.*'
Expand Down
4 changes: 3 additions & 1 deletion rabbitmq/config/user/install.sls
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
1 change: 1 addition & 0 deletions rabbitmq/parameters/defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4108523

Please sign in to comment.