configpolicy/roles/gitea/tasks/main.yml

41 lines
797 B
YAML

- name: load gitea secrets
include_vars: vault/gitea
- name: ensure gitea is installed
package:
name=gitea
state=present
tags:
- install
- name: ensure gitea is configured
template:
src=app.ini.j2
dest=/etc/gitea/app.ini
mode=0640
owner=root
group=gitea
notify: restart gitea
- meta: flush_handlers
- name: ensure gitea is running
service:
name=gitea
state=started
- name: ensure gitea starts at boot
service:
name=gitea
enabled=yes
- name: ensure apache is configured to proxy for gitea
copy:
src=gitea.httpd.conf
dest=/etc/httpd/conf.d/gitea.conf
mode=0644
notify: reload httpd
- name: ensure selinux allows apache to proxy for gitea
seboolean:
name=httpd_can_network_connect
persistent=yes
state=yes