tripleo-common/roles/tripleo-image-serve/tasks/main.yml
Emilien Macchi 0618438f62 image-serve: add httpd_sys_content_t type to v2/index.json
It's needed or you get this alert:
http://paste.openstack.org/show/W6LZBC5yiTZEQAHdD0NW/

Change-Id: I988ec76268e0986793da149bbd15ef79fc05c743
2019-02-22 12:41:12 -05:00

43 lines
884 B
YAML

- name: ensure apache is installed
package:
name: httpd
state: present
- name: create image data directory
file:
state: directory
path: "{{ image_data_dir }}/v2"
mode: 0755
owner: root
group: root
setype: httpd_sys_content_t
- name: create /v2/ response file
copy:
content: "{}"
dest: "{{ image_data_dir }}/v2/index.json"
mode: 0644
owner: root
group: root
setype: httpd_sys_content_t
- lineinfile:
path: /etc/httpd/conf/httpd.conf
regexp: '^\s*Listen(.*)$'
line: '# Listen \1'
- name: manage /etc/httpd/conf.d/image-serve.conf
template:
src: image-serve.conf.j2
dest: /etc/httpd/conf.d/image-serve.conf
notify: restart httpd service
- name: force systemd to reread configs
meta: flush_handlers
- name: enable and start httpd
systemd:
enabled: true
state: started
name: httpd