From 746ddbc6e17d9ab8238cc4a8e3a348ccb44878b5 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Tue, 8 Sep 2020 12:23:48 +0300 Subject: test: add a subplot to verify the roles work --- subplot.md | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 subplot.md (limited to 'subplot.md') diff --git a/subplot.md b/subplot.md new file mode 100644 index 0000000..ae7fbb0 --- /dev/null +++ b/subplot.md @@ -0,0 +1,53 @@ +# Introduction + +`debian-ansible` is a collection of Ansible roles for managing Debian +systems. The roles are re-usable and parameterised so that they can be +adapted to some variations. + +This document describes the roles and also acts as an acceptance test +suite for them. The [Subplot][] program can generate a test program +based on this document, and the test program tests that the roles work +as intended. + +[Subplot]: https://subplot.liw.fi/ + +## Source files + +At the root of the `debian-ansible` source tree is a `subplot.md`, and +the subdirectory `subplot` with some other files used by the main +file. Each role directory should have a `subplot.md`, and may also +have `subplot.yaml` and `subplot.py`. The files in role directories +get combined with the main ones the the `./check` script. + +## Scenario structure + +Each `subplot.md` file is meant to contain at least one scenario. All +scenarios have the same structure: + +* create a new VM +* construct an Ansible playbook that uses the role in a specific way +* run the playbook against the VM +* examine the VM to verify it has been changed in the expected way + +The VM is created using a base image, which the user must specify to +the test program by setting the `BASEIMAGE` environment variable. + +## Sanity check + +Verify that everything looks OK and that other scenarios can be run. + +~~~scenario +given a host running Debian +then I can run /bin/true on the host +~~~ + + + +--- +title: "debian-ansible—Ansible roles for Debian systems" +author: Lars Wirzenius +bindings: +- subplot.yaml +functions: +- subplot.py +... -- cgit v1.2.1