Browse Source

Merge branch 'master' into macos

tags/v1.5.0
N 5 years ago
parent
commit
e5317d8c30
No account linked to committer's email address
36 changed files with 502 additions and 310 deletions
  1. +4
    -0
      .gitignore
  2. +10
    -0
      .rubocop.yml
  3. +14
    -0
      .salt-lint
  4. +83
    -58
      .travis.yml
  5. +7
    -1
      .yamllint
  6. +5
    -4
      AUTHORS.md
  7. +110
    -0
      CHANGELOG.md
  8. +1
    -1
      FORMULA
  9. +8
    -3
      Gemfile
  10. +9
    -9
      Vagrantfile
  11. +12
    -9
      bin/kitchen
  12. +3
    -4
      dev/setup-salt.sh
  13. +11
    -8
      docs/AUTHORS.rst
  14. +134
    -0
      docs/CHANGELOG.rst
  15. +0
    -159
      docs/CONTRIBUTING.rst
  16. +1
    -1
      docs/README.rst
  17. +28
    -23
      kitchen.yml
  18. +8
    -0
      pillar.example
  19. +3
    -3
      pre-commit_semantic-release.sh
  20. +1
    -1
      release.config.js
  21. +2
    -1
      salt/formulas.jinja
  22. +7
    -4
      salt/formulas.sls
  23. +3
    -3
      salt/map.jinja
  24. +1
    -1
      salt/syndic.sls
  25. +4
    -2
      test/integration/v201707-py2/controls/pkgs_spec.rb
  26. +4
    -2
      test/integration/v201707-py2/controls/service_spec.rb
  27. +1
    -0
      test/integration/v201707-py2/inspec.yml
  28. +4
    -2
      test/integration/v201803-py2/controls/pkgs_spec.rb
  29. +4
    -2
      test/integration/v201803-py2/controls/service_spec.rb
  30. +1
    -0
      test/integration/v201803-py2/inspec.yml
  31. +4
    -2
      test/integration/v201902-py2/controls/pkgs_spec.rb
  32. +4
    -2
      test/integration/v201902-py2/controls/service_spec.rb
  33. +1
    -0
      test/integration/v201902-py2/inspec.yml
  34. +5
    -3
      test/integration/v201902-py3/controls/pkgs_spec.rb
  35. +4
    -2
      test/integration/v201902-py3/controls/service_spec.rb
  36. +1
    -0
      test/integration/v201902-py3/inspec.yml

+ 4
- 0
.gitignore View File

@@ -120,3 +120,7 @@ docs/*.md
Dockerfile.*_*
ignore/
tmp/

#Vagrant Specific files
.vagrant
top.sls

+ 10
- 0
.rubocop.yml View File

@@ -0,0 +1,10 @@
# -*- coding: utf-8 -*-
# vim: ft=yaml
---
# General overrides used across formulas in the org
Metrics/LineLength:
# Increase from default of `80`
# Based on https://github.com/PyCQA/flake8-bugbear#opinionated-warnings (`B950`)
Max: 88

# Any offenses that should be fixed, e.g. collected via. `rubocop --auto-gen-config`

+ 14
- 0
.salt-lint View File

@@ -0,0 +1,14 @@
# -*- coding: utf-8 -*-
# vim: ft=yaml
---
exclude_paths: []
rules: {}
skip_list:
# Using `salt-lint` for linting other files as well, such as Jinja macros/templates
- 205 # Use ".sls" as a Salt State file extension
# Skipping `207` and `208` because `210` is sufficient, at least for the time-being
# I.e. Allows 3-digit unquoted codes to still be used, such as `644` and `755`
- 207 # File modes should always be encapsulated in quotation marks
- 208 # File modes should always contain a leading zero
tags: []
verbosity: 1

+ 83
- 58
.travis.yml View File

@@ -1,72 +1,95 @@
# -*- coding: utf-8 -*-
# vim: ft=yaml
---
dist: bionic
stages:
- test
- lint
- name: release
if: branch = master AND type != pull_request
## Machine config
os: 'linux'
arch: 'amd64'
dist: 'bionic'
version: '~> 1.0'

sudo: required
cache: bundler
language: ruby
## Language and cache config
language: 'ruby'
cache: 'bundler'

## Services config
services:
- docker

# Make sure the instances listed below match up with
# the `platforms` defined in `kitchen.yml`
env:
matrix:
# The ordering used below has been selected based on the time required in Travis
# The slower ones are kept as high up as possible, to run concurrently rather than
# slow down the entire run at the end (i.e. `centos-6` and `opensuse`)
# However, the groupings needed to be maintained in some semblance of order
# so this is a best-effort matrix, in the circumstances
# - INSTANCE: v201707-py2-debian-8-2017-7-py2
- INSTANCE: v201707-py2-ubuntu-1604-2017-7-py2
- INSTANCE: v201707-py2-centos-6-2017-7-py2
# - INSTANCE: v201707-py2-amazonlinux-2-2017-7-py2
# - INSTANCE: v201803-py2-debian-9-2018-3-py2
# - INSTANCE: v201803-py2-ubuntu-1604-2018-3-py2
- INSTANCE: v201803-py2-centos-7-2018-3-py2
- INSTANCE: v201803-py2-amazonlinux-2-2018-3-py2
- INSTANCE: v201902-py2-debian-9-2019-2-py2
- INSTANCE: v201902-py2-ubuntu-1804-2019-2-py2
# - INSTANCE: v201902-py2-centos-7-2019-2-py2
# - INSTANCE: v201902-py2-opensuse-leap-15-2019-2-py2
# - INSTANCE: v201902-py2-amazonlinux-2-2019-2-py2
# - INSTANCE: v201902-py3-debian-9-2019-2-py3
# - INSTANCE: v201902-py3-ubuntu-1804-2019-2-py3
# - INSTANCE: v201902-py3-centos-7-2019-2-py3
- INSTANCE: v201902-py3-fedora-30-2019-2-py3
- INSTANCE: v201902-py3-opensuse-leap-15-2019-2-py3

## Script to run for the test stage
script:
- bin/kitchen verify ${INSTANCE}
- bin/kitchen verify "${INSTANCE}"

## Stages and jobs matrix
stages:
- test
- name: 'release'
if: 'branch = master AND type != pull_request'
jobs:
include:
# Define the `lint` stage (runs `yamllint` and `commitlint`)
- stage: lint
language: node_js
node_js: lts/*
before_install: skip
## Define the test stage that runs the linters (and testing matrix, if applicable)

# Run all of the linters in a single job
- language: 'node_js'
node_js: 'lts/*'
env: 'Lint'
name: 'Lint: salt-lint, yamllint, rubocop, shellcheck & commitlint'
before_install: 'skip'
script:
# Install and run `salt-lint`
- pip install --user salt-lint
- git ls-files -- '*.sls' '*.jinja' '*.j2' '*.tmpl' '*.tst'
| xargs salt-lint
# Install and run `yamllint`
# Need at least `v1.17.0` for the `yaml-files` setting
- pip install --user yamllint>=1.17.0
- yamllint -s .
# Install and run `rubocop`
- gem install rubocop
- rubocop -d
# Run `shellcheck` (already pre-installed in Travis)
- shellcheck --version
- git ls-files -- '*.sh' '*.bash' '*.ksh'
| xargs shellcheck
# Install and run `commitlint`
- npm install @commitlint/config-conventional -D
- npm install @commitlint/travis-cli -D
- npm i -D @commitlint/config-conventional
@commitlint/travis-cli
- commitlint-travis
# Define the release stage that runs `semantic-release`
- stage: release
language: node_js
node_js: lts/*
before_install: skip

## Define the rest of the matrix based on Kitchen testing
# Make sure the instances listed below match up with
# the `platforms` defined in `kitchen.yml`
# The ordering used below has been selected based on the time required in Travis
# The slower ones are kept as high up as possible, to run concurrently rather than
# slow down the entire run at the end (i.e. `centos-6` and `opensuse`)
# However, the groupings needed to be maintained in some semblance of order
# so this is a best-effort matrix, in the circumstances
# - env: INSTANCE=v201707-py2-debian-8-2017-7-py2
- env: INSTANCE=v201707-py2-ubuntu-1604-2017-7-py2
- env: INSTANCE=v201707-py2-centos-6-2017-7-py2
# - env: INSTANCE=v201707-py2-amazonlinux-2-2017-7-py2
# - env: INSTANCE=v201707-py2-arch-base-latest-2017-7-py2
- env: INSTANCE=v201803-py2-debian-9-2018-3-py2
# - env: INSTANCE=v201803-py2-ubuntu-1604-2018-3-py2
- env: INSTANCE=v201803-py2-centos-7-2018-3-py2
# - env: INSTANCE=v201803-py2-amazonlinux-2-2018-3-py2
# - env: INSTANCE=v201803-py2-arch-base-latest-2018-3-py2
- env: INSTANCE=v201902-py2-ubuntu-1804-2019-2-py2
# - env: INSTANCE=v201902-py2-centos-7-2019-2-py2
- env: INSTANCE=v201902-py2-amazonlinux-2-2019-2-py2
# - env: INSTANCE=v201902-py2-arch-base-latest-2019-2-py2
- env: INSTANCE=v201902-py3-debian-10-2019-2-py3
# - env: INSTANCE=v201902-py3-debian-9-2019-2-py3
# - env: INSTANCE=v201902-py3-ubuntu-1804-2019-2-py3
# - env: INSTANCE=v201902-py3-centos-8-2019-2-py3
- env: INSTANCE=v201902-py3-opensuse-leap-151-2019-2-py3

## Define the release stage that runs `semantic-release`
- stage: 'release'
language: 'node_js'
node_js: 'lts/*'
env: 'Release'
name: 'Run semantic-release inc. file updates to AUTHORS, CHANGELOG & FORMULA'
before_install: 'skip'
script:
# Update `AUTHORS.md`
- export MAINTAINER_TOKEN=${GH_TOKEN}
@@ -74,12 +97,14 @@ jobs:
- maintainer contributor

# Install all dependencies required for `semantic-release`
- npm install @semantic-release/changelog@3 -D
- npm install @semantic-release/exec@3 -D
- npm install @semantic-release/git@7 -D
- npm i -D @semantic-release/changelog@3
@semantic-release/exec@3
@semantic-release/git@7
deploy:
provider: script
skip_cleanup: true
script:
# Run `semantic-release`
- npx semantic-release@15
provider: 'script'
# Opt-in to `dpl v2` to complete the Travis build config validation (beta)
# * https://docs.travis-ci.com/user/build-config-validation
# Deprecated `skip_cleanup` can now be avoided, `cleanup: false` is by default
edge: true
# Run `semantic-release`
script: 'npx semantic-release@15.14'

+ 7
- 1
.yamllint View File

@@ -7,10 +7,12 @@ extends: default
# Files to ignore completely
# 1. All YAML files under directory `node_modules/`, introduced during the Travis run
# 2. Any SLS files under directory `test/`, which are actually state files
# 3. All YAML files heavily reliant on Jinja; these can be tackled in a subsequent PR
# 3. Any YAML files under directory `.kitchen/`, introduced during local testing
# 4. All YAML files heavily reliant on Jinja; these can be tackled in a subsequent PR
ignore: |
node_modules/
test/**/states/**/*.sls
.kitchen/
salt/osfamilymap.yaml
salt/osmap.yaml

