0eafbd945c
We store validated `map.jinja` dump under the profile `files` directory to access them with `inspec.profile.file('filename')` to validate the content of the generated mapdata file. The YAML files contain a value specific to each minion, its hostname, so we use string format to expand `%{hostname}`. The `default` inspec profile need to depends on `share` to access the `system` and `salt_minion` libraries. |
||
---|---|---|
.. | ||
libraries | ||
inspec.yml | ||
README.md |
InSpec Profile: share
This shows the implementation of the share
InSpec profile.
It’s goal is to share the libraries between all profiles.
Libraries
system
The system
library provides easy access to system
dependents informations:
system.hostname
: return the result ofhostname -s
orhostnamectl --static
based on the availability of each commanssystem.platform
: takeinspec.platform
and mangle things a bit to be usefulsystem.platform[:family]
provides a family name for Archsystem.platform[:name]
modifyamazon
toamazonlinux
system.platform[:release]
tweak for Arch and Amazon Linux:Arch
is alwaysbase-later
Amazon Linux
release2018
became1
system.platform[:finger]
is just the concatenation of the name and the first release number (except for Ubuntu which gives20.04
for example)