This commit is contained in:
sfigato 2024-12-04 23:49:00 +01:00
commit 55d1e0c105
Signed by: blallo
GPG Key ID: C530464EEDCF489A
10 changed files with 67 additions and 0 deletions

4
ansible.cfg Normal file
View File

@ -0,0 +1,4 @@
[defaults]
interpreter_python = /usr/bin/python3
ansible_python_interpreter = /usr/bin/python3
roles_path = ./roles/:~/.ansible/roles:/etc/ansible/roles

13
create-role.sh Executable file
View File

@ -0,0 +1,13 @@
#!/usr/bin/bash
if [ $# -ne 1 ]; then
echo "$0 <role_name>"
fi
ROLE="${1}"
mkdir roles/${ROLE}
mkdir roles/${ROLE}/{defaults,handlers,tasks,templates,files}
touch roles/${ROLE}/{defaults,handlers,tasks,templates,files}/main.yml

15
inventory.yml Normal file
View File

@ -0,0 +1,15 @@
---
all:
hosts:
houdini:
ansible_host: houdini.abbiamoundominio.org
ranma:
ansible_host: 109.123.246.23
children:
dev:
hosts:
houdini: {}
prod:
hosts:
ranma: {}

4
playbooks/base.yml Normal file
View File

@ -0,0 +1,4 @@
---
- hosts: all
roles:
- base

View File

View File

View File

View File

@ -0,0 +1,30 @@
---
- name: Install required packages
apt:
name:
- apt-transport-https
- ca-certificates
- curl
- gnupg2
- software-properties-common
- name: Add Docker GPG key
apt_key:
url: https://download.docker.com/linux/debian/gpg
state: present
- name: Add Docker repository
apt_repository:
repo: deb [arch=amd64] https://download.docker.com/linux/debian bookworm stable
state: present
- name: Install Docker Engine
apt:
name:
- docker-ce
- docker-ce-cli
- containerd.io
- name: Start Docker service
service:
name: docker

View File

@ -0,0 +1 @@
- include_tasks: docker.yml

View File