test: forgjeo
This commit is contained in:
parent
119518cc6b
commit
a8386bbc76
1 changed files with 29 additions and 0 deletions
|
@ -2,6 +2,8 @@
|
||||||
- name: Update web servers
|
- name: Update web servers
|
||||||
hosts: all
|
hosts: all
|
||||||
remote_user: root
|
remote_user: root
|
||||||
|
vars:
|
||||||
|
forgejo: 1.20.2-0
|
||||||
tasks:
|
tasks:
|
||||||
- name: Install a list of packages
|
- name: Install a list of packages
|
||||||
ansible.builtin.apt:
|
ansible.builtin.apt:
|
||||||
|
@ -29,6 +31,27 @@
|
||||||
owner: git
|
owner: git
|
||||||
group: git
|
group: git
|
||||||
mode: '0500'
|
mode: '0500'
|
||||||
|
|
||||||
|
- name: Create /usr/local/bin/
|
||||||
|
ansible.builtin.file:
|
||||||
|
path: /usr/local/bin/
|
||||||
|
state: directory
|
||||||
|
owner: git
|
||||||
|
group: git
|
||||||
|
mode: '0500'
|
||||||
|
|
||||||
|
- name: Download Gitea
|
||||||
|
get_url:
|
||||||
|
url: "https://codeberg.org/forgejo/forgejo/releases/download/v{{ forgejo }}/forgejo-{{ forgejo }}-linux-amd64"
|
||||||
|
dest: "/usr/local/bin/forgejo-{{forgejo}}-linux-amd64"
|
||||||
|
mode: '0755'
|
||||||
|
|
||||||
|
- name: Create a symbolic link
|
||||||
|
ansible.builtin.file:
|
||||||
|
src: "/usr/local/bin/forgejo-{{forgejo}}-linux-amd64"
|
||||||
|
dest: "/usr/local/bin/forgejo "
|
||||||
|
state: link
|
||||||
|
|
||||||
|
|
||||||
#Database
|
#Database
|
||||||
- name: Create a new database with name 'forgejo'
|
- name: Create a new database with name 'forgejo'
|
||||||
|
@ -59,3 +82,9 @@
|
||||||
priv: 'forgejo.*:ALL'
|
priv: 'forgejo.*:ALL'
|
||||||
state: present
|
state: present
|
||||||
login_unix_socket: /run/mysqld/mysqld.sock
|
login_unix_socket: /run/mysqld/mysqld.sock
|
||||||
|
|
||||||
|
- name: Template forgejo.service
|
||||||
|
ansible.builtin.template:
|
||||||
|
src: forgejo.service
|
||||||
|
dest: /etc/systemd/system/forgejo.service
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue