kolla-ansible/ansible/roles/swift/tasks/stop.yml
Mark Goddard b123bf6621 Use become for all docker tasks
Many tasks that use Docker have become specified already, but
not all. This change ensures all tasks that use the following
modules have become:

* kolla_docker
* kolla_ceph_keyring
* kolla_toolbox
* kolla_container_facts

It also adds become for 'command' tasks that use docker CLI.

Change-Id: I4a5ebcedaccb9261dbc958ec67e8077d7980e496
2019-06-06 19:04:58 +01:00

152 lines
4.8 KiB
YAML

---
- name: Stopping swift-rsyncd container
become: true
kolla_docker:
action: "stop_container"
common_options: "{{ docker_common_options }}"
name: "swift_rsyncd"
when: ( inventory_hostname in groups['swift-account-server'] or
inventory_hostname in groups['swift-container-server'] or
inventory_hostname in groups['swift-object-server'] ) and
'swift_rsyncd' not in skip_stop_containers
- name: Stopping swift-account-server container
become: true
kolla_docker:
action: "stop_container"
common_options: "{{ docker_common_options }}"
name: "swift_account_server"
when:
- inventory_hostname in groups['swift-account-server']
- "'swift_account_server' not in skip_stop_containers"
- name: Stopping swift-account-auditor container
become: true
kolla_docker:
action: "stop_container"
common_options: "{{ docker_common_options }}"
name: "swift_account_auditor"
when:
- inventory_hostname in groups['swift-account-server']
- "'swift_object_auditor' not in skip_stop_containers"
- name: Stopping swift-account-replicator container
become: true
kolla_docker:
action: "stop_container"
common_options: "{{ docker_common_options }}"
name: "swift_account_replicator"
when:
- inventory_hostname in groups['swift-account-server']
- "'swift_account_replicator' not in skip_stop_containers"
- name: Stopping swift-account-reaper container
become: true
kolla_docker:
action: "stop_container"
common_options: "{{ docker_common_options }}"
name: "swift_account_reaper"
when:
- inventory_hostname in groups['swift-account-server']
- "'swift_account_reaper' not in skip_stop_containers"
- name: Stopping swift-container-server container
become: true
kolla_docker:
action: "stop_container"
common_options: "{{ docker_common_options }}"
name: "swift_container_server"
when:
- inventory_hostname in groups['swift-container-server']
- "'swift_container_server' not in skip_stop_containers"
- name: Stopping swift-container-auditor container
become: true
kolla_docker:
action: "stop_container"
common_options: "{{ docker_common_options }}"
name: "swift_container_auditor"
when:
- inventory_hostname in groups['swift-container-server']
- "'swift_container_auditor' not in skip_stop_containers"
- name: Stopping swift-container-replicator container
become: true
kolla_docker:
action: "stop_container"
common_options: "{{ docker_common_options }}"
name: "swift_container_replicator"
when:
- inventory_hostname in groups['swift-container-server']
- "'swift_container_replicator' not in skip_stop_containers"
- name: Stopping swift-container-updater container
become: true
kolla_docker:
action: "stop_container"
common_options: "{{ docker_common_options }}"
name: "swift_container_updater"
when:
- inventory_hostname in groups['swift-container-server']
- "'swift_container_updater' not in skip_stop_containers"
- name: Stopping swift-object-server container
become: true
kolla_docker:
action: "stop_container"
common_options: "{{ docker_common_options }}"
name: "swift_object_server"
when:
- inventory_hostname in groups['swift-object-server']
- "'swift_object_server' not in skip_stop_containers"
- name: Stopping swift-object-auditor container
become: true
kolla_docker:
action: "stop_container"
common_options: "{{ docker_common_options }}"
name: "swift_object_auditor"
when:
- inventory_hostname in groups['swift-object-server']
- "'swift_object_auditor' not in skip_stop_containers"
- name: Stopping swift-object-replicator container
become: true
kolla_docker:
action: "stop_container"
common_options: "{{ docker_common_options }}"
name: "swift_object_replicator"
when:
- inventory_hostname in groups['swift-object-server']
- "'swift_object_replicator' not in skip_stop_containers"
- name: Stopping swift-object-updater container
become: true
kolla_docker:
action: "start_container"
common_options: "{{ docker_common_options }}"
name: "swift_object_updater"
when:
- inventory_hostname in groups['swift-object-server']
- "'swift_object_updater' not in skip_stop_containers"
- name: Stopping swift-object-expirer container
become: true
kolla_docker:
action: "stop_container"
common_options: "{{ docker_common_options }}"
name: "swift_object_expirer"
when:
- inventory_hostname in groups['swift-object-server']
- "'swift_object_expirer' not in skip_stop_containers"
- name: Stopping swift-proxy-server container
become: true
kolla_docker:
action: "stop_container"
common_options: "{{ docker_common_options }}"
name: "swift_proxy_server"
when:
- inventory_hostname in groups['swift-proxy-server']
- "'swift_proxy_server' not in skip_stop_containers"