]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
rbdmirror: refact tasks directory layout
authorGuillaume Abrioux <gabrioux@redhat.com>
Mon, 30 Sep 2019 07:36:00 +0000 (09:36 +0200)
committerDimitri Savineau <savineau.dimitri@gmail.com>
Tue, 1 Oct 2019 14:27:51 +0000 (10:27 -0400)
This commit moves containerized deployment related files to `./tasks/`
directory. This is needed to make `docker-to-podman.yml` working since
we use `tasks_from:` option.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
infrastructure-playbooks/docker-to-podman.yml
roles/ceph-rbd-mirror/tasks/container/main.yml [deleted file]
roles/ceph-rbd-mirror/tasks/container/start_docker_rbd_mirror.yml [deleted file]
roles/ceph-rbd-mirror/tasks/container/systemd.yml [deleted file]
roles/ceph-rbd-mirror/tasks/main.yml
roles/ceph-rbd-mirror/tasks/start_docker_rbd_mirror.yml [new file with mode: 0644]
roles/ceph-rbd-mirror/tasks/systemd.yml [new file with mode: 0644]

index f8f83cdf000466c35ab7b0125f7877002543788e..7908bb96049295fa19411858dfd5d6cffa2d99ee 100644 (file)
 
     - import_role:
         name: ceph-rbd-mirror
-        tasks_from: container/systemd.yml
+        tasks_from: systemd.yml
       when: inventory_hostname in groups.get(rbdmirror_group_name, [])
 
     - import_role:
         name: ceph-rgw
         tasks_from: container/systemd.yml
-      when: inventory_hostname in groups.get(rgw_group_name, [])
\ No newline at end of file
+      when: inventory_hostname in groups.get(rgw_group_name, [])
diff --git a/roles/ceph-rbd-mirror/tasks/container/main.yml b/roles/ceph-rbd-mirror/tasks/container/main.yml
deleted file mode 100644 (file)
index 8c2e8a8..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
----
-- name: include start_docker_rbd_mirror.yml
-  include_tasks: start_docker_rbd_mirror.yml
diff --git a/roles/ceph-rbd-mirror/tasks/container/start_docker_rbd_mirror.yml b/roles/ceph-rbd-mirror/tasks/container/start_docker_rbd_mirror.yml
deleted file mode 100644 (file)
index cebeccf..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
----
-# Use systemd to manage container on Atomic host
-- name: include_tasks systemd.yml
-  include_tasks: systemd.yml
-
-- name: systemd start rbd mirror container
-  systemd:
-    name: ceph-rbd-mirror@rbd-mirror.{{ ansible_hostname }}
-    state: started
-    enabled: yes
-    masked: no
-    daemon_reload: yes
diff --git a/roles/ceph-rbd-mirror/tasks/container/systemd.yml b/roles/ceph-rbd-mirror/tasks/container/systemd.yml
deleted file mode 100644 (file)
index 723c467..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
----
-- name: generate systemd unit file
-  become: true
-  template:
-    src: "{{ role_path }}/templates/ceph-rbd-mirror.service.j2"
-    dest: /etc/systemd/system/ceph-rbd-mirror@.service
-    owner: "root"
-    group: "root"
-    mode: "0644"
-  notify: restart ceph rbdmirrors
index c7764cd8d5ae7ed843a36487d81e44978ee2c907..6388567c251c6cba414bebdcba3b284c561d8e59 100644 (file)
@@ -18,8 +18,8 @@
       set_fact:
         container_exec_cmd: "{{ container_binary }} exec ceph-rbd-mirror-{{ ansible_hostname }}"
 
-    - name: include container/main.yml
-      include_tasks: container/main.yml
+    - name: include start_docker_rbd_mirror.yml
+      include_tasks: start_docker_rbd_mirror.yml
 
 - name: include configure_mirroring.yml
   include_tasks: configure_mirroring.yml
diff --git a/roles/ceph-rbd-mirror/tasks/start_docker_rbd_mirror.yml b/roles/ceph-rbd-mirror/tasks/start_docker_rbd_mirror.yml
new file mode 100644 (file)
index 0000000..cebeccf
--- /dev/null
@@ -0,0 +1,12 @@
+---
+# Use systemd to manage container on Atomic host
+- name: include_tasks systemd.yml
+  include_tasks: systemd.yml
+
+- name: systemd start rbd mirror container
+  systemd:
+    name: ceph-rbd-mirror@rbd-mirror.{{ ansible_hostname }}
+    state: started
+    enabled: yes
+    masked: no
+    daemon_reload: yes
diff --git a/roles/ceph-rbd-mirror/tasks/systemd.yml b/roles/ceph-rbd-mirror/tasks/systemd.yml
new file mode 100644 (file)
index 0000000..723c467
--- /dev/null
@@ -0,0 +1,10 @@
+---
+- name: generate systemd unit file
+  become: true
+  template:
+    src: "{{ role_path }}/templates/ceph-rbd-mirror.service.j2"
+    dest: /etc/systemd/system/ceph-rbd-mirror@.service
+    owner: "root"
+    group: "root"
+    mode: "0644"
+  notify: restart ceph rbdmirrors