This commit is contained in:
parent
c900fefb03
commit
af023c0487
@ -1,5 +1,4 @@
|
||||
|
||||
---
|
||||
# - name: Install Dependencies
|
||||
# apt:
|
||||
# pkg:
|
||||
@ -13,32 +12,32 @@
|
||||
register: git_user
|
||||
|
||||
- name: Create Gitea
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
path: "/opt/gitea"
|
||||
state: directory
|
||||
owner: root
|
||||
mode: 0755
|
||||
mode: "755"
|
||||
|
||||
- name: Create Data Directory
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
path: "/opt/gitea/data"
|
||||
state: directory
|
||||
owner: "{{ git_user.uid }}"
|
||||
group: "{{ git_user.group }}"
|
||||
mode: 0700
|
||||
mode: "700"
|
||||
|
||||
- name: Create Config Directory
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
path: "/opt/gitea/config"
|
||||
state: directory
|
||||
owner: "{{ git_user.uid }}"
|
||||
group: "{{ git_user.group }}"
|
||||
mode: 0700
|
||||
mode: "700"
|
||||
|
||||
- name: Start Docker Daemon
|
||||
systemd:
|
||||
ansible.builtin.systemd:
|
||||
name: docker
|
||||
enabled: yes
|
||||
enabled: true
|
||||
state: started
|
||||
|
||||
- name: Backup Files
|
||||
@ -53,6 +52,7 @@
|
||||
ansible.builtin.copy:
|
||||
src: /opt/gitea
|
||||
dest: "/opt/gitea.backup@{{ ansible_date_time.iso8601 }}"
|
||||
mode: "700"
|
||||
remote_src: true
|
||||
directory_mode: true
|
||||
register: backup
|
||||
@ -64,7 +64,7 @@
|
||||
src: environment.env.j2
|
||||
dest: "/opt/gitea/environment.env"
|
||||
owner: root
|
||||
mode: 0600
|
||||
mode: "600"
|
||||
register: gitea_env
|
||||
|
||||
- name: Upload docker-compose.yaml
|
||||
@ -72,7 +72,7 @@
|
||||
src: docker-compose.yaml.j2
|
||||
dest: /opt/gitea/docker-compose.yaml
|
||||
owner: root
|
||||
mode: 0600
|
||||
mode: "600"
|
||||
register: gitea_container
|
||||
|
||||
- name: Create / Recreate Gitea
|
||||
@ -102,6 +102,7 @@
|
||||
src: "{{ backup.dest }}"
|
||||
dest: "{{ backup.src }}"
|
||||
remote_src: true
|
||||
mode: "700"
|
||||
|
||||
- name: Create / Recreate Gitea
|
||||
community.docker.docker_compose:
|
||||
|
Loading…
Reference in New Issue
Block a user