The `system.hostname` return the result of either `hostname -s` or `hostnamectl --static` depending of the availability of each command. The `system.platform` return a hash with tweaked `inspec.platform` values: - `system.platform[:family]` provides a family name for Arch - `system.platform[:name]` modify `amazon` to `amazonlinux` - `system.platform[:release]` tweak for Arch and Amazon Linux: - `Arch` is always `base-later` - `Amazon Linux` release `2018` became `1` - `system.platform[:finger]` is just the concatenation of the name and the first release number (except for Ubuntu which gives `20.04` for example)
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 -sorhostnamectl --staticbased on the availability of each commanssystem.platform: takeinspec.platformand mangle things a bit to be usefulsystem.platform[:family]provides a family name for Archsystem.platform[:name]modifyamazontoamazonlinuxsystem.platform[:release]tweak for Arch and Amazon Linux:Archis alwaysbase-laterAmazon Linuxrelease2018became1
system.platform[:finger]is just the concatenation of the name and the first release number (except for Ubuntu which gives20.04for example)