Ansible Testing
This Ansible roles purpose is to enable unit and functional testing of Ansible Playbooks. Tests are declared using a simple yaml file.
Features
This role deploys a K3s cluster. In addition it has the following features:
-
Unit Testing
Designed to test the individual components of a playbook.
-
syntax check of all playbooks
-
more planned
-
-
Functional testing
designed to test the functionality of a playbook.
- planned feature
-
Mock Roles
-
Test Artifacts
-
XUnit
xml
test report
Role Workflow
The role workflow is broken down into stages with job_tags
being the method of choosing the stage. The workflows are as follows:
-
Test Setup
-
finds all playbooks
-
finds all roles used in playbooks
-
creates mock roles
-
creates a test fixture
-
-
Unit Testing
-
loads test fixture
-
iterates over all playbooks
- conducts Syntax Check
-
stores results in test artifact
-
-
Functional testing (planned)
-
Report Creation
-
counts passed tests
-
counts failed tests
-
creates XUnit
xml
test report
-
Default Variables
About:
This page forms part of our Project Testing Ansible Role.
Page Metadata
Version: ToDo: place files short git commit hereDate Created: 2023-12-17
Date Edited: 2023-12-20
Contribution:
Would You like to contribute to our Testing Ansible Role project? You can assist in the following ways:
- Edit This Page If there is a mistake or a way you can improve it.
- Add a Page to the Manual if you would like to add an item to our manual
- Raise an Issue if there is something about this page you would like to improve, and git is unfamiliar to you.
ToDo: Add the page list of contributors