feat: implement molecule to test role

This commit is contained in:
2026-03-10 17:47:11 -03:00
parent 2a7cafa46e
commit c696c57a5e
4 changed files with 113 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
#SPDX-License-Identifier: GPL-3.0-only
---
- name: Verify
hosts: all
tasks:
- name: Check traefik binary
ansible.builtin.stat:
path: /opt/traefik/traefik
register: traefik_binary
- name: Assert traefik binary is executable
ansible.builtin.assert:
that:
- traefik_binary.stat.exists
- traefik_binary.stat.executable
- name: Gather service facts
ansible.builtin.service_facts:
- name: Assert traefik service is present
ansible.builtin.assert:
that:
- "'traefik.service' in ansible_facts.services"