File tree Expand file tree Collapse file tree 6 files changed +21
-18
lines changed
Expand file tree Collapse file tree 6 files changed +21
-18
lines changed Original file line number Diff line number Diff line change 22# vim: ft=sls
33
44include:
5- - .users.clean
6- - .vhosts.clean
7- - .exchanges.clean
5+ - .parameters.clean
6+ - .policies.clean
87 - .bindings.clean
8+ - .exchanges.clean
99 - .queues.clean
10- - .policies.clean
11- - .plugins.clean
12- - .parameters.clean
10+ - .vhosts.clean
1311 - .clusters.clean
12+ - .users.clean
13+ - .plugins.clean
1414 - .files.clean
Original file line number Diff line number Diff line change 55{%- from tplroot ~ " /map.jinja" import mapdata as rabbitmq with context % }
66
77 {%- for name, node in rabbitmq.nodes.items() % }
8- {%- if ' clustered' in node and node.clustered and ' join_node ' in node % }
8+ {%- if ' clustered' in node and node.clustered % }
99
10- rabbitmq- config- clusters- {{ name }}- leave - {{ node.join_node }} :
10+ rabbitmq- config- clusters- {{ name }}- reset :
1111 cmd.run:
1212 - names:
1313 - / usr/ sbin/ rabbitmqctl -- node {{ name }} stop_app || true
Original file line number Diff line number Diff line change 33
44include:
55 - .files
6- - .clusters
7- - .users
86 - .vhosts
7+ - .users
98 - .queues
109 - .policies
1110 - .plugins
1211 - .exchanges
1312 - .bindings
1413 - .parameters
14+ - .clusters
Original file line number Diff line number Diff line change @@ -21,7 +21,9 @@ rabbitmq-config-queues-delete-{{ name }}-{{ queue }}:
2121 - name: / usr/ local/ sbin/ rabbitmqadmin -- node {{ name }} -- port= {{ node.nodeport + 10000 }} delete queue -- vhost= {{ q.vhost }} -- username= {{ q.user }} -- password= {{ q.passwd }} name= {{ queue }} || true # noqa 204
2222 - onlyif:
2323 - test - x / usr/ local/ sbin/ rabbitmqadmin
24+ - test - x / usr/ sbin/ rabbitmqctl
2425 - test - d {{ rabbitmq.dir.data }}
26+ - / usr/ sbin/ rabbitmqctl -- node {{ name }} -- vhost= {{ q.vhost }} list_queues | grep ^ {{ queue }}\s*
2527 - runas: rabbitmq
2628 - require_in:
2729 - sls: {{ sls_config_plugins_clean }}
Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ rabbitmq-config-queues-enabled-{{ name }}-{{ queue }}:
2626 - sls: {{ sls_config_plugins }}
2727 - sls: {{ sls_config_users }}
2828 - sls: {{ sls_config_vhosts }}
29+ - unless: / usr/ sbin/ rabbitmqctl -- node {{ name }} -- vhost= {{ q.vhost }} list_queues | grep ^ {{ queue }}\s*
2930
3031 {%- endfor % }
3132 {%- endif % }
Original file line number Diff line number Diff line change @@ -19,17 +19,17 @@ rabbitmq-config-users-added-{{ name }}-{{ user }}:
1919 cmd.run:
2020 - names:
2121 - {{ cmd }} -- node {{ name }} add_user {{ user }} {{ u.password }} || true
22- {%- if ' force' in u and u.force % }
22+ {%- if ' force' in u and u.force % }
2323 - {{ cmd }} -- node {{ name }} change_password {{ user }} {{ u.password }}
24- {%- endif % }
25- {%- if ' tags' in u and u.tags % }
24+ {%- endif % }
25+ {%- if ' tags' in u and u.tags % }
2626 - {{ cmd }} -- node {{ name }} set_user_tags {{ user }} {{ u.tags| join(' ' ) }} # noqa 204
27- {%- endif % }
28- {%- if ' perms' in u and u.perms % }
29- {%- for vhost, perms in u.perms.items() % }
27+ {%- endif % }
28+ {%- if ' perms' in u and u.perms % }
29+ {%- for vhost, perms in u.perms.items() % }
3030 - {{ cmd }} -- node {{ name }} set_permissions - p {{ vhost }} {{ user }} {{ perms| map (" json" )| join(" " ) }} # noqa 204
31- {%- endfor % }
32- {%- endif % }
31+ {%- endfor % }
32+ {%- endif % }
3333 - onlyif: test - x {{ cmd }}
3434 - runas: rabbitmq
3535 - require:
You can’t perform that action at this time.
0 commit comments