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

index 7908bb96049295fa19411858dfd5d6cffa2d99ee..861d95704530d260786cdbad9698562e3066effe 100644 (file)
 
     - import_role:
         name: ceph-rgw
-        tasks_from: container/systemd.yml
+        tasks_from: systemd.yml
       when: inventory_hostname in groups.get(rgw_group_name, [])
diff --git a/roles/ceph-rgw/tasks/container/main.yml b/roles/ceph-rgw/tasks/container/main.yml
deleted file mode 100644 (file)
index 539c423..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
----
-- name: include start_docker_rgw.yml
-  include_tasks: start_docker_rgw.yml
diff --git a/roles/ceph-rgw/tasks/container/start_docker_rgw.yml b/roles/ceph-rgw/tasks/container/start_docker_rgw.yml
deleted file mode 100644 (file)
index 7cb3702..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
----
-- name: generate environment file
-  copy:
-    dest: "/var/lib/ceph/radosgw/{{ cluster }}-rgw.{{ ansible_hostname }}.{{ item.instance_name }}/EnvironmentFile"
-    owner: "root"
-    group: "root"
-    mode: "0644"
-    content: |
-      INST_NAME={{ item.instance_name }}
-      INST_PORT={{ item.radosgw_frontend_port }}
-  with_items: "{{ rgw_instances }}"
-
-- name: include_task systemd.yml
-  include_tasks: systemd.yml
-
-- name: systemd start rgw container
-  systemd:
-    name: ceph-radosgw@rgw.{{ ansible_hostname }}.{{ item.instance_name }}
-    state: started
-    enabled: yes
-    masked: no
-    daemon_reload: yes
-  with_items: "{{ rgw_instances }}"
diff --git a/roles/ceph-rgw/tasks/container/systemd.yml b/roles/ceph-rgw/tasks/container/systemd.yml
deleted file mode 100644 (file)
index 1a08879..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
----
-- name: generate systemd unit file
-  become: true
-  template:
-    src: "{{ role_path }}/templates/ceph-radosgw.service.j2"
-    dest: /etc/systemd/system/ceph-radosgw@.service
-    owner: "root"
-    group: "root"
-    mode: "0644"
-  notify: restart ceph rgws
\ No newline at end of file
index df0e8bc3ee3a460c72357d3a0b4688d354134671..dad3c55042942ed56099e9e46b67bd0e6fcefe3a 100644 (file)
@@ -14,8 +14,8 @@
   include_tasks: start_radosgw.yml
   when: not containerized_deployment | bool
 
-- name: include_tasks container/main.yml
-  include_tasks: container/main.yml
+- name: include start_docker_rgw.yml
+  include_tasks: start_docker_rgw.yml
   when: containerized_deployment | bool
 
 - name: include_tasks multisite/main.yml
diff --git a/roles/ceph-rgw/tasks/start_docker_rgw.yml b/roles/ceph-rgw/tasks/start_docker_rgw.yml
new file mode 100644 (file)
index 0000000..7cb3702
--- /dev/null
@@ -0,0 +1,23 @@
+---
+- name: generate environment file
+  copy:
+    dest: "/var/lib/ceph/radosgw/{{ cluster }}-rgw.{{ ansible_hostname }}.{{ item.instance_name }}/EnvironmentFile"
+    owner: "root"
+    group: "root"
+    mode: "0644"
+    content: |
+      INST_NAME={{ item.instance_name }}
+      INST_PORT={{ item.radosgw_frontend_port }}
+  with_items: "{{ rgw_instances }}"
+
+- name: include_task systemd.yml
+  include_tasks: systemd.yml
+
+- name: systemd start rgw container
+  systemd:
+    name: ceph-radosgw@rgw.{{ ansible_hostname }}.{{ item.instance_name }}
+    state: started
+    enabled: yes
+    masked: no
+    daemon_reload: yes
+  with_items: "{{ rgw_instances }}"
diff --git a/roles/ceph-rgw/tasks/systemd.yml b/roles/ceph-rgw/tasks/systemd.yml
new file mode 100644 (file)
index 0000000..1a08879
--- /dev/null
@@ -0,0 +1,10 @@
+---
+- name: generate systemd unit file
+  become: true
+  template:
+    src: "{{ role_path }}/templates/ceph-radosgw.service.j2"
+    dest: /etc/systemd/system/ceph-radosgw@.service
+    owner: "root"
+    group: "root"
+    mode: "0644"
+  notify: restart ceph rgws
\ No newline at end of file