@@ -18,6 +20,7 @@ yaml-files:
# Default settings
- '*.yaml'
- '*.yml'
- .salt-lint
- .yamllint
# SaltStack Formulas additional settings
- '*.example'
@@ -31,3 +34,6 @@ rules:
# Increase from default of `80`
# Based on https://github.com/PyCQA/flake8-bugbear#opinionated-warnings (`B950`)
max: 88
octal-values:
forbid-implicit-octal: true
forbid-explicit-octal: true

+ 5
- 4
AUTHORS.md View File

@@ -4,10 +4,10 @@ This list is sorted by the number of commits per contributor in _descending_ ord

Avatar|Contributor|Contributions
:-:|---|:-:
<img class='float-left rounded-1' src='https://avatars0.githubusercontent.com/u/1800660?v=4' width='36' height='36' alt='@aboe76'>|[@aboe76](https://github.com/aboe76)|98
<img class='float-left rounded-1' src='https://avatars0.githubusercontent.com/u/1800660?v=4' width='36' height='36' alt='@aboe76'>|[@aboe76](https://github.com/aboe76)|100
<img class='float-left rounded-1' src='https://avatars2.githubusercontent.com/u/1396878?v=4' width='36' height='36' alt='@gravyboat'>|[@gravyboat](https://github.com/gravyboat)|71
<img class='float-left rounded-1' src='https://avatars2.githubusercontent.com/u/10231489?v=4' width='36' height='36' alt='@myii'>|[@myii](https://github.com/myii)|66
<img class='float-left rounded-1' src='https://avatars0.githubusercontent.com/u/3374962?v=4' width='36' height='36' alt='@nmadhok'>|[@nmadhok](https://github.com/nmadhok)|54
<img class='float-left rounded-1' src='https://avatars2.githubusercontent.com/u/10231489?v=4' width='36' height='36' alt='@myii'>|[@myii](https://github.com/myii)|31
<img class='float-left rounded-1' src='https://avatars1.githubusercontent.com/u/20441?v=4' width='36' height='36' alt='@iggy'>|[@iggy](https://github.com/iggy)|22
<img class='float-left rounded-1' src='https://avatars1.githubusercontent.com/u/528061?v=4' width='36' height='36' alt='@puneetk'>|[@puneetk](https://github.com/puneetk)|21
<img class='float-left rounded-1' src='https://avatars2.githubusercontent.com/u/242396?v=4' width='36' height='36' alt='@javierbertoli'>|[@javierbertoli](https://github.com/javierbertoli)|20
@@ -32,11 +32,11 @@ Avatar|Contributor|Contributions
<img class='float-left rounded-1' src='https://avatars0.githubusercontent.com/u/745513?v=4' width='36' height='36' alt='@EvaSDK'>|[@EvaSDK](https://github.com/EvaSDK)|4
<img class='float-left rounded-1' src='https://avatars2.githubusercontent.com/u/41886?v=4' width='36' height='36' alt='@jbouse'>|[@jbouse](https://github.com/jbouse)|4
<img class='float-left rounded-1' src='https://avatars3.githubusercontent.com/u/48949?v=4' width='36' height='36' alt='@tampakrap'>|[@tampakrap](https://github.com/tampakrap)|4
<img class='float-left rounded-1' src='https://avatars2.githubusercontent.com/u/31497?v=4' width='36' height='36' alt='@MSeven'>|[@MSeven](https://github.com/MSeven)|4
<img class='float-left rounded-1' src='https://avatars2.githubusercontent.com/u/4195158?v=4' width='36' height='36' alt='@dafyddj'>|[@dafyddj](https://github.com/dafyddj)|3
<img class='float-left rounded-1' src='https://avatars3.githubusercontent.com/u/652532?v=4' width='36' height='36' alt='@jcftang'>|[@jcftang](https://github.com/jcftang)|3
<img class='float-left rounded-1' src='https://avatars1.githubusercontent.com/u/830800?v=4' width='36' height='36' alt='@johtso'>|[@johtso](https://github.com/johtso)|3
<img class='float-left rounded-1' src='https://avatars3.githubusercontent.com/u/90042?v=4' width='36' height='36' alt='@kev009'>|[@kev009](https://github.com/kev009)|3
<img class='float-left rounded-1' src='https://avatars2.githubusercontent.com/u/31497?v=4' width='36' height='36' alt='@MSeven'>|[@MSeven](https://github.com/MSeven)|3
<img class='float-left rounded-1' src='https://avatars2.githubusercontent.com/u/299386?v=4' width='36' height='36' alt='@excavador'>|[@excavador](https://github.com/excavador)|3
<img class='float-left rounded-1' src='https://avatars0.githubusercontent.com/u/21147643?v=4' width='36' height='36' alt='@vquiering'>|[@vquiering](https://github.com/vquiering)|3
<img class='float-left rounded-1' src='https://avatars2.githubusercontent.com/u/2377054?v=4' width='36' height='36' alt='@smlloyd'>|[@smlloyd](https://github.com/smlloyd)|3
@@ -101,9 +101,10 @@ Avatar|Contributor|Contributions
<img class='float-left rounded-1' src='https://avatars3.githubusercontent.com/u/94636?v=4' width='36' height='36' alt='@jpic'>|[@jpic](https://github.com/jpic)|1
<img class='float-left rounded-1' src='https://avatars1.githubusercontent.com/u/6826176?v=4' width='36' height='36' alt='@kabakaev'>|[@kabakaev](https://github.com/kabakaev)|1
<img class='float-left rounded-1' src='https://avatars3.githubusercontent.com/u/1610361?v=4' width='36' height='36' alt='@mechleg'>|[@mechleg](https://github.com/mechleg)|1
<img class='float-left rounded-1' src='https://avatars0.githubusercontent.com/u/46799934?v=4' width='36' height='36' alt='@sticky-note'>|[@sticky-note](https://github.com/sticky-note)|1
<img class='float-left rounded-1' src='https://avatars1.githubusercontent.com/u/2089076?v=4' width='36' height='36' alt='@ze42'>|[@ze42](https://github.com/ze42)|1
<img class='float-left rounded-1' src='https://avatars1.githubusercontent.com/u/542613?v=4' width='36' height='36' alt='@bersace'>|[@bersace](https://github.com/bersace)|1

---

Auto-generated by a [forked version](https://github.com/myii/maintainer) of [gaocegege/maintainer](https://github.com/gaocegege/maintainer) on 2019-09-25.
Auto-generated by a [forked version](https://github.com/myii/maintainer) of [gaocegege/maintainer](https://github.com/gaocegege/maintainer) on 2019-12-19.

+ 110
- 0
CHANGELOG.md View File

@@ -1,5 +1,115 @@
# Changelog

# [1.1.0](https://github.com/saltstack-formulas/salt-formula/compare/v1.0.0...v1.1.0) (2019-12-19)


### Features

* **formulas:** git.latest parallelization ([eda88bd](https://github.com/saltstack-formulas/salt-formula/commit/eda88bd1a684c8d462e12db31fb29cbccdf67a3d))

# [1.0.0](https://github.com/saltstack-formulas/salt-formula/compare/v0.59.9...v1.0.0) (2019-12-16)


### Continuous Integration

* **gemfile:** restrict `train` gem version until upstream fix [skip ci] ([fdc60ae](https://github.com/saltstack-formulas/salt-formula/commit/fdc60aed86c4b5d016aff0745584d89f614208fc))


### Features

* **per-formula-opts:** configure git.latest state per formula ([82c840d](https://github.com/saltstack-formulas/salt-formula/commit/82c840d6f96f69223c0df4b8463a072613a9d2df))
* **per-formula-opts:** configure git.latest state per formula ([9362277](https://github.com/saltstack-formulas/salt-formula/commit/9362277f2a61762b818dc775b30f15f93733efd5))


### BREAKING CHANGES

* **per-formula-opts:** Potential adverse affect on running `salt.formulas` with multiple envs

## [0.59.9](https://github.com/saltstack-formulas/salt-formula/compare/v0.59.8...v0.59.9) (2019-12-03)


### Tests

* **pkgs_spec:** update for new `opensuse` package ([6da3d0d](https://github.com/saltstack-formulas/salt-formula/commit/6da3d0d9350bb6083f14073ee176fbd56fbad5ee)), closes [/travis-ci.com/saltstack-formulas/salt-formula/jobs/261961203#L1619-L1632](https://github.com//travis-ci.com/saltstack-formulas/salt-formula/jobs/261961203/issues/L1619-L1632)

## [0.59.8](https://github.com/saltstack-formulas/salt-formula/compare/v0.59.7...v0.59.8) (2019-11-28)


### Bug Fixes

* **release.config.js:** use full commit hash in commit link [skip ci] ([67e1109](https://github.com/saltstack-formulas/salt-formula/commit/67e110973b9ddde1ea07889e8e40de97e29c96db))
* **shellcheck:** fix shellcheck error ([cc31514](https://github.com/saltstack-formulas/salt-formula/commit/cc3151436cecc921c992c6b520ad951bbd0f867f))


### Continuous Integration

* **travis:** apply changes from build config validation [skip ci] ([56c2eb5](https://github.com/saltstack-formulas/salt-formula/commit/56c2eb536709ff4b07413656b08a502954e15f97))
* **travis:** opt-in to `dpl v2` to complete build config validation [skip ci] ([33f69cf](https://github.com/saltstack-formulas/salt-formula/commit/33f69cfb7bd462230547d2cbe91474aeccb91975))
* **travis:** quote pathspecs used with `git ls-files` [skip ci] ([1a27b0a](https://github.com/saltstack-formulas/salt-formula/commit/1a27b0ae84a7433120fd82a644d7bfd02da18a40))
* **travis:** run `shellcheck` during lint job [skip ci] ([f4e8ae6](https://github.com/saltstack-formulas/salt-formula/commit/f4e8ae6871d9788f4b57fabd6e5962a44bf6982c))
* **travis:** use build config validation (beta) [skip ci] ([85593f5](https://github.com/saltstack-formulas/salt-formula/commit/85593f555e95928cfd0bafdc01ca4445baddd194))


### Performance Improvements

* **travis:** improve `salt-lint` invocation [skip ci] ([ef7e1c1](https://github.com/saltstack-formulas/salt-formula/commit/ef7e1c1e7b8eb97fcb859a85d919d78f553f82ed))

## [0.59.7](https://github.com/saltstack-formulas/salt-formula/compare/v0.59.6...v0.59.7) (2019-10-29)


### Continuous Integration

* **kitchen+travis:** upgrade matrix after `2019.2.2` release ([](https://github.com/saltstack-formulas/salt-formula/commit/b6e3a83))
* **travis:** update `salt-lint` config for `v0.0.10` [skip ci] ([](https://github.com/saltstack-formulas/salt-formula/commit/4cbf0b2))


### Documentation

* **contributing:** remove to use org-level file instead [skip ci] ([](https://github.com/saltstack-formulas/salt-formula/commit/78d0fee))
* **readme:** update link to `CONTRIBUTING` [skip ci] ([](https://github.com/saltstack-formulas/salt-formula/commit/924817b))


### Tests

* **pkgs_spec:** update for `2019.2.2` release ([](https://github.com/saltstack-formulas/salt-formula/commit/acbc238))

## [0.59.6](https://github.com/saltstack-formulas/salt-formula/compare/v0.59.5...v0.59.6) (2019-10-11)


### Tests

* **pkgs_spec:** reset version from `2019.2.1` back to `2019.2.0` ([](https://github.com/saltstack-formulas/salt-formula/commit/4787ce7))

## [0.59.5](https://github.com/saltstack-formulas/salt-formula/compare/v0.59.4...v0.59.5) (2019-10-11)


### Bug Fixes

* **rubocop:** add fixes using `rubocop --safe-auto-correct` ([](https://github.com/saltstack-formulas/salt-formula/commit/62f82a4))


### Continuous Integration

* merge travis matrix, add `salt-lint` & `rubocop` to `lint` job ([](https://github.com/saltstack-formulas/salt-formula/commit/64c6ba9))
* **travis:** merge `rubocop` linter into main `lint` job ([](https://github.com/saltstack-formulas/salt-formula/commit/4ea85e8))

## [0.59.4](https://github.com/saltstack-formulas/salt-formula/compare/v0.59.3...v0.59.4) (2019-10-10)


### Bug Fixes

* **map.jinja:** fix `salt-lint` errors ([](https://github.com/saltstack-formulas/salt-formula/commit/5b348eb))
* **minion.sls:** fix `salt-lint` errors ([](https://github.com/saltstack-formulas/salt-formula/commit/3e63977))
* **syndic.sls:** fix `salt-lint` errors ([](https://github.com/saltstack-formulas/salt-formula/commit/ef4ad1e))


### Continuous Integration

* **kitchen:** install required packages to bootstrapped `opensuse` [skip ci] ([](https://github.com/saltstack-formulas/salt-formula/commit/8cc5952))
* **kitchen:** use bootstrapped `opensuse` images until `2019.2.2` [skip ci] ([](https://github.com/saltstack-formulas/salt-formula/commit/0c5eb7e))
* **platform:** add `arch-base-latest` (commented out for now) [skip ci] ([](https://github.com/saltstack-formulas/salt-formula/commit/8f36788))
* merge travis matrix, add `salt-lint` & `rubocop` to `lint` job ([](https://github.com/saltstack-formulas/salt-formula/commit/e815eaa))

## [0.59.3](https://github.com/saltstack-formulas/salt-formula/compare/v0.59.2...v0.59.3) (2019-09-25)



+ 1
- 1
FORMULA View File

@@ -1,7 +1,7 @@
name: salt
os: Debian, Redhat, Suse, Arch, Gentoo, FreeBSD, Windows
os_family: Debian, Redhat, Suse, Arch, Gentoo, FreeBSD, Windows
version: 0.59.3
version: 1.1.0
release: 1
minimum_version: 2015.8
summary: Formula for install Saltstack

+ 8
- 3
Gemfile View File

@@ -1,6 +1,11 @@
source "https://rubygems.org"
# frozen_string_literal: true

source 'https://rubygems.org'

gem 'kitchen-docker', '>= 2.9'
gem 'kitchen-salt', '>= 0.6.0'
gem 'kitchen-inspec', '>= 1.1'

gem 'kitchen-salt', '>= 0.6.0'
# Latest versions of `train` cause failure when running `kitchen verify`
# Downgrading to `3.2.0` until this is fixed upstream
# https://github.com/inspec/train/pull/544#issuecomment-566055052
gem 'train', '3.2.0'

+ 9
- 9
Vagrantfile View File

@@ -1,24 +1,24 @@
# frozen_string_literal: true

# -*- mode: ruby -*-
# vi: set ft=ruby :

# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
VAGRANTFILE_API_VERSION = '2'

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.hostname = "salt"
config.vm.synced_folder "./", "/srv/salt", id: "vagrant-root"
config.vm.box = 'bento/ubuntu-18.04'
config.vm.hostname = 'salt'
config.vm.synced_folder './', '/srv/salt', id: 'vagrant-root'

config.ssh.forward_agent = true

config.vm.provider :virtualbox do |vb|
# Use VBoxManage to customize the VM. For example to change memory:
vb.customize ["modifyvm", :id, "--memory", "1024"]
end
if Vagrant.has_plugin?("vagrant-cachier")
config.cache.scope = :box
vb.customize ['modifyvm', :id, '--memory', '1024']
end
config.cache.scope = :box if Vagrant.has_plugin?('vagrant-cachier')

# Set up salt-master and minion
config.vm.provision "shell", path: "dev/setup-salt.sh"
config.vm.provision 'shell', path: 'dev/setup-salt.sh'
end

+ 12
- 9
bin/kitchen View File

@@ -8,22 +8,25 @@
# this file is here to facilitate running it.
#

require "pathname"
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
Pathname.new(__FILE__).realpath)
require 'pathname'
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile',
Pathname.new(__FILE__).realpath)

bundle_binstub = File.expand_path("../bundle", __FILE__)
bundle_binstub = File.expand_path('bundle', __dir__)

if File.file?(bundle_binstub)
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
load(bundle_binstub)
else
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
abort(
'Your `bin/bundle` was not generated by Bundler, '\
'so this binstub cannot run. Replace `bin/bundle` by running '\
'`bundle binstubs bundler --force`, then run this command again.'
)
end
end

require "rubygems"
require "bundler/setup"
require 'rubygems'
require 'bundler/setup'

load Gem.bin_path("test-kitchen", "kitchen")
load Gem.bin_path('test-kitchen', 'kitchen')

+ 3
- 4
dev/setup-salt.sh View File

@@ -1,8 +1,7 @@
#!/bin/sh

# use the latest stable Salt from repo.saltstack.com
wget -O - https://repo.saltstack.com/apt/ubuntu/14.04/amd64/latest/SALTSTACK-GPG-KEY.pub | sudo apt-key add -
sudo echo 'deb http://repo.saltstack.com/apt/ubuntu/14.04/amd64/latest trusty main' > /etc/apt/sources.list.d/saltstack.list
curl -o bootstrap-salt.sh -L https://bootstrap.saltstack.com
sudo sh bootstrap-salt.sh stable

sudo apt-get update -y
sudo apt-get install salt-master -y
@@ -13,6 +12,6 @@ sudo ln -s /srv/salt/pillar.example /srv/pillar/salt.sls
sudo ln -s /srv/salt/dev/pillar_top.sls /srv/pillar/top.sls
# this file will be copied to make a running config. it should not be checked in.
sudo cp /srv/salt/dev/state_top.sls /srv/salt/top.sls
# Accept all keys#
sleep 15 #give the minion a few seconds to register
# Accept all keys#
sudo salt-key -y -A

+ 11
- 8
docs/AUTHORS.rst View File

@@ -15,16 +15,16 @@ This list is sorted by the number of commits per contributor in *descending* ord
- Contributions
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars0.githubusercontent.com/u/1800660?v=4' width='36' height='36' alt='@aboe76'>`
- `@aboe76 <https://github.com/aboe76>`_
- 98
- 100
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars2.githubusercontent.com/u/1396878?v=4' width='36' height='36' alt='@gravyboat'>`
- `@gravyboat <https://github.com/gravyboat>`_
- 71
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars2.githubusercontent.com/u/10231489?v=4' width='36' height='36' alt='@myii'>`
- `@myii <https://github.com/myii>`_
- 66
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars0.githubusercontent.com/u/3374962?v=4' width='36' height='36' alt='@nmadhok'>`
- `@nmadhok <https://github.com/nmadhok>`_
- 54
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars2.githubusercontent.com/u/10231489?v=4' width='36' height='36' alt='@myii'>`
- `@myii <https://github.com/myii>`_
- 31
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars1.githubusercontent.com/u/20441?v=4' width='36' height='36' alt='@iggy'>`
- `@iggy <https://github.com/iggy>`_
- 22
@@ -97,6 +97,9 @@ This list is sorted by the number of commits per contributor in *descending* ord
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars3.githubusercontent.com/u/48949?v=4' width='36' height='36' alt='@tampakrap'>`
- `@tampakrap <https://github.com/tampakrap>`_
- 4
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars2.githubusercontent.com/u/31497?v=4' width='36' height='36' alt='@MSeven'>`
- `@MSeven <https://github.com/MSeven>`_
- 4
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars2.githubusercontent.com/u/4195158?v=4' width='36' height='36' alt='@dafyddj'>`
- `@dafyddj <https://github.com/dafyddj>`_
- 3
@@ -109,9 +112,6 @@ This list is sorted by the number of commits per contributor in *descending* ord
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars3.githubusercontent.com/u/90042?v=4' width='36' height='36' alt='@kev009'>`
- `@kev009 <https://github.com/kev009>`_
- 3
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars2.githubusercontent.com/u/31497?v=4' width='36' height='36' alt='@MSeven'>`
- `@MSeven <https://github.com/MSeven>`_
- 3
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars2.githubusercontent.com/u/299386?v=4' width='36' height='36' alt='@excavador'>`
- `@excavador <https://github.com/excavador>`_
- 3
@@ -304,6 +304,9 @@ This list is sorted by the number of commits per contributor in *descending* ord
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars3.githubusercontent.com/u/1610361?v=4' width='36' height='36' alt='@mechleg'>`
- `@mechleg <https://github.com/mechleg>`_
- 1
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars0.githubusercontent.com/u/46799934?v=4' width='36' height='36' alt='@sticky-note'>`
- `@sticky-note <https://github.com/sticky-note>`_
- 1
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars1.githubusercontent.com/u/2089076?v=4' width='36' height='36' alt='@ze42'>`
- `@ze42 <https://github.com/ze42>`_
- 1
@@ -314,4 +317,4 @@ This list is sorted by the number of commits per contributor in *descending* ord

----

Auto-generated by a `forked version <https://github.com/myii/maintainer>`_ of `gaocegege/maintainer <https://github.com/gaocegege/maintainer>`_ on 2019-09-25.
Auto-generated by a `forked version <https://github.com/myii/maintainer>`_ of `gaocegege/maintainer <https://github.com/gaocegege/maintainer>`_ on 2019-12-19.

+ 134
- 0
docs/CHANGELOG.rst View File

@@ -2,6 +2,140 @@
Changelog
=========

`1.1.0 <https://github.com/saltstack-formulas/salt-formula/compare/v1.0.0...v1.1.0>`_ (2019-12-19)
------------------------------------------------------------------------------------------------------

Features
^^^^^^^^


* **formulas:** git.latest parallelization (\ `eda88bd <https://github.com/saltstack-formulas/salt-formula/commit/eda88bd1a684c8d462e12db31fb29cbccdf67a3d>`_\ )

`1.0.0 <https://github.com/saltstack-formulas/salt-formula/compare/v0.59.9...v1.0.0>`_ (2019-12-16)
-------------------------------------------------------------------------------------------------------

Continuous Integration
^^^^^^^^^^^^^^^^^^^^^^


* **gemfile:** restrict ``train`` gem version until upstream fix [skip ci] (\ `fdc60ae <https://github.com/saltstack-formulas/salt-formula/commit/fdc60aed86c4b5d016aff0745584d89f614208fc>`_\ )

Features
^^^^^^^^


* **per-formula-opts:** configure git.latest state per formula (\ `82c840d <https://github.com/saltstack-formulas/salt-formula/commit/82c840d6f96f69223c0df4b8463a072613a9d2df>`_\ )
* **per-formula-opts:** configure git.latest state per formula (\ `9362277 <https://github.com/saltstack-formulas/salt-formula/commit/9362277f2a61762b818dc775b30f15f93733efd5>`_\ )

BREAKING CHANGES
^^^^^^^^^^^^^^^^


* **per-formula-opts:** Potential adverse affect on running ``salt.formulas`` with multiple envs

`0.59.9 <https://github.com/saltstack-formulas/salt-formula/compare/v0.59.8...v0.59.9>`_ (2019-12-03)
---------------------------------------------------------------------------------------------------------

Tests
^^^^^


* **pkgs_spec:** update for new ``opensuse`` package (\ `6da3d0d <https://github.com/saltstack-formulas/salt-formula/commit/6da3d0d9350bb6083f14073ee176fbd56fbad5ee>`_\ ), closes `/travis-ci.com/saltstack-formulas/salt-formula/jobs/261961203#L1619-L1632 <https://github.com//travis-ci.com/saltstack-formulas/salt-formula/jobs/261961203/issues/L1619-L1632>`_

`0.59.8 <https://github.com/saltstack-formulas/salt-formula/compare/v0.59.7...v0.59.8>`_ (2019-11-28)
---------------------------------------------------------------------------------------------------------

Bug Fixes
^^^^^^^^^


* **release.config.js:** use full commit hash in commit link [skip ci] (\ `67e1109 <https://github.com/saltstack-formulas/salt-formula/commit/67e110973b9ddde1ea07889e8e40de97e29c96db>`_\ )
* **shellcheck:** fix shellcheck error (\ `cc31514 <https://github.com/saltstack-formulas/salt-formula/commit/cc3151436cecc921c992c6b520ad951bbd0f867f>`_\ )

Continuous Integration
^^^^^^^^^^^^^^^^^^^^^^


* **travis:** apply changes from build config validation [skip ci] (\ `56c2eb5 <https://github.com/saltstack-formulas/salt-formula/commit/56c2eb536709ff4b07413656b08a502954e15f97>`_\ )
* **travis:** opt-in to ``dpl v2`` to complete build config validation [skip ci] (\ `33f69cf <https://github.com/saltstack-formulas/salt-formula/commit/33f69cfb7bd462230547d2cbe91474aeccb91975>`_\ )
* **travis:** quote pathspecs used with ``git ls-files`` [skip ci] (\ `1a27b0a <https://github.com/saltstack-formulas/salt-formula/commit/1a27b0ae84a7433120fd82a644d7bfd02da18a40>`_\ )
* **travis:** run ``shellcheck`` during lint job [skip ci] (\ `f4e8ae6 <https://github.com/saltstack-formulas/salt-formula/commit/f4e8ae6871d9788f4b57fabd6e5962a44bf6982c>`_\ )
* **travis:** use build config validation (beta) [skip ci] (\ `85593f5 <https://github.com/saltstack-formulas/salt-formula/commit/85593f555e95928cfd0bafdc01ca4445baddd194>`_\ )

Performance Improvements
^^^^^^^^^^^^^^^^^^^^^^^^


* **travis:** improve ``salt-lint`` invocation [skip ci] (\ `ef7e1c1 <https://github.com/saltstack-formulas/salt-formula/commit/ef7e1c1e7b8eb97fcb859a85d919d78f553f82ed>`_\ )

`0.59.7 <https://github.com/saltstack-formulas/salt-formula/compare/v0.59.6...v0.59.7>`_ (2019-10-29)
---------------------------------------------------------------------------------------------------------

Continuous Integration
^^^^^^^^^^^^^^^^^^^^^^


* **kitchen+travis:** upgrade matrix after ``2019.2.2`` release (\ ` <https://github.com/saltstack-formulas/salt-formula/commit/b6e3a83>`_\ )
* **travis:** update ``salt-lint`` config for ``v0.0.10`` [skip ci] (\ ` <https://github.com/saltstack-formulas/salt-formula/commit/4cbf0b2>`_\ )

Documentation
^^^^^^^^^^^^^


* **contributing:** remove to use org-level file instead [skip ci] (\ ` <https://github.com/saltstack-formulas/salt-formula/commit/78d0fee>`_\ )
* **readme:** update link to ``CONTRIBUTING`` [skip ci] (\ ` <https://github.com/saltstack-formulas/salt-formula/commit/924817b>`_\ )

Tests
^^^^^


* **pkgs_spec:** update for ``2019.2.2`` release (\ ` <https://github.com/saltstack-formulas/salt-formula/commit/acbc238>`_\ )

`0.59.6 <https://github.com/saltstack-formulas/salt-formula/compare/v0.59.5...v0.59.6>`_ (2019-10-11)
---------------------------------------------------------------------------------------------------------

Tests
^^^^^


* **pkgs_spec:** reset version from ``2019.2.1`` back to ``2019.2.0`` (\ ` <https://github.com/saltstack-formulas/salt-formula/commit/4787ce7>`_\ )

`0.59.5 <https://github.com/saltstack-formulas/salt-formula/compare/v0.59.4...v0.59.5>`_ (2019-10-11)
---------------------------------------------------------------------------------------------------------

Bug Fixes
^^^^^^^^^


* **rubocop:** add fixes using ``rubocop --safe-auto-correct`` (\ ` <https://github.com/saltstack-formulas/salt-formula/commit/62f82a4>`_\ )

Continuous Integration
^^^^^^^^^^^^^^^^^^^^^^


* merge travis matrix, add ``salt-lint`` & ``rubocop`` to ``lint`` job (\ ` <https://github.com/saltstack-formulas/salt-formula/commit/64c6ba9>`_\ )
* **travis:** merge ``rubocop`` linter into main ``lint`` job (\ ` <https://github.com/saltstack-formulas/salt-formula/commit/4ea85e8>`_\ )

`0.59.4 <https://github.com/saltstack-formulas/salt-formula/compare/v0.59.3...v0.59.4>`_ (2019-10-10)
---------------------------------------------------------------------------------------------------------

Bug Fixes
^^^^^^^^^


* **map.jinja:** fix ``salt-lint`` errors (\ ` <https://github.com/saltstack-formulas/salt-formula/commit/5b348eb>`_\ )
* **minion.sls:** fix ``salt-lint`` errors (\ ` <https://github.com/saltstack-formulas/salt-formula/commit/3e63977>`_\ )
* **syndic.sls:** fix ``salt-lint`` errors (\ ` <https://github.com/saltstack-formulas/salt-formula/commit/ef4ad1e>`_\ )

Continuous Integration
^^^^^^^^^^^^^^^^^^^^^^


* **kitchen:** install required packages to bootstrapped ``opensuse`` [skip ci] (\ ` <https://github.com/saltstack-formulas/salt-formula/commit/8cc5952>`_\ )
* **kitchen:** use bootstrapped ``opensuse`` images until ``2019.2.2`` [skip ci] (\ ` <https://github.com/saltstack-formulas/salt-formula/commit/0c5eb7e>`_\ )
* **platform:** add ``arch-base-latest`` (commented out for now) [skip ci] (\ ` <https://github.com/saltstack-formulas/salt-formula/commit/8f36788>`_\ )
* merge travis matrix, add ``salt-lint`` & ``rubocop`` to ``lint`` job (\ ` <https://github.com/saltstack-formulas/salt-formula/commit/e815eaa>`_\ )

`0.59.3 <https://github.com/saltstack-formulas/salt-formula/compare/v0.59.2...v0.59.3>`_ (2019-09-25)
---------------------------------------------------------------------------------------------------------


+ 0
- 159
docs/CONTRIBUTING.rst View File

@@ -1,159 +0,0 @@
.. _contributing:

How to contribute
=================

This document will eventually outline all aspects of guidance to make your contributing experience a fruitful and enjoyable one.
What it already contains is information about *commit message formatting* and how that directly affects the numerous automated processes that are used for this repo.
It also covers how to contribute to this *formula's documentation*.

.. contents:: **Table of Contents**

Overview
--------

Submitting a pull request is more than just code!
To achieve a quality product, the *tests* and *documentation* need to be updated as well.
An excellent pull request will include these in the changes, wherever relevant.

Commit message formatting
-------------------------

Since every type of change requires making Git commits,
we will start by covering the importance of ensuring that all of your commit
messages are in the correct format.

Automation of multiple processes
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

This formula uses `semantic-release <https://github.com/semantic-release/semantic-release>`_ for automating numerous processes such as bumping the version number appropriately, creating new tags/releases and updating the changelog.
The entire process relies on the structure of commit messages to determine the version bump, which is then used for the rest of the automation.

Full details are available in the upstream docs regarding the `Angular Commit Message Conventions <https://github.com/angular/angular.js/blob/master/DEVELOPERS.md#-git-commit-guidelines>`_.
The key factor is that the first line of the commit message must follow this format:

.. code-block::

type(scope): subject


* E.g. ``docs(contributing): add commit message formatting instructions``.

Besides the version bump, the changelog and release notes are formatted accordingly.
So based on the example above:

..

.. raw:: html

<h3>Documentation</h3>

* **contributing:** add commit message formatting instructions


* The ``type`` translates into a ``Documentation`` sub-heading.
* The ``(scope):`` will be shown in bold text without the brackets.
* The ``subject`` follows the ``scope`` as standard text.

Linting commit messages in Travis CI
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

This formula uses `commitlint <https://github.com/conventional-changelog/commitlint>`_ for checking commit messages during CI testing.
This ensures that they are in accordance with the ``semantic-release`` settings.

For more details about the default settings, refer back to the ``commitlint`` `reference rules <https://conventional-changelog.github.io/commitlint/#/reference-rules>`_.

Relationship between commit type and version bump
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

This formula applies some customisations to the defaults, as outlined in the table below,
based upon the `type <https://github.com/angular/angular.js/blob/master/DEVELOPERS.md#type>`_ of the commit:

.. list-table::
:name: commit-type-vs-version-bump
:header-rows: 1
:stub-columns: 0
:widths: 1,2,3,1,1

* - Type
- Heading
- Description
- Bump (default)
- Bump (custom)
* - ``build``
- Build System
- Changes related to the build system
- –
-
* - ``chore``
- –
- Changes to the build process or auxiliary tools and libraries such as
documentation generation
- –
-
* - ``ci``
- Continuous Integration
- Changes to the continuous integration configuration
- –
-
* - ``docs``
- Documentation
- Documentation only changes
- –
- 0.0.1
* - ``feat``
- Features
- A new feature
- 0.1.0
-
* - ``fix``
- Bug Fixes
- A bug fix
- 0.0.1
-
* - ``perf``
- Performance Improvements
- A code change that improves performance
- 0.0.1
-
* - ``refactor``
- Code Refactoring
- A code change that neither fixes a bug nor adds a feature
- –
- 0.0.1
* - ``revert``
- Reverts
- A commit used to revert a previous commit
- –
- 0.0.1
* - ``style``
- Styles
- Changes that do not affect the meaning of the code (white-space,
formatting, missing semi-colons, etc.)
- –
- 0.0.1
* - ``test``
- Tests
- Adding missing or correcting existing tests
- –
- 0.0.1

Use ``BREAKING CHANGE`` to trigger a ``major`` version change
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Adding ``BREAKING CHANGE`` to the footer of the extended description of the commit message will **always** trigger a ``major`` version change, no matter which type has been used.
This will be appended to the changelog and release notes as well.
To preserve good formatting of these notes, the following format is prescribed:

* ``BREAKING CHANGE: <explanation in paragraph format>.``

An example of that:

.. code-block:: git

...

BREAKING CHANGE: With the removal of all of the `.sls` files under
`template package`, this formula no longer supports the installation of
packages.


+ 1
- 1
docs/README.rst View File

@@ -37,7 +37,7 @@ Contributing to this repo

**Commit message formatting is significant!!**

Please see :ref:`How to contribute <CONTRIBUTING>` for more details.
Please see `How to contribute <https://github.com/saltstack-formulas/.github/blob/master/CONTRIBUTING.rst>`_ for more details.

Available states
----------------

+ 28
- 23
kitchen.yml View File

@@ -25,6 +25,10 @@ platforms:
- name: amazonlinux-2-2017-7-py2
driver:
image: netmanagers/salt-2017.7-py2:amazonlinux-2
- name: arch-base-latest-2017-7-py2
driver:
image: netmanagers/salt-2017.7-py2:arch-base-latest
run_command: /usr/lib/systemd/systemd

## SALT `2018.3`
- name: debian-9-2018-3-py2
@@ -39,45 +43,45 @@ platforms:
- name: amazonlinux-2-2018-3-py2
driver:
image: netmanagers/salt-2018.3-py2:amazonlinux-2
- name: arch-base-latest-2018-3-py2
driver:
image: netmanagers/salt-2018.3-py2:arch-base-latest
run_command: /usr/lib/systemd/systemd

## SALT `2019.2`
- name: debian-9-2019-2-py2
driver:
image: netmanagers/salt-2019.2-py2:debian-9
- name: ubuntu-1804-2019-2-py2
driver:
image: netmanagers/salt-2019.2-py2:ubuntu-18.04
- name: centos-7-2019-2-py2
driver:
image: netmanagers/salt-2019.2-py2:centos-7
- name: opensuse-leap-15-2019-2-py2
driver:
image: netmanagers/salt-2019.2-py2:opensuse-leap-15
run_command: /usr/lib/systemd/systemd
# Workaround to avoid intermittent failures on `opensuse-leap-15`:
# => SCP did not finish successfully (255): (Net::SCP::Error)
transport:
max_ssh_sessions: 1
- name: amazonlinux-2-2019-2-py2
driver:
image: netmanagers/salt-2019.2-py2:amazonlinux-2
- name: arch-base-latest-2019-2-py2
driver:
image: netmanagers/salt-2019.2-py2:arch-base-latest
run_command: /usr/lib/systemd/systemd
- name: debian-10-2019-2-py3
driver:
image: netmanagers/salt-2019.2-py3:debian-10
- name: debian-9-2019-2-py3
driver:
image: netmanagers/salt-2019.2-py3:debian-9
- name: ubuntu-1804-2019-2-py3
driver:
image: netmanagers/salt-2019.2-py3:ubuntu-18.04
- name: centos-7-2019-2-py3
- name: centos-8-2019-2-py3
driver:
image: netmanagers/salt-2019.2-py3:centos-7
- name: fedora-30-2019-2-py3
image: netmanagers/salt-2019.2-py3:centos-8
- name: fedora-31-2019-2-py3
driver:
image: netmanagers/salt-2019.2-py3:fedora-30
- name: opensuse-leap-15-2019-2-py3
image: netmanagers/salt-2019.2-py3:fedora-31
- name: opensuse-leap-151-2019-2-py3
driver:
image: netmanagers/salt-2019.2-py3:opensuse-leap-15
image: netmanagers/salt-2019.2-py3:opensuse-leap-15.1
run_command: /usr/lib/systemd/systemd
# Workaround to avoid intermittent failures on `opensuse-leap-15`:
# Workaround to avoid intermittent failures on `opensuse-leap-15.1`:
# => SCP did not finish successfully (255): (Net::SCP::Error)
transport:
max_ssh_sessions: 1
@@ -103,11 +107,11 @@ verifier:
suites:
- name: v201902-py3
includes:
- debian-10-2019-2-py3
- debian-9-2019-2-py3
- ubuntu-1804-2019-2-py3
- centos-7-2019-2-py3
- fedora-30-2019-2-py3
- opensuse-leap-15-2019-2-py3
- centos-8-2019-2-py3
- opensuse-leap-151-2019-2-py3
provisioner:
state_top:
base:
@@ -129,11 +133,10 @@ suites:
- path: test/integration/v201902-py3
- name: v201902-py2
includes:
- debian-9-2019-2-py2
- ubuntu-1804-2019-2-py2
- centos-7-2019-2-py2
- opensuse-leap-15-2019-2-py2
- amazonlinux-2-2019-2-py2
- arch-base-latest-2019-2-py2
provisioner:
state_top:
base:
@@ -159,6 +162,7 @@ suites:
- ubuntu-1604-2018-3-py2
- centos-7-2018-3-py2
- amazonlinux-2-2018-3-py2
- arch-base-latest-2018-3-py2
provisioner:
state_top:
base:
@@ -184,6 +188,7 @@ suites:
- ubuntu-1604-2017-7-py2
- centos-6-2017-7-py2
- amazonlinux-2-2017-7-py2
- arch-base-latest-2017-7-py2
provisioner:
state_top:
base:

+ 8
- 0
pillar.example View File

@@ -424,10 +424,18 @@ salt_formulas:
base:
- salt-formula
- postfix-formula
- nginx-formula: # We can also override some options per formula
rev: 'v1.1.0' # Pin a version
- openssh-formula:
rev: '3e01ad8' # or pin a commit id
dev:
- salt-formula
- postfix-formula
- openssh-formula
- nginx-formula:
# You can also pull from another location
name: 'https://github.com/another-fork-location/salt-formula.git'
rev: 'feat/feature'
# Likewise for the alternative method (single directory, multiple branches)
production:
- salt-formula

+ 3
- 3
pre-commit_semantic-release.sh View File

@@ -14,9 +14,9 @@ sed -i -e "s_^\(version:\).*_\1 ${1}_" FORMULA
sudo -H pip install m2r

# Copy and then convert the `.md` docs
cp *.md docs/
cd docs/
m2r --overwrite *.md
cp ./*.md docs/
cd docs/ || exit
m2r --overwrite ./*.md

# Change excess `H1` headings to `H2` in converted `CHANGELOG.rst`
sed -i -e '/^=.*$/s/=/-/g' CHANGELOG.rst

+ 1
- 1
release.config.js View File

@@ -63,7 +63,7 @@ module.exports = {
}

if (typeof commit.hash === `string`) {
commit.hash = commit.hash.substring(0, 7)
commit.shortHash = commit.hash.substring(0, 7)
}

if (typeof commit.subject === `string`) {

+ 2
- 1
salt/formulas.jinja View File

@@ -25,7 +25,8 @@

{%- macro formulas_roots(env) -%}
{%- set value = [] -%}
{%- for dir in formulas.get(env, []) -%}
{%- for formula in formulas.get(env, []) -%}
{%- set dir = formula | first if formula is mapping else formula %}
{%- set basedir = formulas_git_opt(env, 'basedir')|load_yaml -%}
{%- do value.append('{0}/{1}'.format(basedir, dir)) -%}
{%- endfor -%}

+ 7
- 4
salt/formulas.sls View File

@@ -13,9 +13,11 @@
# Loop over all formulas listed in pillar data
{%- for env, entries in salt['pillar.get']('salt_formulas:list', {}).items() %}
{%- for entry in entries %}
{%- set f_name = entry | first if entry is mapping else entry %}
{%- set f_opts = entry[f_name] if entry is mapping else {} %}

{%- set basedir = formulas_git_opt(env, 'basedir')|load_yaml %}
{%- set gitdir = '{0}/{1}'.format(basedir, entry) %}
{%- set gitdir = '{0}/{1}'.format(basedir, f_name) %}
{%- set update = formulas_git_opt(env, 'update')|load_yaml %}

{%- if formulas_settings.checkout_orig_branch %}
@@ -32,6 +34,7 @@
{%- do processed_basedirs.append(basedir) %}
{{ basedir }}:
file.directory:
- parallel: {{ salt.pkg.version_cmp(grains['saltversion'], '2017.7.0') >= 0 }}
{%- for key, value in salt['pillar.get']('salt_formulas:basedir_opts',
{'makedirs': True}).items() %}
- {{ key }}: {{ value }}
@@ -45,17 +48,17 @@
{%- if gitdir_env not in processed_gitdir_envs %}
{%- do processed_gitdir_envs.append(gitdir_env) %}
{%- set options = formulas_opts_for_git_latest(env)|load_yaml %}
{%- do options.update(f_opts) %}
{%- set baseurl = formulas_git_opt(env, 'baseurl')|load_yaml %}

{{ gitdir_env }}:
git.latest:
- name: {{ baseurl }}/{{ entry }}.git
- name: {{ baseurl }}/{{ f_name }}.git
- parallel: {{ salt.pkg.version_cmp(grains['saltversion'], '2017.7.0') >= 0 }}
- target: {{ gitdir }}
{%- for key, value in options.items() %}
- {{ key }}: {{ value }}
{%- endfor %}
- require:
- file: {{ basedir }}
{%- if not update %}
- unless: test -e {{ gitdir }} >/dev/null 2>&1
{%- endif %}

+ 3
- 3
salt/map.jinja View File

@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
# vim: ft=jinja

{## Start imports ##}
{#- Start imports #}
{% import_yaml "salt/defaults.yaml" as defaults %}
{% import_yaml "salt/osfamilymap.yaml" as osfamilymap %}
{% import_yaml "salt/osmap.yaml" as osmap %}
@@ -18,8 +18,8 @@
{% set lookup = salt['pillar.get']('salt:lookup', default={}, merge=True) %}
{% do salt['defaults.merge'](defaults['salt'], lookup) %}

{## Merge in salt pillar ##}
{#- Merge in salt pillar #}
{% set salt_settings = salt['pillar.get']('salt', default=defaults['salt'], merge=True) %}

{## Merge in salt_formulas pillar ##}
{#- Merge in salt_formulas pillar #}
{% set formulas_settings = salt['pillar.get']('salt_formulas',default=defaults['salt_formulas'], merge=True) %}

+ 1
- 1
salt/syndic.sls View File

@@ -9,7 +9,7 @@ salt-syndic:
- name: {{ salt_settings.salt_syndic }}
{%- if salt_settings.version is defined %}
- version: {{ salt_settings.version }}
{%- endif %}
{%- endif %}
- require_in:
- service: salt-syndic
- watch_in:

+ 4
- 2
test/integration/v201707-py2/controls/pkgs_spec.rb View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true

version =
case platform[:family]
when 'redhat'
@@ -14,10 +16,10 @@ version =
control 'salt packages' do
title 'should be installed'

%w(
%w[
salt-master
salt-minion
).each do |p|
].each do |p|
describe package(p) do
it { should be_installed }
its('version') { should eq version }

+ 4
- 2
test/integration/v201707-py2/controls/service_spec.rb View File

@@ -1,10 +1,12 @@
# frozen_string_literal: true

control 'salt services' do
title 'should be running'

%w(
%w[
salt-master
salt-minion
).each do |p|
].each do |p|
describe service(p) do
it { should be_enabled }
it { should be_running }

+ 1
- 0
test/integration/v201707-py2/inspec.yml View File

@@ -15,3 +15,4 @@ supports:
- platform-name: suse
- platform-name: freebsd
- platform-name: amazon
- platform-name: arch

+ 4
- 2
test/integration/v201803-py2/controls/pkgs_spec.rb View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true

version =
case platform[:family]
when 'redhat'
@@ -9,10 +11,10 @@ version =
control 'salt packages' do
title 'should be installed'

%w(
%w[
salt-master
salt-minion
).each do |p|
].each do |p|
describe package(p) do
it { should be_installed }
its('version') { should eq version }

+ 4
- 2
test/integration/v201803-py2/controls/service_spec.rb View File

@@ -1,10 +1,12 @@
# frozen_string_literal: true

control 'salt services' do
title 'should be running'

%w(
%w[
salt-master
salt-minion
).each do |p|
].each do |p|
describe service(p) do
it { should be_enabled }
it { should be_running }

+ 1
- 0
test/integration/v201803-py2/inspec.yml View File

@@ -15,3 +15,4 @@ supports:
- platform-name: suse
- platform-name: freebsd
- platform-name: amazon
- platform-name: arch

+ 4
- 2
test/integration/v201902-py2/controls/pkgs_spec.rb View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true

version =
case platform[:family]
when 'redhat'
@@ -18,10 +20,10 @@ version =
control 'salt packages' do
title 'should be installed'

%w(
%w[
salt-master
salt-minion
).each do |p|
].each do |p|
describe package(p) do
it { should be_installed }
its('version') { should eq version }

+ 4
- 2
test/integration/v201902-py2/controls/service_spec.rb View File

@@ -1,10 +1,12 @@
# frozen_string_literal: true

control 'salt services' do
title 'should be running'

%w(
%w[
salt-master
salt-minion
).each do |p|
].each do |p|
describe service(p) do
it { should be_enabled }
it { should be_running }

+ 1
- 0
test/integration/v201902-py2/inspec.yml View File

@@ -15,3 +15,4 @@ supports:
- platform-name: suse
- platform-name: freebsd
- platform-name: amazon
- platform-name: arch

+ 5
- 3
test/integration/v201902-py3/controls/pkgs_spec.rb View File

@@ -1,9 +1,11 @@
# frozen_string_literal: true

version =
case platform[:family]
when 'redhat'
case platform[:name]
when 'amazon'
'2019.2.0-1.el7'
'2019.2.2-1.el7'
when 'centos'
'2019.2.1-1.el7'
when 'fedora'
@@ -18,10 +20,10 @@ version =
control 'salt packages' do
title 'should be installed'

%w(
%w[
salt-master
salt-minion
).each do |p|
].each do |p|
describe package(p) do
it { should be_installed }
its('version') { should eq version }

+ 4
- 2
test/integration/v201902-py3/controls/service_spec.rb View File

@@ -1,10 +1,12 @@
# frozen_string_literal: true

control 'salt services' do
title 'should be running'

%w(
%w[
salt-master
salt-minion
).each do |p|
].each do |p|
describe service(p) do
it { should be_enabled }
it { should be_running }

+ 1
- 0
test/integration/v201902-py3/inspec.yml View File

@@ -15,3 +15,4 @@ supports:
- platform-name: suse
- platform-name: freebsd
- platform-name: amazon
- platform-name: arch

Loading…
Cancel
Save