]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
nfs: get org.ganesha.nfsd.conf from container v6.0.7
authorGuillaume Abrioux <gabrioux@redhat.com>
Thu, 6 May 2021 08:10:56 +0000 (10:10 +0200)
committerGuillaume Abrioux <gabrioux@redhat.com>
Fri, 7 May 2021 14:34:33 +0000 (16:34 +0200)
Since we need to revert 33bfb10, this is an alternative to initial approach.
We can avoid maintaining this file since it is present in container
image. The idea is to simply get it from the image container and write
it to the host.

Fixes: #6501
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit e6d8b058ba92fecdc78ee55b0dd8ce12c5120df0)

roles/ceph-nfs/tasks/pre_requisite_container.yml

index 177909d04f05f04d9182afbcc3fc0759ba65e4b3..d05551442ca2fe1bf5f37cb47e7cb9d64071fb2d 100644 (file)
         - item.item.copy_key | bool
   when: groups.get(mon_group_name, []) | length > 0
 
+- name: dbus related tasks
+  block:
+    - name: get file
+      command: "{{ container_binary }} run --rm --entrypoint=cat {{ ceph_docker_registry + '/' + ceph_docker_image + ':' + ceph_docker_image_tag }} /etc/dbus-1/system.d/org.ganesha.nfsd.conf"
+      register: dbus_ganesha_file
+      run_once: true
+      changed_when: false
+
+    - name: create dbus service file
+      copy:
+        content: "{{ dbus_ganesha_file.stdout }}"
+        dest: /etc/dbus-1/system.d/org.ganesha.nfsd.conf
+        owner: "root"
+        group: "root"
+        mode: "0644"
+
+    - name: reload dbus configuration
+      command: "killall -SIGHUP dbus-daemon"
+  when: ceph_nfs_dynamic_exports | bool
\ No newline at end of file