From d0746e08586556b7d44ba4b20cd553a27860f30b Mon Sep 17 00:00:00 2001 From: Guillaume Abrioux Date: Mon, 9 Jul 2018 15:50:52 +0200 Subject: [PATCH] common: switch from docker module to docker_container As of ansible 2.4, `docker` module has been removed (was deprecated since ansible 2.1). We must switch to `docker_container` instead. See: https://docs.ansible.com/ansible/latest/modules/docker_module.html#docker-module Signed-off-by: Guillaume Abrioux --- .../purge-docker-cluster.yml | 16 ++++++++-------- .../tasks/docker/start_docker_monitor.yml | 10 +++++----- .../tasks/docker/start_docker_restapi.yml | 4 ++-- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/infrastructure-playbooks/purge-docker-cluster.yml b/infrastructure-playbooks/purge-docker-cluster.yml index a49a355cf..6e4057986 100644 --- a/infrastructure-playbooks/purge-docker-cluster.yml +++ b/infrastructure-playbooks/purge-docker-cluster.yml @@ -51,7 +51,7 @@ ignore_errors: true - name: remove ceph mds container - docker: + docker_container: image: "{{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}" name: "ceph-mds-{{ ansible_hostname }}" state: absent @@ -88,7 +88,7 @@ ignore_errors: true - name: remove ceph mgr container - docker: + docker_container: image: "{{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}" name: "ceph-mgr-{{ ansible_hostname }}" state: absent @@ -135,7 +135,7 @@ ignore_errors: true - name: remove ceph rgw container - docker: + docker_container: image: "{{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}" name: "ceph-rgw-{{ ansible_hostname }}" state: absent @@ -179,7 +179,7 @@ ignore_errors: true - name: remove ceph rbd-mirror container - docker: + docker_container: image: "{{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}" name: "ceph-rbd-mirror-{{ ansible_hostname }}" state: absent @@ -218,7 +218,7 @@ ignore_errors: true - name: remove ceph nfs container - docker: + docker_container: image: "{{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}" name: "ceph-nfs-{{ ansible_hostname }}" state: absent @@ -371,7 +371,7 @@ delay: 10 - name: remove ceph osd zap disk container - docker: + docker_container: image: "{{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}" name: "ceph-osd-zap-{{ ansible_hostname }}-{{ item }}" state: absent @@ -433,14 +433,14 @@ ignore_errors: true - name: remove ceph mon container - docker: + docker_container: image: "{{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}" name: "ceph-mon-{{ ansible_hostname }}" state: absent ignore_errors: true - name: remove restapi container - docker: + docker_container: image: "{{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}" name: "ceph-restapi-{{ ansible_hostname }}" state: absent diff --git a/roles/ceph-mon/tasks/docker/start_docker_monitor.yml b/roles/ceph-mon/tasks/docker/start_docker_monitor.yml index 8df4826d2..409a5020f 100644 --- a/roles/ceph-mon/tasks/docker/start_docker_monitor.yml +++ b/roles/ceph-mon/tasks/docker/start_docker_monitor.yml @@ -1,10 +1,10 @@ --- - name: populate kv_store with default ceph.conf - docker: + docker_container: name: populate-kv-store image: "{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}" command: populate_kvstore - net: host + network: host env: KV_TYPE: "{{kv_type}}" KV_IP: "{{kv_endpoint}}" @@ -16,11 +16,11 @@ - mon_containerized_default_ceph_conf_with_kv - name: populate kv_store with custom ceph.conf - docker: + docker_container: name: populate-kv-store image: "{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}" command: populate_kvstore - net: host + network: host env: KV_TYPE: "{{kv_type}}" KV_IP: "{{kv_endpoint}}" @@ -34,7 +34,7 @@ - not mon_containerized_default_ceph_conf_with_kv - name: delete populate-kv-store docker - docker: + docker_container: name: populate-kv-store state: absent image: "{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}" diff --git a/roles/ceph-restapi/tasks/docker/start_docker_restapi.yml b/roles/ceph-restapi/tasks/docker/start_docker_restapi.yml index 9c4b261e9..470ff51f7 100644 --- a/roles/ceph-restapi/tasks/docker/start_docker_restapi.yml +++ b/roles/ceph-restapi/tasks/docker/start_docker_restapi.yml @@ -1,9 +1,9 @@ --- - name: run the ceph rest api docker image - docker: + docker_container: image: "{{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}" name: "ceph-restapi-{{ ansible_hostname }}" - net: host + network: host expose: "{{ ceph_restapi_port }}" state: running env: "RESTAPI_IP={{ hostvars[inventory_hostname]['ansible_' + ceph_restapi_docker_interface]['ipv4']['address'] }},CEPH_DAEMON=RESTAPI,{{ ceph_restapi_docker_extra_env }}"