]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
switch_to_containers: support multiple rgw instances per host
authorGuillaume Abrioux <gabrioux@redhat.com>
Tue, 12 Feb 2019 13:03:39 +0000 (14:03 +0100)
committerSébastien Han <seb@redhat.com>
Wed, 13 Feb 2019 08:42:27 +0000 (09:42 +0100)
add multiple rgw instances per host in switch_to_containers playbook.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
infrastructure-playbooks/switch-from-non-containerized-to-containerized-ceph-daemons.yml

index ff3fcd6d38efa66328c40e2dd7c87f373abee365..a2dd9c9891fc3d97d3e25f0c60b2652c9f7bab13 100644 (file)
   serial: 1
   become: true
   pre_tasks:
-
-    - name: stop non-containerized ceph rgw(s)
-      service:
-        name: "ceph-radosgw@rgw.{{ ansible_hostname }}"
-        state: stopped
-        enabled: no
-
-    - name: remove old systemd unit file
-      file:
-        path: /usr/lib/systemd/system/ceph-radosgw@.service
-        state: absent
-
     - set_fact:
         ceph_uid: 64045
       when: ceph_docker_image_tag | string is match("latest") or ceph_docker_image_tag | string is search("ubuntu")
     - import_role:
         name: ceph-facts
 
+    - name: stop non-containerized ceph rgw(s)
+      service:
+        name: "ceph-radosgw@rgw.{{ ansible_hostname }}.{{ item.instance_name }}"
+        state: stopped
+        enabled: no
+      with_items: "{{ rgw_instances }}"
+
+    - name: remove old systemd unit file
+      file:
+        path: /usr/lib/systemd/system/ceph-radosgw@.service
+        state: absent
+
     - import_role:
         name: ceph-handler