2019-04-17 19:07:25 +00:00
|
|
|
- name: install gitea
|
|
|
|
pacman:
|
|
|
|
state: present # not required. choices: absent;latest;present. Desired state of the package.
|
|
|
|
upgrade: false # not required. Whether or not to upgrade whole system.
|
|
|
|
force: false # not required. When removing package - force remove package, without any checks. When update_cache - force redownload repo databases.
|
|
|
|
name: gitea
|
|
|
|
become: yes
|
|
|
|
|
|
|
|
|
|
|
|
- name: "Configure gitea"
|
|
|
|
template:
|
|
|
|
src: app.ini.j2
|
|
|
|
dest: /etc/gitea/app.ini
|
|
|
|
owner: "{{ gitea_user }}"
|
|
|
|
mode: 0600
|
|
|
|
notify: "Restart gitea"
|
|
|
|
become: yes
|
|
|
|
|
|
|
|
- name: "Service gitea"
|
|
|
|
service:
|
|
|
|
name: gitea
|
|
|
|
state: started
|
|
|
|
enabled: true
|
|
|
|
when: ansible_service_mgr == "systemd"
|
|
|
|
become: yes
|
|
|
|
|
|
|
|
|
|
|
|
- name: Install fail2ban jail
|
|
|
|
template:
|
|
|
|
src: fail2ban/gitea.local.j2
|
|
|
|
dest: /etc/fail2ban/jail.d/gitea.local
|
|
|
|
owner: root
|
|
|
|
group: root
|
2019-04-19 17:58:52 +00:00
|
|
|
mode: 0644
|
2019-04-17 19:07:25 +00:00
|
|
|
notify: Restart fail2ban
|
|
|
|
become: yes
|