Automated changes from linter ;P
This commit is contained in:
parent
44b73a216f
commit
f7f04e7a41
65 changed files with 392 additions and 324 deletions
|
@ -1,7 +1,8 @@
|
|||
---
|
||||
- import_tasks: ../../common/handlers/main.yaml
|
||||
- ansible.builtin.import_tasks:
|
||||
file: ../../common/handlers/main.yaml
|
||||
|
||||
- name: reload forgejo
|
||||
systemd:
|
||||
ansible.builtin.systemd:
|
||||
name: forgejo
|
||||
state: reloaded
|
||||
|
|
|
@ -1,15 +1,16 @@
|
|||
---
|
||||
- import_tasks: ../../../snippets/common-nginx.yaml
|
||||
- ansible.builtin.import_tasks:
|
||||
file: ../../../snippets/common-nginx.yaml
|
||||
|
||||
- name: Install dependencies
|
||||
apt:
|
||||
ansible.builtin.apt:
|
||||
name:
|
||||
- git
|
||||
- xq
|
||||
state: present
|
||||
|
||||
- name: Install nginx site
|
||||
template:
|
||||
ansible.builtin.template:
|
||||
src: nginx-site.conf
|
||||
dest: /etc/nginx/sites-available/forgejo
|
||||
owner: root
|
||||
|
@ -18,21 +19,21 @@
|
|||
notify: reload nginx
|
||||
|
||||
- name: Enable nginx site
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
src: /etc/nginx/sites-available/forgejo
|
||||
dest: /etc/nginx/sites-enabled/forgejo
|
||||
state: link
|
||||
notify: reload nginx
|
||||
|
||||
- name: Create user
|
||||
user:
|
||||
ansible.builtin.user:
|
||||
name: "{{ git_server_user }}"
|
||||
home: "{{ git_server_working_dir }}"
|
||||
shell: /bin/bash
|
||||
comment: Git server
|
||||
|
||||
- name: Create logging dir
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
state: directory
|
||||
path: /var/log/forgejo
|
||||
owner: "{{ git_server_user }}"
|
||||
|
@ -43,7 +44,7 @@
|
|||
# TODO: Install initial config
|
||||
|
||||
- name: Install service file
|
||||
template:
|
||||
ansible.builtin.template:
|
||||
src: forgejo.service
|
||||
dest: /etc/systemd/system/forgejo.service
|
||||
owner: root
|
||||
|
@ -52,7 +53,7 @@
|
|||
notify: reload forgejo
|
||||
|
||||
- name: Install update script
|
||||
template:
|
||||
ansible.builtin.template:
|
||||
src: update.sh
|
||||
dest: "{{ git_server_working_dir }}/update.sh"
|
||||
owner: "{{ git_server_user }}"
|
||||
|
@ -60,30 +61,30 @@
|
|||
mode: 0755
|
||||
|
||||
- name: Perform initial update
|
||||
command: "{{ git_server_working_dir }}/update.sh"
|
||||
ansible.builtin.command: "{{ git_server_working_dir }}/update.sh"
|
||||
args:
|
||||
creates: "{{ git_server_working_dir }}/forgejo"
|
||||
notify: reload forgejo
|
||||
|
||||
- name: Enable service
|
||||
systemd:
|
||||
ansible.builtin.systemd:
|
||||
name: forgejo
|
||||
enabled: yes
|
||||
daemon_reload: true
|
||||
|
||||
- name: Start service
|
||||
systemd:
|
||||
ansible.builtin.systemd:
|
||||
name: forgejo
|
||||
state: started
|
||||
daemon_reload: true
|
||||
|
||||
- name: Install cronjob
|
||||
template:
|
||||
ansible.builtin.template:
|
||||
src: cronjob
|
||||
dest: /etc/cron.d/forgejo
|
||||
|
||||
- name: Allow Git SSH, HTTP and HTTPS
|
||||
iptables:
|
||||
ansible.builtin.iptables:
|
||||
chain: INPUT
|
||||
protocol: tcp
|
||||
destination_port: "{{ item.port }}"
|
||||
|
@ -100,5 +101,5 @@
|
|||
- { ip: ipv6, port: 443 }
|
||||
notify: persist iptables
|
||||
|
||||
- debug:
|
||||
- ansible.builtin.debug:
|
||||
msg: If Forgejo has not been setup yet, please do so manually.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue