diff --git a/defaults/main.yml b/defaults/main.yml index bc6bcdc..3909e4a 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -27,6 +27,7 @@ gitea_root_url: https://{{ ansible_fqdn }} # home, explore gitea_landing_page: explore +gitea_create_service_user: True gitea_user: gitea gitea_group: '{{ gitea_user }}' gitea_run_mode: prod diff --git a/tasks/gitea.yml b/tasks/gitea.yml index b1dc276..3348965 100644 --- a/tasks/gitea.yml +++ b/tasks/gitea.yml @@ -2,6 +2,7 @@ - block: - name: Create the gitea service user user: name={{ gitea_user }} home=/srv/gitea createhome=yes shell=/bin/bash system=yes + when: gitea_create_service_user - name: Create the gitea directory tree file: dest={{ gitea_data_dir }}/{{ item }} state=directory owner={{ gitea_user }} group={{ gitea_group }}