Initial commit
This commit is contained in:
commit
9235c2011e
5 changed files with 125 additions and 0 deletions
50
tasks/main.yml
Normal file
50
tasks/main.yml
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
- name: Download forgejo binary
|
||||
ansible.builtin.get_url:
|
||||
url: "https://codeberg.org/forgejo/forgejo/releases/download/v{{ forgejo_version }}/forgejo-{{ forgejo_version }}-linux-amd64"
|
||||
dest: "/usr/local/sbin/forgejo"
|
||||
mode: "0755"
|
||||
notify: Restart forgejo
|
||||
|
||||
- name: Create git group
|
||||
ansible.builtin.group:
|
||||
name: git
|
||||
system: true
|
||||
|
||||
- name: Create git user
|
||||
ansible.builtin.user:
|
||||
name: git
|
||||
group: git
|
||||
home: /var/lib/forgejo
|
||||
create_home: false
|
||||
system: true
|
||||
|
||||
- name: Create data directory
|
||||
ansible.builtin.file:
|
||||
path: /var/lib/forgejo
|
||||
owner: git
|
||||
group: git
|
||||
state: directory
|
||||
mode: "0750"
|
||||
|
||||
- name: Create config directory
|
||||
ansible.builtin.file:
|
||||
path: /etc/forgejo
|
||||
owner: root
|
||||
group: git
|
||||
state: directory
|
||||
mode: "0750"
|
||||
|
||||
- name: Update config
|
||||
ansible.builtin.template:
|
||||
src: forgejo_app.ini.j2
|
||||
dest: /etc/forgejo/app.ini
|
||||
owner: root
|
||||
group: git
|
||||
mode: "0640"
|
||||
notify: Restart forgejo
|
||||
|
||||
- name: Create systemd unit
|
||||
ansible.builtin.copy:
|
||||
src: forgejo.service
|
||||
dest: /etc/systemd/system/forgejo.service
|
||||
notify: Restart forgejo
|
||||
Loading…
Add table
Add a link
Reference in a new issue