Add noop molecule job to the integrated repo

In order to verify that molecule requirements are satisfied we add a
noop molecule scenario that installs requirements and run a noop
task.

We can expand the scenario in the futute or add new ones, though for
now goal is to ensure that updating requirements is not breaking
other roles having valid scenarios around.

Change-Id: Id0abc217d404af4a08532707e60d738613c9a7ed
This commit is contained in:
Dmitriy Rabotyagov 2025-01-06 11:40:07 +01:00
parent 40866d0367
commit 810bbec590
4 changed files with 54 additions and 0 deletions

View File

@ -0,0 +1,8 @@
---
- name: Noop converge playbook
hosts: localhost
tasks:
- name: Print out hostname
ansible.builtin.debug:
var: inventory_hostname

View File

@ -0,0 +1,28 @@
---
dependency:
name: galaxy
options:
requirements-file: ansible-collection-requirements.yml
force: true
driver:
name: docker
platforms:
- name: "integrated-${MOLECULE_SCENARIO_NAME}"
image: "${DOCKER_REGISTRY:-quay.io/gotmax23}/${DOCKER_IMAGE_TAG:-debian-systemd:bookworm}"
command: ${DOCKER_COMMAND:-""}
pre_build_image: true
privileged: true
systemd: true
provisioner:
name: ansible
lint:
name: ansible-lint
config_options:
defaults:
inject_facts_as_vars: false
scenario:
name: default

17
tox.ini
View File

@ -158,3 +158,20 @@ commands =
{[testenv:ansible-lint]commands}
{[testenv:ansible-syntax]commands}
{[testenv:inventory]commands}
[testenv:molecule]
# You can use DOCKER_REGISTRY and DOCKER_IMAGE_TAG to switch between
# tested distros. I.e:
# DOCKER_IMAGE_TAG=ubuntu-systemd:jammy tox -e molecule
deps =
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-rtest-requirements.txt
commands =
molecule test
passenv =
{[testenv]passenv}
DOCKER_REGISTRY
DOCKER_IMAGE_TAG
DOCKER_COMMAND

View File

@ -24,6 +24,7 @@
- openstack-ansible-deploy-ceph-jobs
- openstack-ansible-deploy-proxy-jobs
- openstack-ansible-deploy-stepca-jobs
- openstack-ansible-molecule
- check-requirements
- publish-openstack-docs-pti
- release-notes-jobs-python3