Better molecule.

This commit is contained in:
Laur Ivan 2022-09-18 13:11:29 +02:00
parent 0b1d1754a8
commit 5932c1bf58
3 changed files with 22 additions and 3 deletions

View File

@ -0,0 +1,19 @@
---
- name: Clean up
hosts: all
tasks:
- name: Check if the docker-compose file exists.
ansible.builtin.stat:
path: "~/authentik/docker-compose.yml"
register: docker_compose_file
- name: Remove authentik docker-compose.
community.docker.docker_compose:
project_src: ~/authentik/
build: false
state: absent
when: docker_compose_file.stat.exists
become: false
- name: Remove the docker-compose file
ansible.builtin.file:
path: "~/authentik/docker-compose.yml"
state: absent

View File

@ -1,6 +1,6 @@
---
- name: Setup the test machine
hosts: instance-authentik
hosts: all
tasks:
- name: create docker.sock
raw: touch /var/run/docker.sock

View File

@ -2,7 +2,7 @@
# tasks file for authentik
- name: Set up directories
file:
ansible.builtin.file:
state: directory
path: "{{ item }}"
mode: 0755
@ -19,7 +19,7 @@
become: false
- name: Set up the database directory.
file:
ansible.builtin.file:
state: directory
path: "{{ item }}"
mode: 0755