kolla-ansible/ansible/roles/rabbitmq/tasks/bootstrap.yml
SamYaple 64a767db4d Convert rabbitmq to named volume
Change-Id: I81413ffcaa4efb881d13fef62823d60b676e871d
Implements: blueprint docker-named-volumes
2016-01-29 20:39:55 +00:00

27 lines
793 B
YAML

---
- name: Creating rabbitmq volume
kolla_docker:
action: "create_volume"
common_options: "{{ docker_common_options }}"
name: "rabbitmq"
register: rabbitmq_volume
- name: Running RabbitMQ bootstrap container
kolla_docker:
action: "start_container"
common_options: "{{ docker_common_options }}"
detach: False
environment:
KOLLA_BOOTSTRAP:
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
RABBITMQ_CLUSTER_COOKIE: "{{ rabbitmq_cluster_cookie }}"
image: "{{ rabbitmq_image_full }}"
labels:
BOOTSTRAP:
name: "rabbitmq_bootstrap"
restart_policy: "never"
volumes:
- "{{ node_config_directory }}/rabbitmq/:{{ container_config_directory }}/:ro"
- "rabbitmq:/var/lib/rabbitmq/"
when: rabbitmq_volume | changed