From cba9638272d9d4b297e4b7728e03e863766a1130 Mon Sep 17 00:00:00 2001 From: Yolanda Robla Mota Date: Wed, 21 Sep 2016 12:33:45 +0200 Subject: [PATCH] Add read and execute perms to httpboot and tftpboot folder These directories need to be reachable by different users or groups. Also, after image creation finishes, add read perms to all content in httpboot folder. Change-Id: Ic7809c6646f020f27d22517171eab9299b07f6fe --- playbooks/roles/bifrost-create-dib-image/tasks/main.yml | 7 +++++++ .../roles/bifrost-ironic-install/tasks/create_tftpboot.yml | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/playbooks/roles/bifrost-create-dib-image/tasks/main.yml b/playbooks/roles/bifrost-create-dib-image/tasks/main.yml index 485be87ef..066b14f31 100644 --- a/playbooks/roles/bifrost-create-dib-image/tasks/main.yml +++ b/playbooks/roles/bifrost-create-dib-image/tasks/main.yml @@ -123,3 +123,10 @@ command: ramdisk-image-create {{dib_arglist}} environment: "{{ dib_env_vars }}" when: build_ramdisk | bool == true and test_image_present.stat.exists == false and test_image_dib_present.stat.exists == false and test_image_initramfs_present.stat.exists == false +- name: "Update permission of generated image" + file: + path: "{{ http_boot_folder }}" + mode: u=rwX,g=rX,o=rX + recurse: yes + state: directory + when: http_boot_folder is defined and http_boot_folder != '' diff --git a/playbooks/roles/bifrost-ironic-install/tasks/create_tftpboot.yml b/playbooks/roles/bifrost-ironic-install/tasks/create_tftpboot.yml index e46b3339e..9687c26a7 100644 --- a/playbooks/roles/bifrost-ironic-install/tasks/create_tftpboot.yml +++ b/playbooks/roles/bifrost-ironic-install/tasks/create_tftpboot.yml @@ -14,7 +14,7 @@ # limitations under the License. --- - name: "Set up PXE and iPXE folders" - file: name={{item}} owner=ironic group=ironic state=directory + file: name={{item}} owner=ironic group=ironic state=directory mode=0755 with_items: - /tftpboot - /tftpboot/pxelinux.cfg