MNAIO: Set tftp/pxe directory permissions using file module

Instead of using the shell module, we use the file module. It
achieves the same result idempotently.

Change-Id: I84adb76ee5d5a9e7dd56c15f7cdf8e220b841b23
This commit is contained in:
Jesse Pretorius 2018-06-26 09:58:59 +01:00
parent 2a21711f04
commit 450a879403

View File

@ -203,11 +203,13 @@
with_dict: "{{ images }}"
- name: Ensure permissions are correct
shell: |
# Fix perms if needed
find /var/lib/tftpboot -type d -exec chmod 0755 {} \;
find /var/lib/tftpboot -type f -exec chmod 0644 {} \;
find /var/www/pxe -type d -exec chmod 0755 {} \;
file:
dest: "{{ item }}"
mode: u=rwX,g=rX,o=rX
recurse: yes
with_items:
- "/var/lib/tftpboot"
- "/var/www/pxe"
environment: "{{ deployment_environment_variables | default({}) }}"