summaryrefslogtreecommitdiff
path: root/roles/sane_debian_system/subplot.md
diff options
context:
space:
mode:
Diffstat (limited to 'roles/sane_debian_system/subplot.md')
-rw-r--r--roles/sane_debian_system/subplot.md66
1 files changed, 66 insertions, 0 deletions
diff --git a/roles/sane_debian_system/subplot.md b/roles/sane_debian_system/subplot.md
new file mode 100644
index 0000000..be05984
--- /dev/null
+++ b/roles/sane_debian_system/subplot.md
@@ -0,0 +1,66 @@
+# Role `sane_debian_system` – set up a manageable Debian system
+
+This role sets up a Debian system so that it can be managed with
+Ansible in a reasonable way.
+
+## Version history
+
+### Version 2
+
+* `sane_debian_hostname` defaults to the inventory hostname. This
+ means it's not necessary to set it if the default is sufficient.
+
+## Minimally sane Debian system
+
+~~~scenario
+given a host running Debian
+when I use role sane_debian_system
+and I use variables from sane1.yml
+and I run the playbook
+then the host has the sudo package installed
+and the host has the apt-transport-https package installed
+and the host has the locales package installed
+and the host has the systemd-timesyncd package installed
+and the host has an empty /etc/apt/sources.list.d directory
+and the host has hostname saneone
+~~~
+
+~~~{#sane1.yml .file .yaml}
+ansible_python_interpreter: /usr/bin/python3
+
+sane_debian_system_version: 2
+sane_debian_system_codename: bullseye
+sane_debian_system_hostname: saneone
+~~~
+
+## Uses inventory hostname by default
+
+~~~scenario
+given a host running Debian
+when I use role sane_debian_system
+and I use variables from sane-without-hostname.yml
+and I run the playbook
+then the host has the sudo package installed
+and the host has hostname debian-ansible-test
+~~~
+
+~~~{#sane-without-hostname.yml .file .yaml}
+sane_debian_system_version: 2
+
+sane_debian_system_codename: bullseye
+~~~
+
+## Checks that debian codename is set
+
+~~~scenario
+given a host running Debian
+when I use role sane_debian_system
+and I use variables from sane2.yml
+and I try to run the playbook
+then the command fails
+and stdout contains "sane_debian_system_codename"
+~~~
+
+~~~{#sane2.yml .file .yaml}
+sane_debian_system_version: 2
+~~~