2022-06-18 18:49:45 +00:00
|
|
|
- name: Enable & Restart 'gitea' systemd service, if gitea_enabled
|
|
|
|
systemd:
|
|
|
|
name: gitea
|
|
|
|
daemon_reload: yes
|
|
|
|
enabled: yes
|
|
|
|
state: restarted
|
|
|
|
when: gitea_enabled
|
2022-06-18 17:55:05 +00:00
|
|
|
|
2022-06-18 18:49:45 +00:00
|
|
|
- name: Disable & Stop 'gitea' systemd service, if not gitea_enabled
|
|
|
|
systemd:
|
|
|
|
name: gitea
|
|
|
|
enabled: no
|
|
|
|
state: stopped
|
|
|
|
when: not gitea_enabled
|
2022-06-18 17:55:05 +00:00
|
|
|
|
|
|
|
|
2020-02-01 23:20:22 +00:00
|
|
|
- name: Enable http://box{{ gitea_url }} via NGINX, by installing {{ nginx_conf_dir }}/gitea-nginx.conf from template
|
|
|
|
template:
|
|
|
|
src: gitea-nginx.conf.j2
|
|
|
|
dest: "{{ nginx_conf_dir }}/gitea-nginx.conf" # /etc/nginx/conf.d
|
2020-10-16 20:46:19 +00:00
|
|
|
when: gitea_enabled
|
2020-02-01 23:20:22 +00:00
|
|
|
|
|
|
|
- name: Disable http://box{{ gitea_url }} via NGINX, by removing {{ nginx_conf_dir }}/gitea-nginx.conf
|
|
|
|
file:
|
|
|
|
path: "{{ nginx_conf_dir }}/gitea-nginx.conf" # /etc/nginx/conf.d
|
|
|
|
state: absent
|
|
|
|
when: not gitea_enabled
|
|
|
|
|
|
|
|
- name: Restart 'nginx' systemd service
|
|
|
|
systemd:
|
|
|
|
name: nginx
|
|
|
|
state: restarted
|