kolla-ansible/ansible/roles/rabbitmq/tasks/bootstrap.yml
Ha Manh Dong 30be04ea91 Specify 'become' for all tasks that use kolla_docker module
Add become to all tasks that use the module "kolla_docker"

Change-Id: I4309c4011687b88ec31d739fd8f834fe2326ff10
Partial-Implements: blueprint ansible-specific-task-become
2018-06-08 12:39:24 +00:00

27 lines
727 B
YAML

---
- name: Creating rabbitmq volume
become: true
kolla_docker:
action: "create_volume"
common_options: "{{ docker_common_options }}"
name: "{{ project_name }}"
register: rabbitmq_volume
- name: Running RabbitMQ bootstrap container
vars:
service_name: "rabbitmq"
service: "{{ rabbitmq_services[service_name] }}"
become: true
kolla_docker:
action: "start_container"
common_options: "{{ docker_common_options }}"
detach: False
environment: "{{ service.bootstrap_environment }}"
image: "{{ service.image }}"
labels:
BOOTSTRAP:
name: "{{ project_name }}_bootstrap"
restart_policy: "never"
volumes: "{{ service.volumes }}"
when: rabbitmq_volume | changed