1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-03-09 15:40:17 +00:00

Don't care about previous state per Ansible convention

This commit is contained in:
Aidan Fitzgerald 2019-03-08 00:04:53 -05:00
parent caf87a4505
commit ffa2ecbd80

View file

@ -147,20 +147,22 @@
src: gitea.conf.j2 src: gitea.conf.j2
dest: "/etc/{{ apache_config_dir }}/gitea.conf" dest: "/etc/{{ apache_config_dir }}/gitea.conf"
- name: Enable httpd conf file if we are disabled (debuntu) - name: Enable httpd conf file (debuntu)
file: file:
src: /etc/{{ apache_config_dir }}/gitea.conf src: /etc/{{ apache_config_dir }}/gitea.conf
dest: /etc/apache2/sites-enabled/gitea.conf dest: /etc/apache2/sites-enabled/gitea.conf
state: link state: link
when: gitea_enabled and is_debuntu 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: file:
path: /etc/apache2/sites-enabled/gitea.conf path: /etc/apache2/sites-enabled/gitea.conf
state: absent state: absent
when: not gitea_enabled and is_debuntu 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: service:
name: "{{ apache_service }}" name: "{{ apache_service }}"
state: restarted state: restarted