image-serve: add httpd_sys_content_t type to image_data_dir

This type is needed so IPtables can read and write in the image-serve
directory, apparently needed when building containers.
Also fix the mode, to be quoted:
https://docs.ansible.com/ansible/latest/modules/file_module.html#file-module

Closes-Bug: #1816039
Change-Id: Id4ed832f0bf5115f2f44d0b7b11c60d01d1e7b4c
This commit is contained in:
Emilien Macchi 2019-02-15 16:55:25 -05:00 committed by Steve Baker
parent 8307c641e3
commit 0d4e62238f
1 changed files with 4 additions and 3 deletions

View File

@ -7,15 +7,16 @@
file:
state: directory
path: "{{ image_data_dir }}/v2"
mode: 755
mode: 0755
owner: root
group: root
setype: httpd_sys_content_t
- name: create /v2/ response file
copy:
content: "{}"
content: "{}"
dest: "{{ image_data_dir }}/v2/index.json"
mode: 644
mode: 0644
owner: root
group: root