Remove a conditional

This commit is contained in:
Andrea Dell'Amico 2021-06-23 16:00:11 +02:00
parent ea57a9565c
commit db905031d5
Signed by: adellam
GPG Key ID: 147ABE6CEB9E20FF
1 changed files with 5 additions and 11 deletions

View File

@ -41,9 +41,9 @@
- name: Install the required packages - name: Install the required packages
package: state=present use=auto name={{ gitea_required_packages }} package: state=present use=auto name={{ gitea_required_packages }}
- name: Check if the gitea configuration file exists - name: Install the gitea configuration file. At install time only
stat: path={{ gitea_conf_dir }}/app.ini template: src=app.ini.j2 dest={{ gitea_conf_dir }}/app.ini owner={{ gitea_user }} group={{ gitea_group }} mode=0640 force=no
register: gitea_app_ini notify: restart gitea
- name: Change the gitea configuration. After the installation - name: Change the gitea configuration. After the installation
ini_file: ini_file:
@ -56,10 +56,8 @@
group: '{{ gitea_group }}' group: '{{ gitea_group }}'
mode: '0640' mode: '0640'
create: no create: no
with_items: '{{ gitea_app_configurations }}' loop: '{{ gitea_app_configurations }}'
when: when: gitea_app_configurations is defined
- gitea_app_ini.stat.exists
- gitea_app_configurations is defined
notify: restart gitea notify: restart gitea
- name: Create the tmpfile entry for the gitea socket directory - name: Create the tmpfile entry for the gitea socket directory
@ -70,10 +68,6 @@
group: root group: root
mode: 0644 mode: 0644
- name: Install the gitea configuration file. At install time only
template: src=app.ini.j2 dest={{ gitea_conf_dir }}/app.ini owner={{ gitea_user }} group={{ gitea_group }} mode=0640 force=no
notify: restart gitea
- name: Install the gitea systemd unit - name: Install the gitea systemd unit
template: src=gitea.service.systemd dest=/etc/systemd/system/gitea.service template: src=gitea.service.systemd dest=/etc/systemd/system/gitea.service
register: gitea_systemd_unit register: gitea_systemd_unit