]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
iscsigw: refact tasks directory layout
authorGuillaume Abrioux <gabrioux@redhat.com>
Mon, 30 Sep 2019 07:21:41 +0000 (09:21 +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-iscsi-gw/tasks/container/containerized.yml [deleted file]
roles/ceph-iscsi-gw/tasks/container/systemd.yml [deleted file]
roles/ceph-iscsi-gw/tasks/containerized.yml [new file with mode: 0644]
roles/ceph-iscsi-gw/tasks/main.yml
roles/ceph-iscsi-gw/tasks/systemd.yml [new file with mode: 0644]

index 70d890d817dc127dc86d42a27e0b56c2e18e402d..f8f83cdf000466c35ab7b0125f7877002543788e 100644 (file)
@@ -75,7 +75,7 @@
 
     - import_role:
         name: ceph-iscsi-gw
-        tasks_from: container/systemd.yml
+        tasks_from: systemd.yml
       when: inventory_hostname in groups.get(iscsi_gw_group_name, [])
 
     - import_role:
diff --git a/roles/ceph-iscsi-gw/tasks/container/containerized.yml b/roles/ceph-iscsi-gw/tasks/container/containerized.yml
deleted file mode 100644 (file)
index b5dc4e9..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
----
-- name: create rbd target log directories
-  file:
-    path: '/var/log/{{ item }}'
-    state: directory
-  with_items:
-    - rbd-target-api
-    - rbd-target-gw
-
-- name: include_tasks systemd.yml
-  include_tasks: systemd.yml
-
-- name: systemd start tcmu-runner, rbd-target-api and rbd-target-gw containers
-  systemd:
-    name: "{{ item }}"
-    state: started
-    enabled: yes
-    masked: no
-    daemon_reload: yes
-  with_items:
-    - tcmu-runner
-    - rbd-target-gw
-    - rbd-target-api
diff --git a/roles/ceph-iscsi-gw/tasks/container/systemd.yml b/roles/ceph-iscsi-gw/tasks/container/systemd.yml
deleted file mode 100644 (file)
index 6768716..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
----
-- name: generate systemd unit files for tcmu-runner, rbd-target-api and rbd-target-gw
-  become: true
-  template:
-    src: "{{ role_path }}/templates/{{ item }}.service.j2"
-    dest: /etc/systemd/system/{{ item }}.service
-    owner: "root"
-    group: "root"
-    mode: "0644"
-  with_items:
-    - tcmu-runner
-    - rbd-target-gw
-    - rbd-target-api
-  notify: restart ceph {{ item }}
diff --git a/roles/ceph-iscsi-gw/tasks/containerized.yml b/roles/ceph-iscsi-gw/tasks/containerized.yml
new file mode 100644 (file)
index 0000000..b5dc4e9
--- /dev/null
@@ -0,0 +1,23 @@
+---
+- name: create rbd target log directories
+  file:
+    path: '/var/log/{{ item }}'
+    state: directory
+  with_items:
+    - rbd-target-api
+    - rbd-target-gw
+
+- name: include_tasks systemd.yml
+  include_tasks: systemd.yml
+
+- name: systemd start tcmu-runner, rbd-target-api and rbd-target-gw containers
+  systemd:
+    name: "{{ item }}"
+    state: started
+    enabled: yes
+    masked: no
+    daemon_reload: yes
+  with_items:
+    - tcmu-runner
+    - rbd-target-gw
+    - rbd-target-api
index 3d8bee8544c7863ff79b41babd4190b678fc2d0f..05732a0dacd56149ef3e46612e98a3166d5da263 100644 (file)
@@ -20,5 +20,5 @@
     - not use_new_ceph_iscsi | bool
 
 - name: include containerized.yml
-  include_tasks: container/containerized.yml
+  include_tasks: containerized.yml
   when: containerized_deployment | bool
diff --git a/roles/ceph-iscsi-gw/tasks/systemd.yml b/roles/ceph-iscsi-gw/tasks/systemd.yml
new file mode 100644 (file)
index 0000000..6768716
--- /dev/null
@@ -0,0 +1,14 @@
+---
+- name: generate systemd unit files for tcmu-runner, rbd-target-api and rbd-target-gw
+  become: true
+  template:
+    src: "{{ role_path }}/templates/{{ item }}.service.j2"
+    dest: /etc/systemd/system/{{ item }}.service
+    owner: "root"
+    group: "root"
+    mode: "0644"
+  with_items:
+    - tcmu-runner
+    - rbd-target-gw
+    - rbd-target-api
+  notify: restart ceph {{ item }}