Update Gitea role for docker_compose_deploy

- Add MariaDB to dev playbook
- Set Git user in "users:"
- Define Gitea external compose project
- Forward SSH port in forwarding script
- Create user groups with system users
- Install python3-pymysql for Ansible
- Strip old Gitea deployment methods
- Bind MariaDB to docker0 for Docker access
This commit is contained in:
2023-10-20 15:41:44 -04:00
parent c3b4321667
commit 7adb5f10e9
9 changed files with 68 additions and 63 deletions

View File

@@ -27,4 +27,4 @@
ansible.builtin.service:
name: smbd
state: restarted
listen: restart_samba
listen: restart_samba

View File

@@ -66,13 +66,27 @@
mode: 0400
when: authorized_keys is defined
- name: Create system user groups
ansible.builtin.group:
name: "{{ item.key }}"
gid: "{{ item.value.gid }}"
state: present
loop: "{{ users | dict2items }}"
loop_control:
label: "{{ item.key }}"
when: users is defined
- name: Create system users
ansible.builtin.user:
name: "{{ item.name }}"
name: "{{ item.key }}"
state: present
shell: "{{ item.shell | default('/bin/bash') }}"
create_home: "{{ item.home | default(false) }}"
loop: "{{ users }}"
uid: "{{ item.value.uid }}"
group: "{{ item.value.gid }}"
shell: "{{ item.value.shell | default('/bin/bash') }}"
create_home: "{{ item.value.home | default(false) }}"
loop: "{{ users | dict2items }}"
loop_control:
label: "{{ item.key }}"
when: users is defined
- name: Set authorized_keys for system users
@@ -80,7 +94,9 @@
user: "{{ item.key }}"
key: "{{ item.value.key }}"
state: present
loop: "{{ users }}"
loop: "{{ users | dict2items }}"
loop_control:
label: "{{ item.key }}"
when: users is defined and item.value.key is defined
- name: Manage filesystem mounts