initial commit

This commit is contained in:
2024-08-13 20:18:11 -06:00
commit 77ed02f107
15 changed files with 763 additions and 0 deletions

View File

@ -0,0 +1,27 @@
- name: make caddy directories
ansible.builtin.file:
path: "{{ item}}"
state: directory
loop:
- /opt/stacks/caddy
- name: copy Caddyfile
ansible.builtin.copy:
src: Caddyfile
dest: /opt/stacks/caddy/Caddyfile
owner: root
mode: 644
- name: copy caddy compose file
ansible.builtin.copy:
src: caddy-compose.yml
dest: /opt/stacks/caddy/compose.yml
owner: root
mode: 644
- name: deploy caddy stack
community.docker.docker_compose_v2:
project_src: /opt/stacks/caddy
recreate: always
files:
- compose.yml

View File

@ -0,0 +1,19 @@
- name: make caddy directories
ansible.builtin.file:
path: "{{ item}}"
state: directory
loop:
- /opt/stacks/gitea
- name: copy gitea compose file
ansible.builtin.copy:
src: gitea-compose.yml
dest: /opt/stacks/gitea/compose.yml
owner: root
mode: 644
- name: deploy gitea stack
community.docker.docker_compose_v2:
project_src: /opt/stacks/gitea
files:
- compose.yml

View File

@ -0,0 +1,65 @@
- name: Install required system packages
apt:
pkg:
- apt-transport-https
- ca-certificates
- curl
- software-properties-common
- python3-pip
- virtualenv
- python3-setuptools
state: latest
update_cache: true
- name: Add Docker GPG apt Key
apt_key:
url: https://download.docker.com/linux/ubuntu/gpg
state: present
- name: Add Docker Repository
apt_repository:
repo: deb https://download.docker.com/linux/debian bookworm stable
state: present
- name: Update apt and install docker-ce
apt:
name: docker-ce
state: latest
update_cache: true
- name: copy over ufw-docker.sh
ansible.builtin.copy:
src: ufw-docker.sh
dest: /usr/local/bin/ufw-docker.sh
owner: root
mode: 755
- name: execute ufw-docker.sh
ansible.builtin.shell: /usr/local/bin/ufw-docker.sh install
- name: make directories
ansible.builtin.file:
path: "{{ item }}"
state: directory
loop:
- /opt/stacks
- /opt/dockge
- name: copy dockge compose file
ansible.builtin.copy:
src: dockge-compose.yml
dest: /opt/dockge/dockge.yml
owner: root
mode: 644
- name: deploy dockge stack
community.docker.docker_compose_v2:
project_src: /opt/dockge
files:
- dockge.yml
- name: Install caddy
import_tasks: caddy.yml
- name: Install gitea
import_tasks: gitea.yml