mirror of
https://pagure.io/fedora-infra/ansible.git
synced 2026-05-11 18:36:53 +08:00
57 lines
1.6 KiB
YAML
57 lines
1.6 KiB
YAML
---
|
|
- name: mount the export directory
|
|
mount:
|
|
name: "{{ osbs_export_dir }}"
|
|
src: "{{ osbs_export_mount_src }}"
|
|
fstype: "{{ osbs_export_mount_fs }}"
|
|
state: mounted
|
|
when: osbs_export_mount_src is defined
|
|
|
|
- name: set owner of the image export directory
|
|
file:
|
|
path: "{{ osbs_export_dir }}"
|
|
state: directory
|
|
owner: apache
|
|
group: apache
|
|
when: osbs_export_http_path is defined
|
|
|
|
- name: configure selinux labels for image export directory
|
|
command: /usr/sbin/semanage fcontext --add --type httpd_sys_content_t "{{ osbs_export_dir }}(/.*)?"
|
|
when: osbs_export_http_path is defined
|
|
|
|
- name: restore selinux labels for image export directory
|
|
file:
|
|
path: "{{ osbs_export_dir }}"
|
|
state: directory
|
|
setype: httpd_sys_content_t
|
|
recurse: yes
|
|
when: osbs_export_http_path is defined
|
|
|
|
- name: export the mount directory via http
|
|
template: src=httpd-osbs_image_export.conf.j2 dest={{ osbs_export_http_conf }}
|
|
notify:
|
|
- restart httpd
|
|
when: osbs_export_http_path is defined
|
|
|
|
- name: open http ports
|
|
firewalld:
|
|
service: "{{ item }}"
|
|
state: enabled
|
|
permanent: true
|
|
immediate: true
|
|
with_items:
|
|
- http
|
|
- https
|
|
when: osbs_export_http_path is defined and osbs_manage_firewalld
|
|
|
|
- name: install dependencies for garbage collection script
|
|
action: "{{ ansible_pkg_mgr }} name=koji state=installed"
|
|
when: osbs_export_koji_hub is defined
|
|
|
|
- name: install garbage collection script
|
|
template:
|
|
src: osbs-remove-finished-docker-tarball.py.j2
|
|
dest: /etc/cron.hourly/osbs-remove-finished-docker-tarball.cron
|
|
mode: "0744"
|
|
when: osbs_export_koji_hub is defined
|