The following is an example of a YAML file for Goss that checks the availability of Git in a specific version and the Let's Encrypt configuration file:
# We want Git installed on our host
package:
git:
installed: true # we test if the package is installed
versions:
- 1:2.1.4 # and if it matches version 1:2.1.4 (using Debian versioning)
file:
# We want the file /etc/letsencrypt/config/example.com.conf to:
/etc/letsencrypt/config/example.com.conf:
exists: true
filetype: file # be a regular file
owner: letsencrypt # be owned by the letsencrypt user
mode: "0600" # access mode 0600
contains:
- "example.com" # contain the text example.com in the contents
YAML's syntax will probably require the least preparation both to read it and write it. However, if your project already uses Ruby or Python, you may want to stick to Serverspec or Testinfra when it comes to writing more complicated tests.