The `config_get_lookup` and `config_get` sources lack flexibility.
It's not easy to query several pillars and/or grains keys with the
actual system. And the query method is forced to `config.get` without
being configurable by the user.
We define a mechanism to select `map.jinja` sources with similar
notation as the salt targeting system.
The `map.jinja` file uses several sources where to lookup parameter
values. The list of sources can be modified by two files:
1. a global salt://parameters/map_jinja.yaml
2. a per formula salt://{{ tplroot }}/parameters/map_jinja.yaml.
Each source definition has the form `<TYPE>:<OPTION>@<KEY>` where
`<TYPE>` can be one of:
- `Y` to load values from YAML files, this is the default when no type
is defined
- `C` to lookup values with `config.get`
- `G` to lookup values with `grains.get`
- `I` to lookup values with `pillar.get`
The YAML type option can define the query method to lookup the key
value to build the file name:
- `C` to query with `config.get`, this is the default when to query
method is defined
- `G` to query with `grains.get`
- `I` to query with `pillar.get`
The `C`, `G` or `I` types can define the `SUB` option to store values
in the sub key `mapdata.<key>` instead of directly in `mapdata`.
Finally, the `<KEY>` describe what to lookup to either build the YAML
filename or gather values using one of the query method.
BREAKING CHANGE: the configuration `map_jinja:sources` is only
configurable with `salt://parameters/map_jinja.yaml`
and `salt://{{ tplroot }}/parameters/map_jinja.yaml`
BREAKING CHANGE: the `map_jinja:config_get_roots` is replaced by
compound like `map_jinja:sources`
BREAKING CHANGE: the two `config_get_lookup` and `config_get` are
replaced by `C@<tplroot>:lookup` and `C@<tplroot>`
sources
# InSpec Profile: `default` This shows the implementation of the `default` InSpec [profile](https://github.com/inspec/inspec/blob/master/docs/profiles.md). ## Verify a profile InSpec ships with built-in features to verify a profile structure. ```bash $ inspec check default Summary ------- Location: default Profile: profile Controls: 4 Timestamp: 2019-06-24T23:09:01+00:00 Valid: true Errors ------ Warnings -------- ``` ## Execute a profile To run all **supported** controls on a local machine use `inspec exec /path/to/profile`. ```bash $ inspec exec default .. Finished in 0.0025 seconds (files took 0.12449 seconds to load) 8 examples, 0 failures ``` ## Execute a specific control from a profile To run one control from the profile use `inspec exec /path/to/profile --controls name`. ```bash $ inspec exec default --controls package . Finished in 0.0025 seconds (files took 0.12449 seconds to load) 1 examples, 0 failures ``` See an [example control here](https://github.com/inspec/inspec/blob/master/examples/profile/controls/example.rb).