Merge ansible-lint nach main #2
6
.ansible-lint-ignore
Normal file
6
.ansible-lint-ignore
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
|
||||||
|
# In den hier aufgelisteten Dateien sollen die dahinter stehenden
|
||||||
|
# Warnungen und Fehler von ansible-lint ignoriert werden.
|
||||||
|
|
||||||
|
tasks/main.yaml no-handler # Der Restart / Recreate Gitea Task ist gut dort, wo er ist
|
||||||
|
tasks/main.yaml name[template] # Es braucht zwei Templates, um den FQDN zusammenzusetzen.
|
@ -1,6 +1,4 @@
|
|||||||
|
# - name: Install Dependencies
|
||||||
---
|
|
||||||
#- name: Install Dependencies
|
|
||||||
# apt:
|
# apt:
|
||||||
# pkg:
|
# pkg:
|
||||||
# - apparmor
|
# - apparmor
|
||||||
@ -13,32 +11,32 @@
|
|||||||
register: git_user
|
register: git_user
|
||||||
|
|
||||||
- name: Create Gitea
|
- name: Create Gitea
|
||||||
file:
|
ansible.builtin.file:
|
||||||
path: "/opt/gitea"
|
path: "/opt/gitea"
|
||||||
state: directory
|
state: directory
|
||||||
owner: root
|
owner: root
|
||||||
mode: 0755
|
mode: "755"
|
||||||
|
|
||||||
- name: Create Data Directory
|
- name: Create Data Directory
|
||||||
file:
|
ansible.builtin.file:
|
||||||
path: "/opt/gitea/data"
|
path: "/opt/gitea/data"
|
||||||
state: directory
|
state: directory
|
||||||
owner: "{{ git_user.uid }}"
|
owner: "{{ git_user.uid }}"
|
||||||
group: "{{ git_user.group }}"
|
group: "{{ git_user.group }}"
|
||||||
mode: 0700
|
mode: "700"
|
||||||
|
|
||||||
- name: Create Config Directory
|
- name: Create Config Directory
|
||||||
file:
|
ansible.builtin.file:
|
||||||
path: "/opt/gitea/config"
|
path: "/opt/gitea/config"
|
||||||
state: directory
|
state: directory
|
||||||
owner: "{{ git_user.uid }}"
|
owner: "{{ git_user.uid }}"
|
||||||
group: "{{ git_user.group }}"
|
group: "{{ git_user.group }}"
|
||||||
mode: 0700
|
mode: "700"
|
||||||
|
|
||||||
- name: Start Docker Daemon
|
- name: Start Docker Daemon
|
||||||
systemd:
|
ansible.builtin.systemd:
|
||||||
name: docker
|
name: docker
|
||||||
enabled: yes
|
enabled: true
|
||||||
state: started
|
state: started
|
||||||
|
|
||||||
- name: Backup Files
|
- name: Backup Files
|
||||||
@ -53,6 +51,7 @@
|
|||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
src: /opt/gitea
|
src: /opt/gitea
|
||||||
dest: "/opt/gitea.backup@{{ ansible_date_time.iso8601 }}"
|
dest: "/opt/gitea.backup@{{ ansible_date_time.iso8601 }}"
|
||||||
|
mode: "700"
|
||||||
remote_src: true
|
remote_src: true
|
||||||
directory_mode: true
|
directory_mode: true
|
||||||
register: backup
|
register: backup
|
||||||
@ -64,7 +63,7 @@
|
|||||||
src: environment.env.j2
|
src: environment.env.j2
|
||||||
dest: "/opt/gitea/environment.env"
|
dest: "/opt/gitea/environment.env"
|
||||||
owner: root
|
owner: root
|
||||||
mode: 0600
|
mode: "600"
|
||||||
register: gitea_env
|
register: gitea_env
|
||||||
|
|
||||||
- name: Upload docker-compose.yaml
|
- name: Upload docker-compose.yaml
|
||||||
@ -72,7 +71,7 @@
|
|||||||
src: docker-compose.yaml.j2
|
src: docker-compose.yaml.j2
|
||||||
dest: /opt/gitea/docker-compose.yaml
|
dest: /opt/gitea/docker-compose.yaml
|
||||||
owner: root
|
owner: root
|
||||||
mode: 0600
|
mode: "600"
|
||||||
register: gitea_container
|
register: gitea_container
|
||||||
|
|
||||||
- name: Create / Recreate Gitea
|
- name: Create / Recreate Gitea
|
||||||
@ -102,6 +101,7 @@
|
|||||||
src: "{{ backup.dest }}"
|
src: "{{ backup.dest }}"
|
||||||
dest: "{{ backup.src }}"
|
dest: "{{ backup.src }}"
|
||||||
remote_src: true
|
remote_src: true
|
||||||
|
mode: "700"
|
||||||
|
|
||||||
- name: Create / Recreate Gitea
|
- name: Create / Recreate Gitea
|
||||||
community.docker.docker_compose:
|
community.docker.docker_compose:
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
gitea_defaults:
|
gitea_defaults:
|
||||||
gitea_vars: |
|
gitea_vars: |
|
||||||
{%- if gitea is defined and gitea is iterable -%}
|
{%- if gitea is defined and gitea is iterable -%}
|
||||||
{{ gitea_defaults | combine (gitea, recursive=True) }}
|
{{ gitea_defaults | combine(gitea, recursive=True) }}
|
||||||
{%- else -%}
|
{%- else -%}
|
||||||
{{ gitea }}
|
{{ gitea }}
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
|
Loading…
Reference in New Issue
Block a user