Start working on unifi role

This commit is contained in:
uumas
2022-05-03 22:15:43 +03:00
parent 7003364276
commit 12fa8d5d81
3 changed files with 40 additions and 0 deletions

1
roles/unifi/README.md Normal file
View File

@@ -0,0 +1 @@
Installs unifi controller in docker

11
roles/unifi/meta/main.yml Normal file
View File

@@ -0,0 +1,11 @@
---
dependencies:
- role: container
docker_service: unifi
docker_image: jacobalberty/unifi:latest
docker_network_mode: host
docker_volumes:
- unifi_data:/unifi
docker_env:

View File

@@ -0,0 +1,28 @@
---
- name: Create git group on host for gitea ssh
group:
name: git
gid: 2132
system: yes
- name: Create git user on host for gitea ssh
user:
name: git
uid: 2132
group: git
system: yes
home: /var/lib/gitea
generate_ssh_key: yes
register: git_user
- name: Add git user's own ssh key to its authorized keys
authorized_key:
user: git
key: "{{ git_user.ssh_public_key }}"
- name: Put gitea ssh forwarder in place
template:
src: gitea_ssh_forward.j2
dest: /usr/local/bin/gitea
mode: '755'