Sam Yaple 0382909dbb Rename role name to service name
The original purpose for having an abstract like 'database' rather than
the service name of 'mariadb' has been change. Our direction is different
and this patch reflects consistent naming throughout

Change-Id: I704896191cc5243f9dab2a4cca9120e9dc2ceb2c
Closes-Bug: #1478328
2015-07-30 19:35:17 +00:00

39 lines
1.1 KiB
YAML

---
# TODO(SamYaple): Improve check with a custom docker module to check if alive
- name: Checking if a rabbitmq_data exists
command: docker inspect rabbitmq_data
register: exists
changed_when: False
failed_when: False
always_run: True
- include: ../../start.yml
vars:
container_command: "/bin/sleep infinity"
container_image: "{{ docker_message_broker_image_full }}"
container_name: "rabbitmq_data"
container_volumes:
- "/var/lib/rabbitmq/"
- include: ../../start.yml
vars:
container_detach: "False"
container_environment:
KOLLA_BOOTSTRAP:
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
RABBITMQ_CLUSTER_COOKIE: "{{ rabbitmq_cluster_cookie }}"
container_image: "{{ docker_message_broker_image_full }}"
container_name: "rabbitmq_bootstrap"
container_restart_policy: "no"
container_volumes:
- "{{ node_config_directory }}/rabbitmq/:/opt/kolla/rabbitmq/:ro"
container_volumes_from:
- "rabbitmq_data"
when: exists.rc != 0
- name: Cleaning up boostrap container
docker:
image: "{{ docker_message_broker_image_full }}"
name: "rabbitmq_bootstrap"
state: "absent"