--- - name: Check for forgejo.configured ansible.builtin.stat: path: "/etc/forgejo.configured" register: forgejo_configured_file check_mode: false changed_when: "1 != 1" tags: - mock - name: Deploy Forgejo configuration ansible.builtin.template: src: "etc/forgejo/conf/app.ini.j2" dest: "/etc/forgejo/conf/app.ini" owner: git group: git mode: '0660' notify: restart_forgejo when: - not forgejo_configured_file.stat.exists|bool # Configuration for forgejo - name: Enable Forgejo ansible.builtin.service: name: forgejo state: started enabled: true when: - not forgejo_configured_file.stat.exists|bool - name: Drop template direct for sign up link ansible.builtin.copy: src: "var/lib/forgejo/custom/templates/user/auth/signup.tmpl" dest: "/var/lib/forgejo/custom/templates/user/auth/signup.tmpl" mode: '0644' owner: git group: git - name: Drop file to prevent further configuration ansible.builtin.file: name: /etc/forgejo.configured state: touch - name: Append AcceptEnv for openssh ansible.builtin.lineinfile: create: true path: /etc/ssh/sshd_config.d/99-forgejo.conf line: "AcceptEnv GIT_PROTOCOL" ...