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
package: state=present use=auto name={{ gitea_required_packages }}
- name: Check if the gitea configuration file exists
stat: path={{ gitea_conf_dir }}/app.ini
register: gitea_app_ini
- 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: Change the gitea configuration. After the installation
ini_file:
@ -56,10 +56,8 @@
group: '{{ gitea_group }}'
mode: '0640'
create: no
with_items: '{{ gitea_app_configurations }}'
when:
- gitea_app_ini.stat.exists
- gitea_app_configurations is defined
loop: '{{ gitea_app_configurations }}'
when: gitea_app_configurations is defined
notify: restart gitea
- name: Create the tmpfile entry for the gitea socket directory
@ -70,10 +68,6 @@
group: root
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
template: src=gitea.service.systemd dest=/etc/systemd/system/gitea.service
register: gitea_systemd_unit