feat(tests): draft for molecule collection testing

This commit is contained in:
Bertrand Lanson 2023-12-15 17:21:26 +01:00
parent 9b1d6e335d
commit a7aca2fdba
7 changed files with 66 additions and 0 deletions

View File

@ -0,0 +1,8 @@
---
- name: Converge
hosts: all
gather_facts: false
tasks:
- name: Replace this task with one that validates your content
ansible.builtin.debug:
msg: "This is the effective test"

View File

@ -0,0 +1,34 @@
---
dependency:
name: galaxy
options:
requirements-file: ./requirements.yml
driver:
name: vagrant
provider:
name: libvirt
platforms:
- name: instance
box: generic/${MOLECULE_TEST_OS}
cpus: 4
memory: 4096
provisioner:
name: ansible
config_options:
defaults:
remote_tmp: /tmp/.ansible
verifier:
name: ansible
scenario:
name: default_vagrant
test_sequence:
- dependency
- cleanup
- destroy
- create
- prepare
- converge
- idempotence
- verify
- cleanup
- destroy

View File

@ -0,0 +1,10 @@
---
- name: Prepare
hosts: all
become: true
tasks:
- name: "Include ednxzu.install_docker"
ansible.builtin.include_role:
name: ednxzu.install_docker
vars:
install_docker_python_packages: true

View File

@ -0,0 +1,7 @@
---
# requirements file for molecule
roles:
- name: ednxzu.manage_repositories
- name: ednxzu.manage_apt_packages
- name: ednxzu.install_docker
- name: ednxzu.docker_systemd_service

View File

@ -0,0 +1,6 @@
---
- name: Verify
hosts: all
gather_facts: true
become: true
tasks: []

View File

View File

@ -0,0 +1 @@
---