diff --git a/roles/gitea/tasks/install.yml b/roles/gitea/tasks/install.yml index 4f4a3c1ad..71514da6c 100644 --- a/roles/gitea/tasks/install.yml +++ b/roles/gitea/tasks/install.yml @@ -147,20 +147,22 @@ src: gitea.conf.j2 dest: "/etc/{{ apache_config_dir }}/gitea.conf" -- name: Enable httpd conf file if we are disabled (debuntu) +- name: Enable httpd conf file (debuntu) file: src: /etc/{{ apache_config_dir }}/gitea.conf dest: /etc/apache2/sites-enabled/gitea.conf state: link when: gitea_enabled and is_debuntu -- name: Remove httpd conf file if we are disabled (OS's other than debuntu) +- name: Remove httpd conf file (OS's other than debuntu) file: path: /etc/apache2/sites-enabled/gitea.conf state: absent when: not gitea_enabled and is_debuntu -- name: Restart Apache ({{ apache_service }}) to enable/disable http://box/gitea +- name: >- + Restart Apache ({{ apache_service }}) to {% if gitea_enabled %}enable{% + else %}disable{% endif %} http://box/gitea service: name: "{{ apache_service }}" state: restarted