]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
switch2container: remove deb systemd units
authorDimitri Savineau <dsavinea@redhat.com>
Tue, 15 Sep 2020 13:46:30 +0000 (09:46 -0400)
committerDimitri Savineau <savineau.dimitri@gmail.com>
Tue, 15 Sep 2020 19:30:21 +0000 (15:30 -0400)
When running the switch2container playbook on a Debian based system
then the systemd unit path isn't the same than Red Hat based system.
Because the systemd unit files aren't removed then the new container
systemd unit isn't take in count.

Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
(cherry picked from commit c1af69a7e79a5909903490028f7ae13e519c98e0)

infrastructure-playbooks/switch-from-non-containerized-to-containerized-ceph-daemons.yml

index 77c4a129aeae537fa4f24c14f99a8eee35105a33..0fc270213eca2013f33915bbd2a3042dbc882dea 100644 (file)
 
     - name: remove old systemd unit files
       file:
-        path: /usr/lib/systemd/system/{{ item }}
+        path: "{{ item }}"
         state: absent
       with_items:
-        - ceph-mon@.service
-        - ceph-mon.target
+        - /usr/lib/systemd/system/ceph-mon@.service
+        - /usr/lib/systemd/system/ceph-mon.target
+        - /lib/systemd/system/ceph-mon@.service
+        - /lib/systemd/system/ceph-mon.target
 
     - import_role:
         name: ceph-defaults
 
     - name: remove old systemd unit files
       file:
-        path: /usr/lib/systemd/system/{{ item }}
+        path: "{{ item }}"
         state: absent
       with_items:
-        - ceph-mgr@.service
-        - ceph-mgr.target
+        - /usr/lib/systemd/system/ceph-mgr@.service
+        - /usr/lib/systemd/system/ceph-mgr.target
+        - /lib/systemd/system/ceph-mgr@.service
+        - /lib/systemd/system/ceph-mgr.target
 
     - import_role:
         name: ceph-defaults
         - /usr/lib/systemd/system/ceph-osd.target
         - /usr/lib/systemd/system/ceph-osd@.service
         - /usr/lib/systemd/system/ceph-volume@.service
+        - /lib/systemd/system/ceph-osd.target
+        - /lib/systemd/system/ceph-osd@.service
+        - /lib/systemd/system/ceph-volume@.service
 
     - import_role:
         name: ceph-facts
 
     - name: remove old systemd unit files
       file:
-        path: /usr/lib/systemd/system/{{ item }}
+        path: "{{ item }}"
         state: absent
       with_items:
-        - ceph-mds@.service
-        - ceph-mds.target
+        - /usr/lib/systemd/system/ceph-mds@.service
+        - /usr/lib/systemd/system/ceph-mds.target
+        - /lib/systemd/system/ceph-mds@.service
+        - /lib/systemd/system/ceph-mds.target
 
     - import_role:
         name: ceph-defaults
 
     - name: remove old systemd unit files
       file:
-        path: /usr/lib/systemd/system/{{ item }}
+        path: "{{ item }}"
         state: absent
       with_items:
-        - ceph-radosgw@.service
-        - ceph-radosgw.target
+        - /usr/lib/systemd/system/ceph-radosgw@.service
+        - /usr/lib/systemd/system/ceph-radosgw.target
+        - /lib/systemd/system/ceph-radosgw@.service
+        - /lib/systemd/system/ceph-radosgw.target
 
     - import_role:
         name: ceph-handler
 
     - name: remove old systemd unit files
       file:
-        path: /usr/lib/systemd/system/{{ item }}
+        path: "{{ item }}"
         state: absent
       with_items:
-        - ceph-rbd-mirror@.service
-        - ceph-rbd-mirror.target
+        - /usr/lib/systemd/system/ceph-rbd-mirror@.service
+        - /usr/lib/systemd/system/ceph-rbd-mirror.target
+        - /lib/systemd/system/ceph-rbd-mirror@.service
+        - /lib/systemd/system/ceph-rbd-mirror.target
 
     - import_role:
         name: ceph-defaults