Skip to content
Snippets Groups Projects
Unverified Commit 3e13ceec authored by Marco Emilio "sphakka" Poleggi's avatar Marco Emilio "sphakka" Poleggi
Browse files

More info for the KinD boilerplate

parent e5b76d02
No related branches found
No related tags found
No related merge requests found
......@@ -345,17 +345,17 @@ using plain `http`): `http://<VM-DNS-name-or-IP-address>`. You should see the
homepage showing "nginx, configured by Ansible".
### Task #5: Test Desired State Configuration principles ###
### Task #5: Test the desired state principle ###
**Goal:** test and verify that Ansible implements the principles of Desired
State Configuration.
**Goal:** test and verify that Ansible implements the principles of desired
state and idempotence.
According to this principle, before doing anything, Ansible should establish
the current state of the managed server, compare it to the desired state
expressed in the playbook, and then only perform the actions necessary to
bring the current state to the desired state. In other words, if the managed
system is already in its desired state, nothing will be done (apart from some
notable exception -- see below): that's called "idempotence".
According to the *desired state* principle, before doing anything, Ansible
should establish the current state of the managed server, compare it to the
goals expressed in the playbook, and then only perform the actions necessary
to bring the current state to the desired state. In other words, if the
managed system is already in its desired state, nothing will be done (apart
from some notable exception -- see below): that's called "[idempotence](https://en.wikipedia.org/wiki/Idempotence)".
In its ouput, Ansible marks tasks where it had to perform some action as
*changed* whereas tasks where the actual state already corresponded to the
......@@ -387,7 +387,6 @@ desired state as *ok*.
on.
### Task #6: Adding a handler for nginx restart ###
**Goal:** improve the playbook by restarting nginx only when needed.
......
......@@ -31,9 +31,16 @@
# "metallb-native.yml"), using a block here is recommended!
# - Configuration tasks shall trigger their respective deployments.
# Optional *bonus* auxiliary task for the "rebuild all"
# Checks the existence of a KinD cluster
# - Capture output with "register" and use it as condition with
# "changed_when"
# - Should trigger the creation of the KinD cluster if no cluster is running (even
# if its config hasn't changed)
# Optional *bonus* on-demand tasks:
# [** Mandatory for the groups of 3 **]
# - Rebuild all: manually reprovision the cluster and redeploy the
# application (tip: notify via a signal). This might require an extra
# task that checks the existence of a KinD cluster.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment