Merge "Check and set cookie without using a failed task"
This commit is contained in:
commit
555015e3ca
@ -58,6 +58,7 @@
|
|||||||
- include: rabbitmq_set_cookie.yml
|
- include: rabbitmq_set_cookie.yml
|
||||||
tags:
|
tags:
|
||||||
- rabbitmq_server-config
|
- rabbitmq_server-config
|
||||||
|
- rabbitmq-config
|
||||||
|
|
||||||
- include: rabbitmq_post_install.yml
|
- include: rabbitmq_post_install.yml
|
||||||
tags:
|
tags:
|
||||||
|
@ -13,21 +13,6 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
- block:
|
|
||||||
- name: Read rabbit cookie
|
|
||||||
slurp:
|
|
||||||
src: /var/lib/rabbitmq/.erlang.cookie
|
|
||||||
register: tmp_rabbit_cookie
|
|
||||||
failed_when: (tmp_rabbit_cookie.content | b64decode).find(rabbitmq_cookie_token) == -1
|
|
||||||
tags:
|
|
||||||
- rabbitmq-config
|
|
||||||
|
|
||||||
rescue:
|
|
||||||
- include: rabbitmq_stopped.yml
|
|
||||||
static: no
|
|
||||||
tags:
|
|
||||||
- rabbitmq-config
|
|
||||||
|
|
||||||
- name: Set rabbit cookie
|
- name: Set rabbit cookie
|
||||||
copy:
|
copy:
|
||||||
content: "{{ rabbitmq_cookie_token }}"
|
content: "{{ rabbitmq_cookie_token }}"
|
||||||
@ -36,10 +21,14 @@
|
|||||||
owner: rabbitmq
|
owner: rabbitmq
|
||||||
group: rabbitmq
|
group: rabbitmq
|
||||||
register: cookie_set
|
register: cookie_set
|
||||||
tags:
|
|
||||||
- rabbitmq-config
|
- include: rabbitmq_stopped.yml
|
||||||
|
static: no
|
||||||
|
when:
|
||||||
|
- cookie_set | changed
|
||||||
|
|
||||||
- include: rabbitmq_started.yml
|
- include: rabbitmq_started.yml
|
||||||
static: no
|
static: no
|
||||||
tags:
|
when:
|
||||||
- rabbitmq-config
|
- cookie_set | changed
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user