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
|
||||
hosts: all
|
||||
remote_user: root
|
||||
vars:
|
||||
forgejo: 1.20.2-0
|
||||
tasks:
|
||||
- name: Install a list of packages
|
||||
ansible.builtin.apt:
|
||||
|
@ -30,6 +32,27 @@
|
|||
group: git
|
||||
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
|
||||
- name: Create a new database with name 'forgejo'
|
||||
community.mysql.mysql_db:
|
||||
|
@ -59,3 +82,9 @@
|
|||
priv: 'forgejo.*:ALL'
|
||||
state: present
|
||||
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