| |
@@ -1,6 +1,23 @@
|
| |
# Standard Test Interface Roles
|
| |
|
| |
- This repository contains the shared Ansible roles for the Ansible based Standard Test Interface as described at https://fedoraproject.org/wiki/Changes/InvokingTests
|
| |
+ This repository contains the shared Ansible roles for the Ansible based
|
| |
+ Standard Test Interface as described at
|
| |
+ [InvokingTests](https://fedoraproject.org/wiki/Changes/InvokingTests)
|
| |
+
|
| |
+ # Style suggestions, conceptual approaches
|
| |
+
|
| |
+ * Ansible YAML is not imperative. It does not focuse on describing how a
|
| |
+ program operates. It's a **declarative** syntax, "statement of fact". It's
|
| |
+ far easier to stick any needed logic into scripts, and keep playbooks very
|
| |
+ matter-of-fact, or declarations-of-state.
|
| |
+ * Do all the subject creation by script, before the main testing-related
|
| |
+ play(s) run.
|
| |
+ * Host creation and management logic is kept in inventory and out of playbooks.
|
| |
+ Playbooks need only declare desired idempotent-state from one task to the
|
| |
+ next.
|
| |
+ * No Ansible inventory population during playbook runs. Banning that will cut
|
| |
+ down on the number of failure-modes quite a bit.
|
| |
+ * There is some caution against using role-dependencies.
|
| |
|
| |
# Standard Inventory scripts
|
| |
|
| |
@@ -20,7 +37,9 @@
|
| |
By default, the virtual machine is killed when the process (your shell) it
|
| |
invoked the script, is gone. This behavior may not be desirable when invoking
|
| |
the inventory script from an Ansible playbook (since Ansible spawns a long
|
| |
- hierarchy of processes). For that purpose you can use environment variable `LOCK_ON_FILE`: the VM will be killed once the file specified by this variable is missing. Let's look at an example:
|
| |
+ hierarchy of processes). For that purpose you can use environment variable
|
| |
+ `LOCK_ON_FILE`: the VM will be killed once the file specified by this variable
|
| |
+ is missing. Let's look at an example:
|
| |
|
| |
```yaml
|
| |
---
|
| |
Signed-off-by: Andrei Stepanov astepano@redhat.com