Initial commit after Claude implementation
This commit is contained in:
@@ -0,0 +1,71 @@
|
||||
---
|
||||
- name: Install required packages
|
||||
ansible.builtin.apt:
|
||||
name:
|
||||
- apt-transport-https
|
||||
- ca-certificates
|
||||
- curl
|
||||
- gnupg
|
||||
- lsb-release
|
||||
- python3-pip
|
||||
- python3-docker
|
||||
state: present
|
||||
update_cache: true
|
||||
|
||||
- name: Add Docker GPG key
|
||||
ansible.builtin.apt_key:
|
||||
url: https://download.docker.com/linux/ubuntu/gpg
|
||||
state: present
|
||||
|
||||
- name: Add Docker repository
|
||||
ansible.builtin.apt_repository:
|
||||
repo: "deb [arch=amd64] https://download.docker.com/linux/ubuntu {{ ansible_distribution_release }} stable"
|
||||
state: present
|
||||
|
||||
- name: Install Docker
|
||||
ansible.builtin.apt:
|
||||
name:
|
||||
- docker-ce
|
||||
- docker-ce-cli
|
||||
- containerd.io
|
||||
- docker-compose-plugin
|
||||
state: present
|
||||
update_cache: true
|
||||
|
||||
- name: Enable and start Docker
|
||||
ansible.builtin.systemd:
|
||||
name: docker
|
||||
enabled: true
|
||||
state: started
|
||||
|
||||
- name: Create sovereign Docker network
|
||||
community.docker.docker_network:
|
||||
name: "{{ sovereign_network_name }}"
|
||||
state: present
|
||||
|
||||
- name: Create Traefik data directory
|
||||
ansible.builtin.file:
|
||||
path: "{{ item }}"
|
||||
state: directory
|
||||
mode: '0755'
|
||||
loop:
|
||||
- "{{ traefik_data_dir }}"
|
||||
- "{{ traefik_data_dir }}/config"
|
||||
|
||||
- name: Create acme.json for Let's Encrypt
|
||||
ansible.builtin.file:
|
||||
path: "{{ traefik_data_dir }}/acme.json"
|
||||
state: touch
|
||||
mode: '0600'
|
||||
|
||||
- name: Deploy Traefik docker-compose
|
||||
ansible.builtin.template:
|
||||
src: docker-compose.yml.j2
|
||||
dest: "{{ traefik_data_dir }}/docker-compose.yml"
|
||||
mode: '0644'
|
||||
notify: restart traefik
|
||||
|
||||
- name: Start Traefik
|
||||
community.docker.docker_compose_v2:
|
||||
project_src: "{{ traefik_data_dir }}"
|
||||
state: present
|
||||
Reference in New Issue
Block a user