Adding molecule unit tests

This commit is contained in:
Ian Roddis
2026-03-23 15:15:27 -03:00
parent 72f171e88f
commit 0bf5dd0024
75 changed files with 2092 additions and 2 deletions
+7
View File
@@ -11,16 +11,19 @@
- python3-docker
state: present
update_cache: true
when: not (molecule_test_mode | default(false))
- name: Add Docker GPG key
ansible.builtin.apt_key:
url: https://download.docker.com/linux/ubuntu/gpg
state: present
when: not (molecule_test_mode | default(false))
- name: Add Docker repository
ansible.builtin.apt_repository:
repo: "deb [arch=amd64] https://download.docker.com/linux/ubuntu {{ ansible_distribution_release }} stable"
state: present
when: not (molecule_test_mode | default(false))
- name: Install Docker
ansible.builtin.apt:
@@ -31,17 +34,20 @@
- docker-compose-plugin
state: present
update_cache: true
when: not (molecule_test_mode | default(false))
- name: Enable and start Docker
ansible.builtin.systemd:
name: docker
enabled: true
state: started
when: not (molecule_test_mode | default(false))
- name: Create sovereign Docker network
community.docker.docker_network:
name: "{{ sovereign_network_name }}"
state: present
when: not (molecule_test_mode | default(false))
- name: Create Traefik data directory
ansible.builtin.file:
@@ -69,3 +75,4 @@
community.docker.docker_compose_v2:
project_src: "{{ traefik_data_dir }}"
state: present
when: not (molecule_test_mode | default(false))