* Automated using `ssf-formula` (v0.1.0-rc.1)tags/v0.9.0
.kitchen | .kitchen | ||||
.kitchen.local.yml | .kitchen.local.yml | ||||
kitchen.local.yml | kitchen.local.yml | ||||
junit-*.xml | |||||
# Translations | # Translations | ||||
*.mo | *.mo | ||||
# Vim | # Vim | ||||
*.sw? | *.sw? | ||||
## Collected when centralising formulas (check and sort) | |||||
# `collectd-formula` | |||||
.pytest_cache/ | |||||
/.idea/ | |||||
Dockerfile.*_* | |||||
ignore/ | |||||
tmp/ |
sudo: required | sudo: required | ||||
cache: bundler | cache: bundler | ||||
language: ruby | language: ruby | ||||
dist: xenial | |||||
services: | services: | ||||
- docker | - docker | ||||
# Make sure the instances listed below match up with | # Make sure the instances listed below match up with | ||||
# the `platforms` defined in `kitchen.yml` | # the `platforms` defined in `kitchen.yml` | ||||
# NOTE: Please try to select up to six instances that add some meaningful | |||||
# testing of the formula's behaviour. If possible, try to refrain from | |||||
# the classical "chosing all the instances because I want to test on | |||||
# another/all distro/s" trap: it will just add time to the testing (see | |||||
# the discussion on #121). As an example, the set chosen below covers | |||||
# the most used distros families, systemd and non-systemd and the latest | |||||
# three supported Saltstack versions with python2 and 3." | |||||
# As for `kitchen.yml`, that should still contain all of the platforms, | |||||
# to allow for comprehensive local testing | |||||
# Ref: https://github.com/saltstack-formulas/template-formula/issues/118 | |||||
# Ref: https://github.com/saltstack-formulas/template-formula/issues/121 | |||||
env: | env: | ||||
matrix: | matrix: | ||||
- INSTANCE: repositories-debian-9-develop-py3 | - INSTANCE: repositories-debian-9-develop-py3 | ||||
# - INSTANCE: repositories-ubuntu-1804-develop-py3 | |||||
- INSTANCE: repositories-debian-9-2019-2-py3 | |||||
- INSTANCE: repositories-ubuntu-1804-2019-2-py3 | |||||
- INSTANCE: preferences-debian-9-develop-py3 | - INSTANCE: preferences-debian-9-develop-py3 | ||||
# - INSTANCE: repositories-ubuntu-1804-develop-py3 | |||||
# - INSTANCE: preferences-ubuntu-1804-develop-py3 | # - INSTANCE: preferences-ubuntu-1804-develop-py3 | ||||
- INSTANCE: repositories-debian-9-2019-2-py3 | |||||
- INSTANCE: preferences-debian-9-2019-2-py3 | - INSTANCE: preferences-debian-9-2019-2-py3 | ||||
- INSTANCE: repositories-ubuntu-1804-2019-2-py3 | |||||
- INSTANCE: preferences-ubuntu-1804-2019-2-py3 | - INSTANCE: preferences-ubuntu-1804-2019-2-py3 | ||||
script: | script: | ||||
- bundle exec kitchen verify ${INSTANCE} | |||||
- bin/kitchen verify ${INSTANCE} | |||||
jobs: | jobs: | ||||
include: | include: |
BREAKING CHANGE: With the removal of all of the `.sls` files under | BREAKING CHANGE: With the removal of all of the `.sls` files under | ||||
`template package`, this formula no longer supports the installation of | `template package`, this formula no longer supports the installation of | ||||
packages. | packages. | ||||
- curl -o bootstrap-salt.sh -L https://bootstrap.saltstack.com | - curl -o bootstrap-salt.sh -L https://bootstrap.saltstack.com | ||||
- sh bootstrap-salt.sh -XdPbfrq -x python3 git develop | - sh bootstrap-salt.sh -XdPbfrq -x python3 git develop | ||||
## SALT 2019.2 | |||||
## SALT `2019.2` | |||||
- name: debian-9-2019-2-py3 | - name: debian-9-2019-2-py3 | ||||
driver: | driver: | ||||
image: netmanagers/salt-2019.2-py3:debian-9 | image: netmanagers/salt-2019.2-py3:debian-9 | ||||
salt_copy_filter: | salt_copy_filter: | ||||
- .kitchen | - .kitchen | ||||
- .git | - .git | ||||
pillars: | |||||
top.sls: | |||||
base: | |||||
'*': | |||||
- apt | |||||
verifier: | verifier: | ||||
# https://www.inspec.io/ | # https://www.inspec.io/ | ||||
'*': | '*': | ||||
- apt.repositories | - apt.repositories | ||||
- apt.update | - apt.update | ||||
pillars: | |||||
top.sls: | |||||
base: | |||||
'*': | |||||
- apt | |||||
pillars_from_files: | pillars_from_files: | ||||
apt.sls: test/salt/pillar/repositories.pillar.sls | apt.sls: test/salt/pillar/repositories.pillar.sls | ||||
verifier: | verifier: | ||||
base: | base: | ||||
'*': | '*': | ||||
- apt.preferences | - apt.preferences | ||||
pillars: | |||||
top.sls: | |||||
base: | |||||
'*': | |||||
- apt | |||||
pillars_from_files: | pillars_from_files: | ||||
apt.sls: test/salt/pillar/preferences.pillar.sls | apt.sls: test/salt/pillar/preferences.pillar.sls | ||||
verifier: | verifier: |
# InSpec Profile: `preferences` | |||||
This shows the implementation of the `preferences` 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 preferences | |||||
Summary | |||||
------- | |||||
Location: preferences | |||||
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 preferences | |||||
.. | |||||
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 preferences --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). |
name: preferences | name: preferences | ||||
title: Apt Formula | |||||
maintainer: Saltstack-formulas org | |||||
title: apt formula | |||||
maintainer: SaltStack Formulas | |||||
license: Apache-2.0 | license: Apache-2.0 | ||||
summary: Verify that the apt preferences are configured correctly | summary: Verify that the apt preferences are configured correctly | ||||
supports: | supports: | ||||
- os-name: debian | |||||
- os-name: ubuntu | |||||
- platform-name: debian | |||||
- platform-name: ubuntu |
# InSpec Profile: `repositories` | |||||
This shows the implementation of the `repositories` 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 repositories | |||||
Summary | |||||
------- | |||||
Location: repositories | |||||
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 repositories | |||||
.. | |||||
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 repositories --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). |
name: repositories | name: repositories | ||||
title: Apt Formula | |||||
maintainer: Saltstack-formulas org | |||||
title: apt formula | |||||
maintainer: SaltStack Formulas | |||||
license: Apache-2.0 | license: Apache-2.0 | ||||
summary: Verify that the apt repositories are configured correctly | summary: Verify that the apt repositories are configured correctly | ||||
supports: | supports: | ||||
- os-name: debian | |||||
- os-name: ubuntu | |||||
- platform-name: debian | |||||
- platform-name: ubuntu |