feat: initial commit
authorJavier Bértoli <javier@netmanagers.com.ar>
Wed, 15 Apr 2020 16:40:59 +0000 (13:40 -0300)
committerJavier Bértoli <javier@netmanagers.com.ar>
Wed, 15 Apr 2020 16:40:59 +0000 (13:40 -0300)
62 files changed:
.gitignore [new file with mode: 0644]
.rubocop.yml [new file with mode: 0644]
.salt-lint [new file with mode: 0644]
.travis.yml [new file with mode: 0644]
.yamllint [new file with mode: 0644]
AUTHORS.md [new file with mode: 0644]
CHANGELOG.md [new file with mode: 0644]
FORMULA [new file with mode: 0644]
Gemfile [new file with mode: 0644]
LICENSE [new file with mode: 0644]
TEMPLATE/clean.sls [new file with mode: 0644]
TEMPLATE/config/clean.sls [new file with mode: 0644]
TEMPLATE/config/file.sls [new file with mode: 0644]
TEMPLATE/config/init.sls [new file with mode: 0644]
TEMPLATE/defaults.yaml [new file with mode: 0644]
TEMPLATE/files/default/example.tmpl [new file with mode: 0644]
TEMPLATE/files/default/example.tmpl.jinja [new file with mode: 0644]
TEMPLATE/init.sls [new file with mode: 0644]
TEMPLATE/libsaltcli.jinja [new file with mode: 0644]
TEMPLATE/libtofs.jinja [new file with mode: 0644]
TEMPLATE/map.jinja [new file with mode: 0644]
TEMPLATE/osarchmap.yaml [new file with mode: 0644]
TEMPLATE/osfamilymap.yaml [new file with mode: 0644]
TEMPLATE/osfingermap.yaml [new file with mode: 0644]
TEMPLATE/osmap.yaml [new file with mode: 0644]
TEMPLATE/package/clean.sls [new file with mode: 0644]
TEMPLATE/package/init.sls [new file with mode: 0644]
TEMPLATE/package/install.sls [new file with mode: 0644]
TEMPLATE/service/clean.sls [new file with mode: 0644]
TEMPLATE/service/init.sls [new file with mode: 0644]
TEMPLATE/service/running.sls [new file with mode: 0644]
TEMPLATE/subcomponent/clean.sls [new file with mode: 0644]
TEMPLATE/subcomponent/config/clean.sls [new file with mode: 0644]
TEMPLATE/subcomponent/config/file.sls [new file with mode: 0644]
TEMPLATE/subcomponent/config/files/default/subcomponent-example.tmpl [new file with mode: 0644]
TEMPLATE/subcomponent/config/files/default/subcomponent-example.tmpl.jinja [new file with mode: 0644]
TEMPLATE/subcomponent/config/init.sls [new file with mode: 0644]
TEMPLATE/subcomponent/init.sls [new file with mode: 0644]
bin/convert-formula.sh [new file with mode: 0755]
bin/kitchen [new file with mode: 0755]
commitlint.config.js [new file with mode: 0644]
docs/AUTHORS.rst [new file with mode: 0644]
docs/CHANGELOG.rst [new file with mode: 0644]
docs/CONTRIBUTING_DOCS.rst [new file with mode: 0644]
docs/README.rst [new file with mode: 0644]
docs/TOFS_pattern.rst [new file with mode: 0644]
docs/_static/css/custom.css [new file with mode: 0644]
docs/conf.py [new file with mode: 0644]
docs/index.rst [new file with mode: 0644]
kitchen.yml [new file with mode: 0644]
pillar.example [new file with mode: 0644]
pre-commit_semantic-release.sh [new file with mode: 0755]
release-rules.js [new file with mode: 0644]
release.config.js [new file with mode: 0644]
test/integration/default/README.md [new file with mode: 0644]
test/integration/default/controls/config_spec.rb [new file with mode: 0644]
test/integration/default/controls/packages_spec.rb [new file with mode: 0644]
test/integration/default/controls/services_spec.rb [new file with mode: 0644]
test/integration/default/controls/subcomponent_config_spec.rb [new file with mode: 0644]
test/integration/default/inspec.yml [new file with mode: 0644]
test/salt/pillar/centos6.sls [new file with mode: 0644]
test/salt/pillar/define_roles.sls [new file with mode: 0644]

diff --git a/.gitignore b/.gitignore
new file mode 100644 (file)
index 0000000..9436b36
--- /dev/null
@@ -0,0 +1,123 @@
+# Byte-compiled / optimized / DLL files
+__pycache__/
+*.py[cod]
+*$py.class
+
+# C extensions
+*.so
+
+# Distribution / packaging
+.Python
+env/
+build/
+develop-eggs/
+dist/
+downloads/
+eggs/
+.eggs/
+lib/
+lib64/
+parts/
+sdist/
+var/
+wheels/
+*.egg-info/
+.installed.cfg
+*.egg
+
+# PyInstaller
+#  Usually these files are written by a python script from a packager
+#  before PyInstaller builds the exe, so as to inject date/other infos into it.
+*.manifest
+*.spec
+
+# Installer logs
+pip-log.txt
+pip-delete-this-directory.txt
+
+# Unit test / coverage reports
+htmlcov/
+.tox/
+.coverage
+.coverage.*
+.cache
+nosetests.xml
+coverage.xml
+*.cover
+.hypothesis/
+.kitchen
+.kitchen.local.yml
+kitchen.local.yml
+junit-*.xml
+
+# Translations
+*.mo
+*.pot
+
+# Django stuff:
+*.log
+local_settings.py
+
+# Flask stuff:
+instance/
+.webassets-cache
+
+# Scrapy stuff:
+.scrapy
+
+# Sphinx documentation
+docs/_build/
+
+# PyBuilder
+target/
+
+# Jupyter Notebook
+.ipynb_checkpoints
+
+# pyenv
+.python-version
+
+# celery beat schedule file
+celerybeat-schedule
+
+# SageMath parsed files
+*.sage.py
+
+# dotenv
+.env
+
+# virtualenv
+.venv
+venv/
+ENV/
+
+# Spyder project settings
+.spyderproject
+.spyproject
+
+# Rope project settings
+.ropeproject
+
+# mkdocs documentation
+/site
+
+# mypy
+.mypy_cache/
+
+# Bundler
+.bundle/
+Gemfile.lock
+
+# copied `.md` files used for conversion to `.rst` using `m2r`
+docs/*.md
+
+# Vim
+*.sw?
+
+## Collected when centralising formulas (check and sort)
+# `collectd-formula`
+.pytest_cache/
+/.idea/
+Dockerfile.*_*
+ignore/
+tmp/
diff --git a/.rubocop.yml b/.rubocop.yml
new file mode 100644 (file)
index 0000000..3b6c0b8
--- /dev/null
@@ -0,0 +1,14 @@
+# -*- coding: utf-8 -*-
+# vim: ft=yaml
+---
+# General overrides used across formulas in the org
+Layout/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`
+# <REMOVEME
+Metrics/BlockLength:
+  Max: 36
+# REMOVEME>
diff --git a/.salt-lint b/.salt-lint
new file mode 100644 (file)
index 0000000..3715677
--- /dev/null
@@ -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
diff --git a/.travis.yml b/.travis.yml
new file mode 100644 (file)
index 0000000..78b60d9
--- /dev/null
@@ -0,0 +1,146 @@
+# -*- coding: utf-8 -*-
+# vim: ft=yaml
+---
+## Machine config
+os: 'linux'
+arch: 'amd64'
+dist: 'bionic'
+version: '~> 1.0'
+
+## Language and cache config
+language: 'ruby'
+cache: 'bundler'
+
+## Services config
+services:
+  - docker
+
+## Script to run for the test stage
+script:
+  - bin/kitchen verify "${INSTANCE}"
+
+## Stages and jobs matrix
+stages:
+  - test
+  - name: 'release'
+    if: 'branch = master AND type != pull_request'
+jobs:
+  include:
+    ## 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 i -D @commitlint/config-conventional
+                   @commitlint/travis-cli
+        - commitlint-travis
+
+    ## 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`
+    # 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: INSTANCE=default-debian-10-master-py3
+    # - env: INSTANCE=default-ubuntu-1804-master-py3
+    - env: INSTANCE=default-centos-8-master-py3
+    # - env: INSTANCE=default-fedora-31-master-py3
+    # - env: INSTANCE=default-opensuse-leap-151-master-py3
+    # - env: INSTANCE=default-amazonlinux-2-master-py3
+    # - env: INSTANCE=default-arch-base-latest-master-py2
+    # - env: INSTANCE=default-debian-10-3000-1-py3
+    - env: INSTANCE=default-ubuntu-1804-3000-1-py3
+    # - env: INSTANCE=default-centos-8-3000-1-py3
+    # - env: INSTANCE=default-fedora-31-3000-1-py3
+    - env: INSTANCE=default-opensuse-leap-151-3000-1-py3
+    - env: INSTANCE=default-amazonlinux-2-3000-1-py3
+    # - env: INSTANCE=default-arch-base-latest-3000-1-py2
+    # - env: INSTANCE=default-debian-10-2019-2-py3
+    # - env: INSTANCE=default-debian-9-2019-2-py3
+    # - env: INSTANCE=default-ubuntu-1804-2019-2-py3
+    # - env: INSTANCE=default-ubuntu-1604-2019-2-py3
+    # - env: INSTANCE=default-centos-8-2019-2-py3
+    # - env: INSTANCE=default-centos-7-2019-2-py3
+    - env: INSTANCE=default-fedora-31-2019-2-py3
+    # - env: INSTANCE=default-opensuse-leap-151-2019-2-py3
+    # - env: INSTANCE=default-amazonlinux-2-2019-2-py3
+    # - env: INSTANCE=default-ubuntu-1804-2019-2-py2
+    # - env: INSTANCE=default-amazonlinux-1-2019-2-py2
+    - env: INSTANCE=default-arch-base-latest-2019-2-py2
+    # - env: INSTANCE=default-centos-7-2018-3-py3
+    # - env: INSTANCE=default-fedora-30-2018-3-py3
+    # - env: INSTANCE=default-debian-9-2018-3-py2
+    # - env: INSTANCE=default-debian-8-2018-3-py2
+    # - env: INSTANCE=default-ubuntu-1804-2018-3-py2
+    # - env: INSTANCE=default-ubuntu-1604-2018-3-py2
+    - env: INSTANCE=centos6-centos-6-2018-3-py2
+    # - env: INSTANCE=default-opensuse-leap-151-2018-3-py2
+    # - env: INSTANCE=default-amazonlinux-1-2018-3-py2
+    # - env: INSTANCE=default-arch-base-latest-2018-3-py2
+    # <REMOVEME
+
+    # Test the conversion of `template-formula` into another formula
+    # ready for development
+    - env: 'Conversion'
+      name: 'Test: bin/convert-formula.sh'
+      script:
+        - git clone . tmp/converted-formula
+        - cd tmp/converted-formula
+        - DEBUG=true bin/convert-formula.sh converted
+        - '[ $(git rev-list HEAD --count) -eq 2 ]'
+        - bin/kitchen verify default-debian-10-2019-2-py3
+    # REMOVEME>
+
+    ## 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}
+        - go get github.com/myii/maintainer
+        - maintainer contributor
+
+        # Install all dependencies required for `semantic-release`
+        - npm i -D @semantic-release/changelog@3
+                   @semantic-release/exec@3
+                   @semantic-release/git@7
+      deploy:
+        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'
diff --git a/.yamllint b/.yamllint
new file mode 100644 (file)
index 0000000..740beca
--- /dev/null
+++ b/.yamllint
@@ -0,0 +1,36 @@
+# -*- coding: utf-8 -*-
+# vim: ft=yaml
+---
+# Extend the `default` configuration provided by `yamllint`
+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. Any YAML files under directory `.kitchen/`, introduced during local testing
+ignore: |
+  node_modules/
+  test/**/states/**/*.sls
+  .kitchen/
+
+yaml-files:
+  # Default settings
+  - '*.yaml'
+  - '*.yml'
+  - .salt-lint
+  - .yamllint
+  # SaltStack Formulas additional settings
+  - '*.example'
+  - test/**/*.sls
+
+rules:
+  empty-values:
+    forbid-in-block-mappings: true
+    forbid-in-flow-mappings: true
+  line-length:
+    # 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
diff --git a/AUTHORS.md b/AUTHORS.md
new file mode 100644 (file)
index 0000000..68b9353
--- /dev/null
@@ -0,0 +1,34 @@
+# Authors
+
+This list is sorted by the number of commits per contributor in _descending_ order.
+
+Avatar|Contributor|Contributions
+:-:|---|:-:
+<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)|255
+<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)|27
+<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)|18
+<img class='float-left rounded-1' src='https://avatars1.githubusercontent.com/u/13322818?v=4' width='36' height='36' alt='@noelmcloughlin'>|[@noelmcloughlin](https://github.com/noelmcloughlin)|11
+<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)|10
+<img class='float-left rounded-1' src='https://avatars3.githubusercontent.com/u/3433835?v=4' width='36' height='36' alt='@n-rodriguez'>|[@n-rodriguez](https://github.com/n-rodriguez)|8
+<img class='float-left rounded-1' src='https://avatars3.githubusercontent.com/u/52996?v=4' width='36' height='36' alt='@daks'>|[@daks](https://github.com/daks)|7
+<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)|6
+<img class='float-left rounded-1' src='https://avatars0.githubusercontent.com/u/1920805?v=4' width='36' height='36' alt='@alxwr'>|[@alxwr](https://github.com/alxwr)|5
+<img class='float-left rounded-1' src='https://avatars0.githubusercontent.com/u/1233212?v=4' width='36' height='36' alt='@baby-gnu'>|[@baby-gnu](https://github.com/baby-gnu)|5
+<img class='float-left rounded-1' src='https://avatars3.githubusercontent.com/u/4542588?v=4' width='36' height='36' alt='@evvers'>|[@evvers](https://github.com/evvers)|4
+<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)|3
+<img class='float-left rounded-1' src='https://avatars0.githubusercontent.com/u/16338056?v=4' width='36' height='36' alt='@vutny'>|[@vutny](https://github.com/vutny)|2
+<img class='float-left rounded-1' src='https://avatars2.githubusercontent.com/u/29522418?v=4' width='36' height='36' alt='@k-hamza'>|[@k-hamza](https://github.com/k-hamza)|2
+<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)|2
+<img class='float-left rounded-1' src='https://avatars1.githubusercontent.com/u/3536289?v=4' width='36' height='36' alt='@andygabby'>|[@andygabby](https://github.com/andygabby)|1
+<img class='float-left rounded-1' src='https://avatars2.githubusercontent.com/u/1269218?v=4' width='36' height='36' alt='@Jokipii'>|[@Jokipii](https://github.com/Jokipii)|1
+<img class='float-left rounded-1' src='https://avatars3.githubusercontent.com/u/5306980?v=4' width='36' height='36' alt='@johnkeates'>|[@johnkeates](https://github.com/johnkeates)|1
+<img class='float-left rounded-1' src='https://avatars2.githubusercontent.com/u/611471?v=4' width='36' height='36' alt='@duk3luk3'>|[@duk3luk3](https://github.com/duk3luk3)|1
+<img class='float-left rounded-1' src='https://avatars3.githubusercontent.com/u/3075069?v=4' width='36' height='36' alt='@marco-m'>|[@marco-m](https://github.com/marco-m)|1
+<img class='float-left rounded-1' src='https://avatars2.githubusercontent.com/u/91293?v=4' width='36' height='36' alt='@whiteinge'>|[@whiteinge](https://github.com/whiteinge)|1
+<img class='float-left rounded-1' src='https://avatars0.githubusercontent.com/u/22272?v=4' width='36' height='36' alt='@sroegner'>|[@sroegner](https://github.com/sroegner)|1
+<img class='float-left rounded-1' src='https://avatars1.githubusercontent.com/u/117961?v=4' width='36' height='36' alt='@babilen5'>|[@babilen5](https://github.com/babilen5)|1
+<img class='float-left rounded-1' src='https://avatars0.githubusercontent.com/u/2205993?v=4' width='36' height='36' alt='@GMAzrael'>|[@GMAzrael](https://github.com/GMAzrael)|1
+
+---
+
+Auto-generated by a [forked version](https://github.com/myii/maintainer) of [gaocegege/maintainer](https://github.com/gaocegege/maintainer) on 2020-04-07.
diff --git a/CHANGELOG.md b/CHANGELOG.md
new file mode 100644 (file)
index 0000000..5147d53
--- /dev/null
@@ -0,0 +1,1104 @@
+# Changelog
+
+## [4.0.6](https://github.com/saltstack-formulas/template-formula/compare/v4.0.5...v4.0.6) (2020-04-07)
+
+
+### Bug Fixes
+
+* **running.sls:** use `watch` not `require` to ensure service restart ([3a1fc35](https://github.com/saltstack-formulas/template-formula/commit/3a1fc35a13f66714cd42583f13679c6f189ae48f))
+
+
+### Code Refactoring
+
+* **libsaltcli:** use the `opts` dict throughout [skip ci] ([69b632f](https://github.com/saltstack-formulas/template-formula/commit/69b632fbe613d4f99a48f59f64ec93c3897431c8))
+
+
+### Continuous Integration
+
+* **kitchen+travis:** adjust matrix to add `3000` & remove `2017.7` [skip ci] ([f81c372](https://github.com/saltstack-formulas/template-formula/commit/f81c372dfe12d42139275fc8c9e7aad1b6eec976))
+* **kitchen+travis:** adjust matrix to update `3000` to `3000.1` [skip ci] ([f48a727](https://github.com/saltstack-formulas/template-formula/commit/f48a7275644d2baef06adb0d8e74b3c19fd2d8a0))
+
+## [4.0.5](https://github.com/saltstack-formulas/template-formula/compare/v4.0.4...v4.0.5) (2020-03-23)
+
+
+### Bug Fixes
+
+* **libtofs:** “files_switch” mess up the variable exported by “map.jinja” [skip ci] ([241646f](https://github.com/saltstack-formulas/template-formula/commit/241646fe96447369df00f17ec1c27a53de08bec4))
+
+
+### Code Refactoring
+
+* **service:** use `systemd-journald` instead of `systemd-udevd` ([a265105](https://github.com/saltstack-formulas/template-formula/commit/a2651058be0d8b09f910aeee2f23703b6cefaa09))
+
+## [4.0.4](https://github.com/saltstack-formulas/template-formula/compare/v4.0.3...v4.0.4) (2020-02-14)
+
+
+### Bug Fixes
+
+* **libtofs:** “files_switch” mess up the variable defined by “map.jinja” ([ab4ce75](https://github.com/saltstack-formulas/template-formula/commit/ab4ce751a4640303af7acbf7a278aef79b530bb6))
+
+
+### Continuous Integration
+
+* **kitchen:** avoid using bootstrap for `master` instances ([6ecdb99](https://github.com/saltstack-formulas/template-formula/commit/6ecdb99f83b807b4679dc6534ae425b97eefbe54))
+
+## [4.0.3](https://github.com/saltstack-formulas/template-formula/compare/v4.0.2...v4.0.3) (2020-01-27)
+
+
+### Bug Fixes
+
+* fix `CentOS Linux-7` and add `os` details from current CI setup ([4be16ca](https://github.com/saltstack-formulas/template-formula/commit/4be16ca4befeddeeb8be1199cd088df7c547523f))
+* **travis:** reinstate conversion test [skip ci] ([5d47fda](https://github.com/saltstack-formulas/template-formula/commit/5d47fda1b9f52bff1a4c2cad5097cd3d8cd43521))
+
+
+### Continuous Integration
+
+* **travis:** use `major.minor` for `semantic-release` version [skip ci] ([e9bfb71](https://github.com/saltstack-formulas/template-formula/commit/e9bfb71fdc0fa80ac63e6ce724f0e5621a4b30ca))
+
+## [4.0.2](https://github.com/saltstack-formulas/template-formula/compare/v4.0.1...v4.0.2) (2019-12-19)
+
+
+### Bug Fixes
+
+* **convert-formula.sh:** remove "Using this template" post-conversion ([55ab937](https://github.com/saltstack-formulas/template-formula/commit/55ab937c047374fce0548d8c18e8513bc15ead78))
+* **convert-formula.sh:** remove `rubocop` override post-conversion ([aca4e44](https://github.com/saltstack-formulas/template-formula/commit/aca4e4428964da745e7b1b7dce15d2c751f76490))
+* **convert-formula.sh:** remove CI test post-conversion ([06ec949](https://github.com/saltstack-formulas/template-formula/commit/06ec949fd17bb4b52bb230a6ad2eddfe08a4e693))
+* **convert-formula.sh:** reset version to `1.0.0` ([39889ce](https://github.com/saltstack-formulas/template-formula/commit/39889ce303cb57125ba0411ab55266ee018d40e1))
+
+
+### Documentation
+
+* **convert-formula.sh:** add usage guide ([539a335](https://github.com/saltstack-formulas/template-formula/commit/539a335f8b01ffb3944b742cc2f5852a718546dd))
+
+## [4.0.1](https://github.com/saltstack-formulas/template-formula/compare/v4.0.0...v4.0.1) (2019-12-17)
+
+
+### Bug Fixes
+
+* **convert-formula.sh:** apply remaining suggestions from [#180](https://github.com/saltstack-formulas/template-formula/issues/180) ([76ecd44](https://github.com/saltstack-formulas/template-formula/commit/76ecd447be66fd9b33ace56836796d3ce24537db)), closes [/github.com/saltstack-formulas/template-formula/pull/180#discussion_r357308821](https://github.com//github.com/saltstack-formulas/template-formula/pull/180/issues/discussion_r357308821) [/github.com/saltstack-formulas/template-formula/pull/180#discussion_r357318860](https://github.com//github.com/saltstack-formulas/template-formula/pull/180/issues/discussion_r357318860) [/github.com/saltstack-formulas/template-formula/pull/180#discussion_r357362707](https://github.com//github.com/saltstack-formulas/template-formula/pull/180/issues/discussion_r357362707)
+
+# [4.0.0](https://github.com/saltstack-formulas/template-formula/compare/v3.3.4...v4.0.0) (2019-12-16)
+
+
+### Code Refactoring
+
+* improve reusability using an unique keyword TEMPLATE ([2e8ded6](https://github.com/saltstack-formulas/template-formula/commit/2e8ded6565f7bad166323792bf42979aac2980fa))
+
+
+### Continuous Integration
+
+* **gemfile:** restrict `train` gem version until upstream fix [skip ci] ([1b6164f](https://github.com/saltstack-formulas/template-formula/commit/1b6164fc4a5bda44e8cb1104039606603dab4c2e))
+* **travis:** quote pathspecs used with `git ls-files` [skip ci] ([341f495](https://github.com/saltstack-formulas/template-formula/commit/341f495336da0e35d92b3b4acda30f9efa44ec52))
+
+
+### Features
+
+* add script to ease conversion from template to real formula ([edfa269](https://github.com/saltstack-formulas/template-formula/commit/edfa269e9655407ca26788a8d5564c759abbbb30))
+
+
+### Tests
+
+* add CI test of conversion script ([7ad85ae](https://github.com/saltstack-formulas/template-formula/commit/7ad85ae0db21888921efabbc88bcafbc65e5bd21))
+
+
+### BREAKING CHANGES
+
+* changed all state names and ids
+
+## [3.3.4](https://github.com/saltstack-formulas/template-formula/compare/v3.3.3...v3.3.4) (2019-11-27)
+
+
+### Bug Fixes
+
+* **release.config.js:** use full commit hash in commit link [skip ci] ([4ac8d92](https://github.com/saltstack-formulas/template-formula/commit/4ac8d92778977ed63fe99e4506a2b0a2d41a2bce))
+
+
+### Continuous Integration
+
+* **kitchen:** use `debian-10-master-py3` instead of `develop` [skip ci] ([14ebf92](https://github.com/saltstack-formulas/template-formula/commit/14ebf928bc07cefa086523e63bed5df7c2879e9b))
+* **kitchen:** use `develop` image until `master` is ready (`amazonlinux`) [skip ci] ([42482d7](https://github.com/saltstack-formulas/template-formula/commit/42482d7f9b77f5d34417e25233a9f385075feace))
+* **kitchen+travis:** upgrade matrix after `2019.2.2` release [skip ci] ([d0e07b8](https://github.com/saltstack-formulas/template-formula/commit/d0e07b88834f68cc81ce4de34c14a880347fc497))
+* **travis:** apply changes from build config validation [skip ci] ([b625245](https://github.com/saltstack-formulas/template-formula/commit/b625245fc62deb6da7cb35de1280ec267718b1cd))
+* **travis:** opt-in to `dpl v2` to complete build config validation [skip ci] ([f1fbf7f](https://github.com/saltstack-formulas/template-formula/commit/f1fbf7f620c886827c70fb3970e3b2fac58b8db8))
+* **travis:** run `shellcheck` during lint job ([a711665](https://github.com/saltstack-formulas/template-formula/commit/a7116654d875ecb0e7e3e10fc96cbab2e91575f7))
+* **travis:** update `salt-lint` config for `v0.0.10` [skip ci] ([faea464](https://github.com/saltstack-formulas/template-formula/commit/faea464f923f552e23a83f28e3192c437f7eabfe))
+* **travis:** use build config validation (beta) [skip ci] ([66494bb](https://github.com/saltstack-formulas/template-formula/commit/66494bbc1058adc9ed6fa0074b1c4b6018c4cd48))
+
+
+### Performance Improvements
+
+* **travis:** improve `salt-lint` invocation [skip ci] ([7a96cd7](https://github.com/saltstack-formulas/template-formula/commit/7a96cd77db71eb8b022df7bd5c1014664124a022))
+
+## [3.3.3](https://github.com/saltstack-formulas/template-formula/compare/v3.3.2...v3.3.3) (2019-10-16)
+
+
+### Documentation
+
+* **contributing:** add recent `semantic-release` formulas [skip ci] ([](https://github.com/saltstack-formulas/template-formula/commit/e6fb519))
+* **contributing:** remove to use org-level file instead [skip ci] ([](https://github.com/saltstack-formulas/template-formula/commit/d2ebccf))
+* **readme:** update link to `CONTRIBUTING` [skip ci] ([](https://github.com/saltstack-formulas/template-formula/commit/ed61d09))
+* **reamde:** have special notes section ([](https://github.com/saltstack-formulas/template-formula/commit/c68aed5))
+
+## [3.3.2](https://github.com/saltstack-formulas/template-formula/compare/v3.3.1...v3.3.2) (2019-10-08)
+
+
+### Bug Fixes
+
+* **rubocop:** add fixes using `rubocop --safe-auto-correct` ([484ce24](https://github.com/saltstack-formulas/template-formula/commit/484ce24))
+* **rubocop:** fix remaining errors manually ([9566b6f](https://github.com/saltstack-formulas/template-formula/commit/9566b6f))
+
+
+### Code Refactoring
+
+* **travis:** merge `lint` stage into the `test` stage ([d3b93f8](https://github.com/saltstack-formulas/template-formula/commit/d3b93f8))
+
+
+### Continuous Integration
+
+* **kitchen:** install required packages to bootstrapped `opensuse` [skip ci] ([1cfed60](https://github.com/saltstack-formulas/template-formula/commit/1cfed60))
+* **kitchen:** use bootstrapped `opensuse` images until `2019.2.2` [skip ci] ([0467bdf](https://github.com/saltstack-formulas/template-formula/commit/0467bdf))
+* **travis:** quote `${INSTANCE}` when running `kitchen verify` ([00d56a4](https://github.com/saltstack-formulas/template-formula/commit/00d56a4)), closes [/github.com/saltstack-formulas/template-formula/pull/175#discussion_r332525964](https://github.com//github.com/saltstack-formulas/template-formula/pull/175/issues/discussion_r332525964)
+* **travis:** run `rubocop` during the `Lint` job ([8d8c766](https://github.com/saltstack-formulas/template-formula/commit/8d8c766))
+* **travis:** run `salt-lint` during the `Lint` job ([2df4646](https://github.com/saltstack-formulas/template-formula/commit/2df4646)), closes [/freenode.logbot.info/saltstack-formulas/20191004#c2723464](https://github.com//freenode.logbot.info/saltstack-formulas/20191004/issues/c2723464) [/freenode.logbot.info/saltstack-formulas/20191004#c2724272](https://github.com//freenode.logbot.info/saltstack-formulas/20191004/issues/c2724272)
+* **travis:** use `env` and `name` for improved display in Travis ([5f773d1](https://github.com/saltstack-formulas/template-formula/commit/5f773d1)), closes [/github.com/saltstack-formulas/template-formula/pull/175#discussion_r332613933](https://github.com//github.com/saltstack-formulas/template-formula/pull/175/issues/discussion_r332613933)
+
+
+### Documentation
+
+* **bug_report:** add section requesting commit hash / release tag ([faccb6a](https://github.com/saltstack-formulas/template-formula/commit/faccb6a))
+* **bug_report:** group into sections for better logical ordering ([e9b6c2f](https://github.com/saltstack-formulas/template-formula/commit/e9b6c2f))
+* **contributing:** add recent `semantic-release` formula ([c2924b0](https://github.com/saltstack-formulas/template-formula/commit/c2924b0))
+* **contributing:** add recent `semantic-release` formula ([8d2318c](https://github.com/saltstack-formulas/template-formula/commit/8d2318c))
+* **contributing:** add recent `semantic-release` formula [skip ci] ([85118de](https://github.com/saltstack-formulas/template-formula/commit/85118de))
+* **issues:** provide `Bug report` & `Feature request` templates ([f90f1f6](https://github.com/saltstack-formulas/template-formula/commit/f90f1f6))
+* **issues:** use `Meta` instead of `Optional` as suggested ([65cadb4](https://github.com/saltstack-formulas/template-formula/commit/65cadb4)), closes [/github.com/saltstack-formulas/template-formula/pull/174#issuecomment-538999459](https://github.com//github.com/saltstack-formulas/template-formula/pull/174/issues/issuecomment-538999459)
+* **issues:** use larger headings (from level 4 to level 3) ([53e7b75](https://github.com/saltstack-formulas/template-formula/commit/53e7b75))
+* **pillar.example:** fix TOFS comment to explain the default path [skip ci] ([fde5063](https://github.com/saltstack-formulas/template-formula/commit/fde5063)), closes [/github.com/saltstack-formulas/libvirt-formula/pull/60#issuecomment-537965254](https://github.com//github.com/saltstack-formulas/libvirt-formula/pull/60/issues/issuecomment-537965254) [/github.com/saltstack-formulas/libvirt-formula/pull/60#issuecomment-537988138](https://github.com//github.com/saltstack-formulas/libvirt-formula/pull/60/issues/issuecomment-537988138)
+* **pillar.example:** improve TOFS comment to explain the default path [skip ci] ([27d2fe4](https://github.com/saltstack-formulas/template-formula/commit/27d2fe4)), closes [/github.com/saltstack-formulas/nginx-formula/blob/17291a0ae2c2554707b79d897bb6ddec716e8426/pillar.example#L340-L341](https://github.com//github.com/saltstack-formulas/nginx-formula/blob/17291a0ae2c2554707b79d897bb6ddec716e8426/pillar.example/issues/L340-L341)
+
+## [3.3.1](https://github.com/saltstack-formulas/template-formula/compare/v3.3.0...v3.3.1) (2019-09-23)
+
+
+### Bug Fixes
+
+* **subcomponent:** clean referencing wrong sls ([394808e](https://github.com/saltstack-formulas/template-formula/commit/394808e))
+
+
+### Continuous Integration
+
+* use `dist: bionic` & apply `opensuse-leap-15` SCP error workaround ([330b0cb](https://github.com/saltstack-formulas/template-formula/commit/330b0cb))
+* **kitchen:** change `log_level` to `debug` instead of `info` ([1b929ff](https://github.com/saltstack-formulas/template-formula/commit/1b929ff))
+* **platform:** add `arch-base-latest` ([042e8e2](https://github.com/saltstack-formulas/template-formula/commit/042e8e2))
+* **yamllint:** add rule `empty-values` & use new `yaml-files` setting ([70ed7e2](https://github.com/saltstack-formulas/template-formula/commit/70ed7e2)), closes [#164](https://github.com/saltstack-formulas/template-formula/issues/164)
+
+
+### Documentation
+
+* **contributing:** add recent `semantic-release` formulas ([7f36ae9](https://github.com/saltstack-formulas/template-formula/commit/7f36ae9))
+
+# [3.3.0](https://github.com/saltstack-formulas/template-formula/compare/v3.2.1...v3.3.0) (2019-08-27)
+
+
+### Bug Fixes
+
+* **libtofs:** avoid using subpath by default ([c07471d](https://github.com/saltstack-formulas/template-formula/commit/c07471d))
+
+
+### Code Refactoring
+
+* **libtofs:** remove deprecated `v1_path_prefix` argument ([ad2a965](https://github.com/saltstack-formulas/template-formula/commit/ad2a965))
+
+
+### Features
+
+* **yamllint:** include for this repo and apply rules throughout ([e76525f](https://github.com/saltstack-formulas/template-formula/commit/e76525f))
+
+## [3.2.1](https://github.com/saltstack-formulas/template-formula/compare/v3.2.0...v3.2.1) (2019-08-06)
+
+
+### Code Refactoring
+
+* **tofs:** move subcomponent definition to `defaults.yaml` ([c269673](https://github.com/saltstack-formulas/template-formula/commit/c269673))
+* **tofs:** move subcomponent templates to first `source` match ([70cc92d](https://github.com/saltstack-formulas/template-formula/commit/70cc92d))
+
+
+### Continuous Integration
+
+* **kitchen+travis:** replace EOL pre-salted images ([42ab22c](https://github.com/saltstack-formulas/template-formula/commit/42ab22c))
+
+# [3.2.0](https://github.com/saltstack-formulas/template-formula/compare/v3.1.1...v3.2.0) (2019-08-03)
+
+
+### Bug Fixes
+
+* **formula:** update to current oldest supported version of Salt ([878eca1](https://github.com/saltstack-formulas/template-formula/commit/878eca1))
+
+
+### Documentation
+
+* **libtofs:** explain usage of sub-directory for components ([42a75d9](https://github.com/saltstack-formulas/template-formula/commit/42a75d9))
+* **readme:** describe the new “template.subcomponent” states ([6b595cd](https://github.com/saltstack-formulas/template-formula/commit/6b595cd))
+
+
+### Features
+
+* **sub-component:** manage a dedicated configuration file ([c4440d7](https://github.com/saltstack-formulas/template-formula/commit/c4440d7))
+* **tofs:** lookup files directory in “tpldir” hierarchy ([5c495fb](https://github.com/saltstack-formulas/template-formula/commit/5c495fb))
+
+
+### Tests
+
+* **inspec:** verify subcomponent configuration file ([fd55e03](https://github.com/saltstack-formulas/template-formula/commit/fd55e03))
+
+## [3.1.1](https://github.com/saltstack-formulas/template-formula/compare/v3.1.0...v3.1.1) (2019-07-25)
+
+
+### Bug Fixes
+
+* **tofs:** prepend the config-based `source_files` to the default ([3483e76](https://github.com/saltstack-formulas/template-formula/commit/3483e76)), closes [/github.com/saltstack-formulas/nginx-formula/pull/247#issuecomment-514262549](https://github.com//github.com/saltstack-formulas/nginx-formula/pull/247/issues/issuecomment-514262549) [#151](https://github.com/saltstack-formulas/template-formula/issues/151)
+
+
+### Documentation
+
+* **tofs:** ensure merged will all recent changes ([6a614d9](https://github.com/saltstack-formulas/template-formula/commit/6a614d9))
+* **tofs:** update from `nginx-formula` ([23a221e](https://github.com/saltstack-formulas/template-formula/commit/23a221e)), closes [/github.com/saltstack-formulas/nginx-formula/pull/238#discussion_r289124365](https://github.com//github.com/saltstack-formulas/nginx-formula/pull/238/issues/discussion_r289124365)
+
+# [3.1.0](https://github.com/saltstack-formulas/template-formula/compare/v3.0.9...v3.1.0) (2019-07-24)
+
+
+### Bug Fixes
+
+* **grain:** fix grain value ([26edfa0](https://github.com/saltstack-formulas/template-formula/commit/26edfa0))
+
+
+### Documentation
+
+* **map:** update comments in `os*.yaml` after adding `osarchmap` ([d71a258](https://github.com/saltstack-formulas/template-formula/commit/d71a258))
+
+
+### Features
+
+* **mapping:** introduce osarchmap per issue [#13](https://github.com/saltstack-formulas/template-formula/issues/13) ([41ac40d](https://github.com/saltstack-formulas/template-formula/commit/41ac40d))
+
+
+### Tests
+
+* **osarch:** add unit test for osarch ([1be2052](https://github.com/saltstack-formulas/template-formula/commit/1be2052))
+
+## [3.0.9](https://github.com/saltstack-formulas/template-formula/compare/v3.0.8...v3.0.9) (2019-07-24)
+
+
+### Bug Fixes
+
+* **libtofs:** don't crash if “tofs.files_switch” lookup a list ([0979d35](https://github.com/saltstack-formulas/template-formula/commit/0979d35))
+
+
+### Documentation
+
+* **contributing:** add recent `semantic-release` formula ([f9def86](https://github.com/saltstack-formulas/template-formula/commit/f9def86))
+* **contributing:** add recent `semantic-release` formula ([ed8c55a](https://github.com/saltstack-formulas/template-formula/commit/ed8c55a))
+* **contributing:** add recent `semantic-release` formulas ([57d0b85](https://github.com/saltstack-formulas/template-formula/commit/57d0b85))
+
+
+### Tests
+
+* **libtofs:** “tofs.files_switch” lookup can return a list ([13f1728](https://github.com/saltstack-formulas/template-formula/commit/13f1728))
+
+## [3.0.8](https://github.com/saltstack-formulas/template-formula/compare/v3.0.7...v3.0.8) (2019-07-08)
+
+
+### Documentation
+
+* **contributing:** add template-formula to `semantic-release` formulas ([87e4ebc](https://github.com/saltstack-formulas/template-formula/commit/87e4ebc))
+
+## [3.0.7](https://github.com/saltstack-formulas/template-formula/compare/v3.0.6...v3.0.7) (2019-07-04)
+
+
+### Documentation
+
+* **contributing:** add recent `semantic-release` formula ([c679cb5](https://github.com/saltstack-formulas/template-formula/commit/c679cb5))
+
+## [3.0.6](https://github.com/saltstack-formulas/template-formula/compare/v3.0.5...v3.0.6) (2019-06-28)
+
+
+### Code Refactoring
+
+* **string:** remove capitalisation from 'template' string ([7062210](https://github.com/saltstack-formulas/template-formula/commit/7062210))
+
+## [3.0.5](https://github.com/saltstack-formulas/template-formula/compare/v3.0.4...v3.0.5) (2019-06-28)
+
+
+### Documentation
+
+* **contributing:** add recent `semantic-release` formula ([fc50a9e](https://github.com/saltstack-formulas/template-formula/commit/fc50a9e))
+
+## [3.0.4](https://github.com/saltstack-formulas/template-formula/compare/v3.0.3...v3.0.4) (2019-06-27)
+
+
+### Documentation
+
+* **contributing:** add recent `semantic-release` formulas ([22052fc](https://github.com/saltstack-formulas/template-formula/commit/22052fc))
+
+## [3.0.3](https://github.com/saltstack-formulas/template-formula/compare/v3.0.2...v3.0.3) (2019-06-25)
+
+
+### Documentation
+
+* **contributing:** add recent `semantic-release` formula ([7f56237](https://github.com/saltstack-formulas/template-formula/commit/7f56237))
+
+## [3.0.2](https://github.com/saltstack-formulas/template-formula/compare/v3.0.1...v3.0.2) (2019-06-20)
+
+
+### Documentation
+
+* **contributing:** add recent `semantic-release` formulas ([461c7a5](https://github.com/saltstack-formulas/template-formula/commit/461c7a5))
+
+## [3.0.1](https://github.com/saltstack-formulas/template-formula/compare/v3.0.0...v3.0.1) (2019-06-16)
+
+
+### Tests
+
+* **inspec:** readme for default profile & os-name depreciated ([3fa7bce](https://github.com/saltstack-formulas/template-formula/commit/3fa7bce))
+
+# [3.0.0](https://github.com/saltstack-formulas/template-formula/compare/v2.2.1...v3.0.0) (2019-06-13)
+
+
+### Code Refactoring
+
+* **pkgname:** reserve 'pkg' as packaging dict ([c6ae81c](https://github.com/saltstack-formulas/template-formula/commit/c6ae81c))
+
+
+### Continuous Integration
+
+* **kitchen+travis:** modify matrix to include `develop` platform ([7b5d4ff](https://github.com/saltstack-formulas/template-formula/commit/7b5d4ff))
+
+
+### BREAKING CHANGES
+
+* **pkgname:** the parameter `pkg` is now a dictionary. References
+ to `template.pkg` should be changed to `template.pkg.name`.
+
+## [2.2.1](https://github.com/saltstack-formulas/template-formula/compare/v2.2.0...v2.2.1) (2019-05-31)
+
+
+### Code Refactoring
+
+* **`osfamilymap`:** avoid *BSD ambiguity with MacOS `rootgroup` ([3338605](https://github.com/saltstack-formulas/template-formula/commit/3338605))
+
+# [2.2.0](https://github.com/saltstack-formulas/template-formula/compare/v2.1.18...v2.2.0) (2019-05-31)
+
+
+### Features
+
+* **macos:** basic package and group handling ([8c3fe22](https://github.com/saltstack-formulas/template-formula/commit/8c3fe22))
+
+## [2.1.18](https://github.com/saltstack-formulas/template-formula/compare/v2.1.17...v2.1.18) (2019-05-29)
+
+
+### Bug Fixes
+
+* **`libtofs`:** use `select` to deal with empty strings in path ([afe0751](https://github.com/saltstack-formulas/template-formula/commit/afe0751))
+* **`libtofs`:** use `strip` to deal with leading/trailing slashes ([2563a46](https://github.com/saltstack-formulas/template-formula/commit/2563a46))
+
+## [2.1.17](https://github.com/saltstack-formulas/template-formula/compare/v2.1.16...v2.1.17) (2019-05-27)
+
+
+### Continuous Integration
+
+* **kitchen:** add Bundler binstub for Kitchen ([7bb7c53](https://github.com/saltstack-formulas/template-formula/commit/7bb7c53))
+
+
+### Documentation
+
+* **readme:** tidy headings ([d931ed1](https://github.com/saltstack-formulas/template-formula/commit/d931ed1))
+
+## [2.1.16](https://github.com/saltstack-formulas/template-formula/compare/v2.1.15...v2.1.16) (2019-05-27)
+
+
+### Documentation
+
+* **contributing:** add ufw formula to semantic release formulas ([18ff689](https://github.com/saltstack-formulas/template-formula/commit/18ff689))
+
+## [2.1.15](https://github.com/saltstack-formulas/template-formula/compare/v2.1.14...v2.1.15) (2019-05-25)
+
+
+### Tests
+
+* **`services_spec`:** remove temporary `suse` conditional ([00d4a77](https://github.com/saltstack-formulas/template-formula/commit/00d4a77))
+
+## [2.1.14](https://github.com/saltstack-formulas/template-formula/compare/v2.1.13...v2.1.14) (2019-05-25)
+
+
+### Bug Fixes
+
+* **`config/file`:** add missing space before Jinja `}}` ([5cd08ab](https://github.com/saltstack-formulas/template-formula/commit/5cd08ab))
+
+## [2.1.13](https://github.com/saltstack-formulas/template-formula/compare/v2.1.12...v2.1.13) (2019-05-24)
+
+
+### Documentation
+
+* **readme:** add testing requirements section (from `vault-formula`) ([e04413e](https://github.com/saltstack-formulas/template-formula/commit/e04413e))
+
+## [2.1.12](https://github.com/saltstack-formulas/template-formula/compare/v2.1.11...v2.1.12) (2019-05-24)
+
+
+### Continuous Integration
+
+* **travis:** improve recommended matrix usage comment ([b08a0fd](https://github.com/saltstack-formulas/template-formula/commit/b08a0fd))
+* **travis:** reduce matrix down to 6 instances (ref: [#118](https://github.com/saltstack-formulas/template-formula/issues/118)) ([a8834e2](https://github.com/saltstack-formulas/template-formula/commit/a8834e2))
+
+
+### Documentation
+
+* **contributing:** add `bind-formula` to `semantic-release` formulas ([3da78b0](https://github.com/saltstack-formulas/template-formula/commit/3da78b0))
+
+## [2.1.11](https://github.com/saltstack-formulas/template-formula/compare/v2.1.10...v2.1.11) (2019-05-18)
+
+
+### Documentation
+
+* **contributing:** add recent `semantic-release` formula ([486b393](https://github.com/saltstack-formulas/template-formula/commit/486b393))
+
+## [2.1.10](https://github.com/saltstack-formulas/template-formula/compare/v2.1.9...v2.1.10) (2019-05-16)
+
+
+### Documentation
+
+* **contributing:** fix link to contributing docs ([b6a33d3](https://github.com/saltstack-formulas/template-formula/commit/b6a33d3))
+
+## [2.1.9](https://github.com/saltstack-formulas/template-formula/compare/v2.1.8...v2.1.9) (2019-05-16)
+
+
+### Documentation
+
+* move contributing sections and links to ease adaptation ([741896d](https://github.com/saltstack-formulas/template-formula/commit/741896d))
+
+## [2.1.8](https://github.com/saltstack-formulas/template-formula/compare/v2.1.7...v2.1.8) (2019-05-16)
+
+
+### Documentation
+
+* **contributing:** add recent `semantic-release` formulas ([#110](https://github.com/saltstack-formulas/template-formula/issues/110)) ([ab7afd4](https://github.com/saltstack-formulas/template-formula/commit/ab7afd4))
+
+## [2.1.7](https://github.com/saltstack-formulas/template-formula/compare/v2.1.6...v2.1.7) (2019-05-15)
+
+
+### Styles
+
+* **indent:** fix indentation ([34d1307](https://github.com/saltstack-formulas/template-formula/commit/34d1307))
+
+## [2.1.6](https://github.com/saltstack-formulas/template-formula/compare/v2.1.5...v2.1.6) (2019-05-15)
+
+
+### Bug Fixes
+
+* **`map.jinja`:** _merge_ defaults and `config.get` ([91bc2f0](https://github.com/saltstack-formulas/template-formula/commit/91bc2f0))
+
+## [2.1.5](https://github.com/saltstack-formulas/template-formula/compare/v2.1.4...v2.1.5) (2019-05-15)
+
+
+### Bug Fixes
+
+* **`map.jinja`:** use tplroot ([b9c5e03](https://github.com/saltstack-formulas/template-formula/commit/b9c5e03))
+
+## [2.1.4](https://github.com/saltstack-formulas/template-formula/compare/v2.1.3...v2.1.4) (2019-05-15)
+
+
+### Bug Fixes
+
+* **`map.jinja`:** remove `merge` from `config.get` (for `salt-ssh`) ([00e474c](https://github.com/saltstack-formulas/template-formula/commit/00e474c)), closes [#95](https://github.com/saltstack-formulas/template-formula/issues/95)
+
+## [2.1.3](https://github.com/saltstack-formulas/template-formula/compare/v2.1.2...v2.1.3) (2019-05-13)
+
+
+### Bug Fixes
+
+* **travis:** don't install gems twice ([925d8e2](https://github.com/saltstack-formulas/template-formula/commit/925d8e2))
+
+
+### Documentation
+
+* **readme:** add testing section based on `postgres-formula` ([c309d5f](https://github.com/saltstack-formulas/template-formula/commit/c309d5f))
+
+## [2.1.2](https://github.com/saltstack-formulas/template-formula/compare/v2.1.1...v2.1.2) (2019-05-13)
+
+
+### Bug Fixes
+
+* **gitignore:** add Gemfile.lock to .gitignore ([87fa410](https://github.com/saltstack-formulas/template-formula/commit/87fa410))
+
+## [2.1.1](https://github.com/saltstack-formulas/template-formula/compare/v2.1.0...v2.1.1) (2019-05-13)
+
+
+### Documentation
+
+* **semantic-release:** add list of semantic-release compatible formulas ([97b19b9](https://github.com/saltstack-formulas/template-formula/commit/97b19b9))
+
+# [2.1.0](https://github.com/saltstack-formulas/template-formula/compare/v2.0.6...v2.1.0) (2019-05-12)
+
+
+### Features
+
+* **centos-6:** reshape formula and tests for this platform ([a4b1608](https://github.com/saltstack-formulas/template-formula/commit/a4b1608)), closes [#104](https://github.com/saltstack-formulas/template-formula/issues/104)
+
+## [2.0.6](https://github.com/saltstack-formulas/template-formula/compare/v2.0.5...v2.0.6) (2019-05-02)
+
+
+### Continuous Integration
+
+* **kitchen+travis:** use latest pre-salted images ([91ef13b](https://github.com/saltstack-formulas/template-formula/commit/91ef13b))
+
+
+### Tests
+
+* **inspec:** disable `service`-based tests for `opensuse-leap-15` ([848c2ad](https://github.com/saltstack-formulas/template-formula/commit/848c2ad))
+
+## [2.0.5](https://github.com/saltstack-formulas/template-formula/compare/v2.0.4...v2.0.5) (2019-04-30)
+
+
+### Documentation
+
+* **tofs:** remove whitespace from blank line ([0881b7d](https://github.com/saltstack-formulas/template-formula/commit/0881b7d))
+
+## [2.0.4](https://github.com/saltstack-formulas/template-formula/compare/v2.0.3...v2.0.4) (2019-04-27)
+
+
+### Code Refactoring
+
+* **map:** use `config.get` instead of `pillar.get` ([5dc0b86](https://github.com/saltstack-formulas/template-formula/commit/5dc0b86))
+
+
+### Continuous Integration
+
+* **gemfile:** update `kitchen-salt` version ([ad31c32](https://github.com/saltstack-formulas/template-formula/commit/ad31c32))
+
+## [2.0.3](https://github.com/saltstack-formulas/template-formula/compare/v2.0.2...v2.0.3) (2019-04-24)
+
+
+### Bug Fixes
+
+* **comments:** explain that at least an empty dict is required ([426f955](https://github.com/saltstack-formulas/template-formula/commit/426f955)), closes [#93](https://github.com/saltstack-formulas/template-formula/issues/93)
+
+
+### Continuous Integration
+
+* **kitchen:** use pre-salted images instead ([2855ed6](https://github.com/saltstack-formulas/template-formula/commit/2855ed6))
+
+## [2.0.2](https://github.com/saltstack-formulas/template-formula/compare/v2.0.1...v2.0.2) (2019-04-22)
+
+
+### Code Refactoring
+
+* **config_clean:** remove unused import from `libtofs.jinja` ([b7cb585](https://github.com/saltstack-formulas/template-formula/commit/b7cb585))
+
+
+### Continuous Integration
+
+* **kitchen+travis:** implement new distro-python-salt_version matrix ([bd4792d](https://github.com/saltstack-formulas/template-formula/commit/bd4792d))
+
+## [2.0.1](https://github.com/saltstack-formulas/template-formula/compare/v2.0.0...v2.0.1) (2019-03-25)
+
+
+### Code Refactoring
+
+* **tofs:** ensure (v2 > v1 > default) checking for `src_files` ([3e62d7b](https://github.com/saltstack-formulas/template-formula/commit/3e62d7b))
+* **tofs:** make `files_switch` macro fully portable ([a98b777](https://github.com/saltstack-formulas/template-formula/commit/a98b777))
+* **tofs:** use `config` rather than `pillar` throughout ([5730e94](https://github.com/saltstack-formulas/template-formula/commit/5730e94))
+
+# [2.0.0](https://github.com/saltstack-formulas/template-formula/compare/v1.2.6...v2.0.0) (2019-03-24)
+
+
+### Code Refactoring
+
+* **tofs:** move “files_switch” macro to “libtofs.jinja” ([da7e692](https://github.com/saltstack-formulas/template-formula/commit/da7e692))
+
+
+### BREAKING CHANGES
+
+* **tofs:** every formula writer will need to change the import
+to use this new version.
+
+* template/libtofs.jinja: provides the “files_switch” macro.
+
+* docs/TOFS_pattern.rst: update documentation to use the new path.
+
+* template/config/clean.sls: change import from “macros.jinja” to “libtofs.jinja”.
+
+* template/config/file.sls: ditoo.
+
+## [1.2.6](https://github.com/saltstack-formulas/template-formula/compare/v1.2.5...v1.2.6) (2019-03-24)
+
+
+### Reverts
+
+* **kitchen+travis:** use `debian:jessie-backports` as `debian-8` ([dcd141a](https://github.com/saltstack-formulas/template-formula/commit/dcd141a)), closes [/github.com/saltstack/salt-pack/issues/657#issuecomment-474954298](https://github.com//github.com/saltstack/salt-pack/issues/657/issues/issuecomment-474954298)
+
+## [1.2.5](https://github.com/saltstack-formulas/template-formula/compare/v1.2.4...v1.2.5) (2019-03-23)
+
+
+### Bug Fixes
+
+* **travis:** use version numbers in Gemfile to prevent failed builds ([35f7111](https://github.com/saltstack-formulas/template-formula/commit/35f7111))
+
+## [1.2.4](https://github.com/saltstack-formulas/template-formula/compare/v1.2.3...v1.2.4) (2019-03-22)
+
+
+### Code Refactoring
+
+* **tofs:** avoid using “salt['config.get']” for formula writers ([60d43e7](https://github.com/saltstack-formulas/template-formula/commit/60d43e7))
+
+## [1.2.3](https://github.com/saltstack-formulas/template-formula/compare/v1.2.2...v1.2.3) (2019-03-13)
+
+
+### Documentation
+
+* **tofs:** incorrect path for “source_files” lookup key ([a76f659](https://github.com/saltstack-formulas/template-formula/commit/a76f659))
+
+## [1.2.2](https://github.com/saltstack-formulas/template-formula/compare/v1.2.1...v1.2.2) (2019-03-09)
+
+
+### Bug Fixes
+
+* **tofs:** update use of state ID in `config` and `pillar` ([3d9a24c](https://github.com/saltstack-formulas/template-formula/commit/3d9a24c))
+* **tofs:** use `source_files` instead of `files` ([5110716](https://github.com/saltstack-formulas/template-formula/commit/5110716)), closes [/freenode.logbot.info/saltstack-formulas/20190308#c2046753](https://github.com//freenode.logbot.info/saltstack-formulas/20190308/issues/c2046753)
+
+## [1.2.1](https://github.com/saltstack-formulas/template-formula/compare/v1.2.0...v1.2.1) (2019-03-07)
+
+
+### Code Refactoring
+
+* **kitchen:** `pillars-from-files` => `pillars_from_files` ([7c954a7](https://github.com/saltstack-formulas/template-formula/commit/7c954a7)), closes [/github.com/saltstack-formulas/packages-formula/pull/50#discussion_r262769817](https://github.com//github.com/saltstack-formulas/packages-formula/pull/50/issues/discussion_r262769817)
+
+
+### Styles
+
+* **map:** use `-` for each Jinja block ([64e3834](https://github.com/saltstack-formulas/template-formula/commit/64e3834))
+
+# [1.2.0](https://github.com/saltstack-formulas/template-formula/compare/v1.1.2...v1.2.0) (2019-03-03)
+
+
+### Features
+
+* **m2r:** use `m2r` to convert automatic `.md` files to `.rst` ([b86ddf4](https://github.com/saltstack-formulas/template-formula/commit/b86ddf4))
+
+## [1.1.2](https://github.com/saltstack-formulas/template-formula/compare/v1.1.1...v1.1.2) (2019-03-03)
+
+
+### Documentation
+
+* **contributing:** add documentation contribution guidelines ([dff0ee8](https://github.com/saltstack-formulas/template-formula/commit/dff0ee8))
+* **rtd:** add comment to CSS file for overriding in-use Sphinx theme ([f237364](https://github.com/saltstack-formulas/template-formula/commit/f237364))
+* **rtd:** clean up numerous issues and inconsistencies ([ad5a8b8](https://github.com/saltstack-formulas/template-formula/commit/ad5a8b8))
+* **tofs:** use `literalinclude` of `macros.jinja` instead of code dupe ([3f0071b](https://github.com/saltstack-formulas/template-formula/commit/3f0071b))
+
+## [1.1.1](https://github.com/saltstack-formulas/template-formula/compare/v1.1.0...v1.1.1) (2019-03-01)
+
+
+### Continuous Integration
+
+* **travis:** remove obsolete `markdown-toc` process ([97fbb60](https://github.com/saltstack-formulas/template-formula/commit/97fbb60))
+
+
+### Documentation
+
+* **contributing:** add TOC to match all other pages ([7b1a2a9](https://github.com/saltstack-formulas/template-formula/commit/7b1a2a9))
+* **readme:** add Read the Docs build status badge ([f47797d](https://github.com/saltstack-formulas/template-formula/commit/f47797d))
+* **tofs:** replace existing `.md` with `.rst` and add to RTD ([fd68168](https://github.com/saltstack-formulas/template-formula/commit/fd68168))
+* **tofs:** use table to list authorship ([2f0e20f](https://github.com/saltstack-formulas/template-formula/commit/2f0e20f))
+
+# [1.1.0](https://github.com/saltstack-formulas/template-formula/compare/v1.0.1...v1.1.0) (2019-03-01)
+
+
+### Documentation
+
+* **rtd:** add basic `docs/conf.py` to allow additional customisation ([18d3924](https://github.com/saltstack-formulas/template-formula/commit/18d3924))
+
+
+### Features
+
+* **rtd:** provide custom CSS file for overriding in-use Sphinx theme ([24bd338](https://github.com/saltstack-formulas/template-formula/commit/24bd338))
+
+## [1.0.1](https://github.com/saltstack-formulas/template-formula/compare/v1.0.0...v1.0.1) (2019-03-01)
+
+
+### Continuous Integration
+
+* **travis:** remove unavailable files from `markdown-toc` process ([3148f0d](https://github.com/saltstack-formulas/template-formula/commit/3148f0d))
+
+
+### Documentation
+
+* **contributing:** convert to `.rst` and move to `docs` subdir ([474f318](https://github.com/saltstack-formulas/template-formula/commit/474f318))
+* **index:** add `CONTRIBUTING` to the `toctree` ([0c98e67](https://github.com/saltstack-formulas/template-formula/commit/0c98e67))
+* **readme:** move under `docs` subdir to access in both GitHub and RTD ([c92f674](https://github.com/saltstack-formulas/template-formula/commit/c92f674))
+* **readme:** update heading markers for consistency ([5a2bea8](https://github.com/saltstack-formulas/template-formula/commit/5a2bea8))
+* **rtd:** add basic `index.rst` to allow RTD to produce docs ([f02139f](https://github.com/saltstack-formulas/template-formula/commit/f02139f))
+* **rtd:** use internal link targets at the top of each `.rst` file ([da09528](https://github.com/saltstack-formulas/template-formula/commit/da09528))
+
+# [1.0.0](https://github.com/saltstack-formulas/template-formula/compare/v0.7.6...v1.0.0) (2019-02-28)
+
+
+### Code Refactoring
+
+* **components:** split components into separate subdirs ([d957055](https://github.com/saltstack-formulas/template-formula/commit/d957055)), closes [/github.com/saltstack-formulas/template-formula/pull/48#pullrequestreview-207182085](https://github.com//github.com/saltstack-formulas/template-formula/pull/48/issues/pullrequestreview-207182085) [/github.com/saltstack-formulas/template-formula/pull/48#discussion_r259805312](https://github.com//github.com/saltstack-formulas/template-formula/pull/48/issues/discussion_r259805312)
+* **include+require:** use variable for duplicate values ([4443518](https://github.com/saltstack-formulas/template-formula/commit/4443518))
+* **pkg:** change to `package` instead ([2cd82e5](https://github.com/saltstack-formulas/template-formula/commit/2cd82e5)), closes [/github.com/saltstack-formulas/template-formula/pull/48#discussion_r259951123](https://github.com//github.com/saltstack-formulas/template-formula/pull/48/issues/discussion_r259951123)
+* **pkg:** move `pkg` related components into separate directory ([c21f82b](https://github.com/saltstack-formulas/template-formula/commit/c21f82b))
+* **states:** set state IDs based on a dependable structure ([6690ee6](https://github.com/saltstack-formulas/template-formula/commit/6690ee6)), closes [/github.com/saltstack-formulas/template-formula/pull/48#discussion_r259953473](https://github.com//github.com/saltstack-formulas/template-formula/pull/48/issues/discussion_r259953473) [/github.com/saltstack-formulas/template-formula/pull/48#discussion_r259956996](https://github.com//github.com/saltstack-formulas/template-formula/pull/48/issues/discussion_r259956996)
+* **topdir:** use for `include` and `require` except `init.sls` ([a218e91](https://github.com/saltstack-formulas/template-formula/commit/a218e91))
+* **tpldir:** use `topdir` globally in place of `tpldir` ([2838bc9](https://github.com/saltstack-formulas/template-formula/commit/2838bc9))
+* **tplroot:** use `tplroot` instead of `topdir` to match `tpldata` ([b7356b0](https://github.com/saltstack-formulas/template-formula/commit/b7356b0))
+
+
+### Continuous Integration
+
+* **kitchen:** specify `image` explicitly for each platform ([b25fbdc](https://github.com/saltstack-formulas/template-formula/commit/b25fbdc))
+* **kitchen+travis:** use `debian:jessie-backports` as `debian-8` ([1b9d249](https://github.com/saltstack-formulas/template-formula/commit/1b9d249)), closes [#50](https://github.com/saltstack-formulas/template-formula/issues/50) [/github.com/saltstack/salt-pack/issues/657#issuecomment-467932962](https://github.com//github.com/saltstack/salt-pack/issues/657/issues/issuecomment-467932962)
+
+
+### Documentation
+
+* **components:** update for separation of `pkg`, `config` & `service` ([726fcab](https://github.com/saltstack-formulas/template-formula/commit/726fcab))
+* **readme:** add suggested improvement to `template.service.clean` ([bf1039c](https://github.com/saltstack-formulas/template-formula/commit/bf1039c))
+* **readme:** fix typos ([007159a](https://github.com/saltstack-formulas/template-formula/commit/007159a))
+
+
+### Features
+
+* **pkg:** add `clean` states ([422c7ac](https://github.com/saltstack-formulas/template-formula/commit/422c7ac))
+* **pkg:** use `require` requisite between `pkg` states ([6e7141b](https://github.com/saltstack-formulas/template-formula/commit/6e7141b)), closes [/github.com/saltstack/salt/blob/0c78d7dc894058988d171a28a11bd4a9dbf60266/salt/utils/jinja.py#L120](https://github.com//github.com/saltstack/salt/blob/0c78d7dc894058988d171a28a11bd4a9dbf60266/salt/utils/jinja.py/issues/L120) [/github.com/saltstack/salt/blob/0c78d7dc894058988d171a28a11bd4a9dbf60266/salt/utils/templates.py#L145](https://github.com//github.com/saltstack/salt/blob/0c78d7dc894058988d171a28a11bd4a9dbf60266/salt/utils/templates.py/issues/L145) [/github.com/saltstack/salt/issues/10838#issuecomment-391718086](https://github.com//github.com/saltstack/salt/issues/10838/issues/issuecomment-391718086)
+
+
+### Reverts
+
+* **kitchen+travis:** disable `debian-8` due to `2019.2` bug ([e8f0f7e](https://github.com/saltstack-formulas/template-formula/commit/e8f0f7e))
+
+
+### BREAKING CHANGES
+
+* **states:** Wholesale state ID changes will break implementations
+that are relying on the previous state IDs for requisite purposes.
+* **pkg:** Changing the `pkg` directory to `package` will break
+implementations that are depending on `pkg` for `include` or `sls`-based
+requisite purposes.
+
+## [0.7.6](https://github.com/saltstack-formulas/template-formula/compare/v0.7.5...v0.7.6) (2019-02-27)
+
+
+### Documentation
+
+* **yaml:** os*.yaml map files needs at least an empty dict ([dd99750](https://github.com/saltstack-formulas/template-formula/commit/dd99750))
+
+## [0.7.5](https://github.com/saltstack-formulas/template-formula/compare/v0.7.4...v0.7.5) (2019-02-27)
+
+
+### Bug Fixes
+
+* **pillar:** fix `os_family` typo ([3f89c12](https://github.com/saltstack-formulas/template-formula/commit/3f89c12))
+* **tofs:** update comments in `files_switch` macro for new method ([3fa3640](https://github.com/saltstack-formulas/template-formula/commit/3fa3640))
+
+
+### Code Refactoring
+
+* **macros:** use `tplroot` instead of `topdir` to match `tpldata` ([923b459](https://github.com/saltstack-formulas/template-formula/commit/923b459))
+
+
+### Documentation
+
+* **tofs:** add more sub-headings to ease document navigation ([2c5dc21](https://github.com/saltstack-formulas/template-formula/commit/2c5dc21))
+* **tofs:** apply language formatting to source code blocks ([0638413](https://github.com/saltstack-formulas/template-formula/commit/0638413))
+* **tofs:** explain how all parts of the `source` can be customised ([2f82eb5](https://github.com/saltstack-formulas/template-formula/commit/2f82eb5)), closes [#44](https://github.com/saltstack-formulas/template-formula/issues/44)
+* **tofs:** improve general use of language ([5105d29](https://github.com/saltstack-formulas/template-formula/commit/5105d29))
+* **tofs:** update the `files_switch` section for the updated macro ([788f732](https://github.com/saltstack-formulas/template-formula/commit/788f732))
+* **tofs:** use `{%-` for all Jinja statements ([4348df8](https://github.com/saltstack-formulas/template-formula/commit/4348df8))
+
+## [0.7.4](https://github.com/saltstack-formulas/template-formula/compare/v0.7.3...v0.7.4) (2019-02-27)
+
+
+### Continuous Integration
+
+* **kitchen:** check for repos updates before trying package installation ([b632383](https://github.com/saltstack-formulas/template-formula/commit/b632383))
+* **kitchen+travis:** disable `debian-8` due to `2019.2` installation bug ([178c710](https://github.com/saltstack-formulas/template-formula/commit/178c710))
+
+
+### Documentation
+
+* **contributing:** separate `BREAKING CHANGE` under its own heading ([ee053d7](https://github.com/saltstack-formulas/template-formula/commit/ee053d7))
+
+## [0.7.3](https://github.com/saltstack-formulas/template-formula/compare/v0.7.2...v0.7.3) (2019-02-25)
+
+
+### Bug Fixes
+
+* **tofs:** use `tpldir` derivative `topdir` for pillar (config) paths ([5e9df00](https://github.com/saltstack-formulas/template-formula/commit/5e9df00))
+
+## [0.7.2](https://github.com/saltstack-formulas/template-formula/compare/v0.7.1...v0.7.2) (2019-02-24)
+
+
+### Code Refactoring
+
+* **tpldir:** use `tpldir` or derivatives to make formula portable ([52d03d8](https://github.com/saltstack-formulas/template-formula/commit/52d03d8)), closes [#22](https://github.com/saltstack-formulas/template-formula/issues/22)
+
+
+### Continuous Integration
+
+* **kitchen:** improve comments about `opensuse` problems encountered ([c246939](https://github.com/saltstack-formulas/template-formula/commit/c246939))
+* **travis:** prevent `release` stage running for PRs ([3a072c7](https://github.com/saltstack-formulas/template-formula/commit/3a072c7)), closes [/travis-ci.com/saltstack-formulas/template-formula/jobs/180068519#L466](https://github.com//travis-ci.com/saltstack-formulas/template-formula/jobs/180068519/issues/L466) [/github.com/saltstack-formulas/template-formula/pull/42#issuecomment-466446324](https://github.com//github.com/saltstack-formulas/template-formula/pull/42/issues/issuecomment-466446324)
+
+## [0.7.1](https://github.com/saltstack-formulas/template-formula/compare/v0.7.0...v0.7.1) (2019-02-24)
+
+
+### Continuous Integration
+
+* **kitchen:** use `salt-minion` version of `opensuse` to ensure tests run ([99b073a](https://github.com/saltstack-formulas/template-formula/commit/99b073a))
+
+
+### Documentation
+
+* **changelog:** remove erroneous "closes" used by `semantic-release` ([be4571d](https://github.com/saltstack-formulas/template-formula/commit/be4571d))
+
+# [0.7.0](https://github.com/saltstack-formulas/template-formula/compare/v0.6.0...v0.7.0) (2019-02-23)
+
+
+### Features
+
+* **tofs:** implement backwards-compatible TOFSv2 for configurability ([068a94d](https://github.com/saltstack-formulas/template-formula/commit/068a94d))
+
+# [0.6.0](https://github.com/saltstack-formulas/template-formula/compare/v0.5.0...v0.6.0) (2019-02-23)
+
+
+### Documentation
+
+* **contributing:** add basic introductory text before the TOC ([45ccaf6](https://github.com/saltstack-formulas/template-formula/commit/45ccaf6))
+* **contributing:** modify quoted heading to prevent TOC inclusion ([abcb6ef](https://github.com/saltstack-formulas/template-formula/commit/abcb6ef))
+* **readme:** convert note into a heading ([5f2d789](https://github.com/saltstack-formulas/template-formula/commit/5f2d789))
+
+
+### Features
+
+* **toc:** use `markdown-toc` directly to update inline ([a5bae1e](https://github.com/saltstack-formulas/template-formula/commit/a5bae1e))
+
+# [0.5.0](https://github.com/saltstack-formulas/template-formula/compare/v0.4.0...v0.5.0) (2019-02-23)
+
+
+### Features
+
+* **kitchen+travis:** add `opensuse-leap` after resolving issues ([7614a3c](https://github.com/saltstack-formulas/template-formula/commit/7614a3c))
+* **kitchen+travis:** conduct tests on a wider range of platforms ([1348078](https://github.com/saltstack-formulas/template-formula/commit/1348078))
+
+
+### Tests
+
+* **inspec:** update `supports` for all platforms added ([42f93b3](https://github.com/saltstack-formulas/template-formula/commit/42f93b3))
+
+# [0.4.0](https://github.com/saltstack-formulas/template-formula/compare/v0.3.6...v0.4.0) (2019-02-23)
+
+
+### Documentation
+
+* **contributing:** centre-align version bump columns in table ([a238cae](https://github.com/saltstack-formulas/template-formula/commit/a238cae))
+
+
+### Features
+
+* **authors:** update automatically alongside `semantic-release` ([8000098](https://github.com/saltstack-formulas/template-formula/commit/8000098))
+
+## [0.3.6](https://github.com/saltstack-formulas/template-formula/compare/v0.3.5...v0.3.6) (2019-02-22)
+
+
+### Continuous Integration
+
+* **travis:** include `commitlint` stage ([6659a69](https://github.com/saltstack-formulas/template-formula/commit/6659a69))
+* **travis:** remove obsolete check based on `$TRAVIS_TEST_RESULT` ([6df9c95](https://github.com/saltstack-formulas/template-formula/commit/6df9c95))
+
+
+### Documentation
+
+* **contributing:** update with sub-headings and `commitlint` details ([ea2c9a4](https://github.com/saltstack-formulas/template-formula/commit/ea2c9a4))
+
+## [0.3.5](https://github.com/saltstack-formulas/template-formula/compare/v0.3.4...v0.3.5) (2019-02-21)
+
+
+### Code Refactoring
+
+* **kitchen:** prefer `kitchen.yml` to `.kitchen.yml` ([3860bf9](https://github.com/saltstack-formulas/template-formula/commit/3860bf9))
+
+## [0.3.4](https://github.com/saltstack-formulas/template-formula/compare/v0.3.3...v0.3.4) (2019-02-21)
+
+
+### Documentation
+
+* **contributing:** add commit message formatting instructions ([fb3d173](https://github.com/saltstack-formulas/template-formula/commit/fb3d173))
+
+## [0.3.3](https://github.com/saltstack-formulas/template-formula/compare/v0.3.2...v0.3.3) (2019-02-20)
+
+
+### Documentation
+
+* **changelog:** add missing entry under `v0.3.2` ([50352b5](https://github.com/saltstack-formulas/template-formula/commit/50352b5))
+
+## [0.3.2](https://github.com/saltstack-formulas/template-formula/compare/v0.3.1...v0.3.2) (2019-02-20)
+
+
+### Documentation
+
+* **README:** remove gitchangelog ([2fc85fc](https://github.com/saltstack-formulas/template-formula/commit/2fc85fc))
+* **contributing:** create blank template ([3633e8f](https://github.com/saltstack-formulas/template-formula/commit/3633e8f))
+
+## [0.3.1](https://github.com/saltstack-formulas/template-formula/compare/v0.3.0...v0.3.1) (2019-02-20)
+
+
+### Documentation
+
+* **changelog:** merge previous `rst` into new `md` format ([2b4e485](https://github.com/saltstack-formulas/template-formula/commit/2b4e485))
+
+# [0.3.0](https://github.com/saltstack-formulas/template-formula/compare/v0.2.0...v0.3.0) (2019-02-20)
+
+
+### Features
+
+* **semantic-release:** configure for this formula ([cbcfd75](https://github.com/saltstack-formulas/template-formula/commit/cbcfd75))
+
+# [0.2.0](https://github.com/saltstack-formulas/template-formula/compare/v0.1.7...v0.2.0) (2019-02-17)
+
+* Added a working testing scaffold and travis support. [Javier Bértoli]
+
+## [0.1.7](https://github.com/saltstack-formulas/template-formula/compare/v0.1.6...v0.1.7) (2019-02-16)
+
+### Fix
+
+* Typo in the installation instructions. [Niels Abspoel]
+
+### Other
+
+* Update the changelog. [Niels Abspoel]
+* Update README with link to install gitchangelog [Imran Iqbal]
+
+## [0.1.6](https://github.com/saltstack-formulas/template-formula/compare/v0.1.5...v0.1.6) (2019-02-16)
+
+* Add changelog generator. [Niels Abspoel]
+
+## [0.1.5](https://github.com/saltstack-formulas/template-formula/compare/v0.1.4...v0.1.5) (2019-02-15)
+
+* Prepare v0.1.5 [Imran Iqbal]
+* Fix missing ')' [gmazrael]
+
+## [0.1.4](https://github.com/saltstack-formulas/template-formula/compare/v0.1.3...v0.1.4) (2019-02-15)
+
+* Replace obsolete VERSION file and replace with FORMULA file. [Imran Iqbal]
+
+## [0.1.3](https://github.com/saltstack-formulas/template-formula/compare/v0.1.2...v0.1.3) (2019-02-12)
+
+* Updated changelog and version. [Alexander Weidinger]
+* Map.jinja: use grains.filter\_by instead of defaults.merge. [Alexander Weidinger]
+
+    because defaults.merge does not work with salt-ssh. <https://github.com/saltstack/salt/issues/51605>
+
+    Added osfingermap.yaml.
+
+## [0.1.2](https://github.com/saltstack-formulas/template-formula/compare/v0.1.1...v0.1.2) (2019-02-12)
+
+* Improve comments and examples in osfamilymap & osmap [Imran Iqbal]
+* Fix map.jinja and add more OSes. [Imran Iqbal]
+
+## [0.1.1](https://github.com/saltstack-formulas/template-formula/compare/v0.1.0...v0.1.1) (2019-02-10)
+
+* Update. [Niels Abspoel]
+* Update formula with map.jinja and style guide references, improve README and VERSION. [Niels Abspoel]
+
+# [0.1.0](https://github.com/saltstack-formulas/template-formula/compare/v0.0.9...v0.1.0) (2019-02-10)
+
+* Examples must be consistent. [Daniel Dehennin]
+
+    The “template” is kept during rendering.
+
+    * TOFS\_pattern.md: add “template” to rendered state.
+    * template/macros.jinja: ditoo.
+
+* Remove double slash in generated salt URL. [Daniel Dehennin]
+
+    When the files are “full path” with leading slash “/”, the generated URL contain a double slash because of the join.
+
+    * template/macros.jinja: remove leading slash before joining parts.
+    * TOFS\_pattern.md: mirror changes of “macros.jinja”.
+
+* Add an example for “ntp” of the use of “files\_switch” [Daniel Dehennin]
+* Accept pillar separator in “files\_switch” prefix. [Daniel Dehennin]
+
+    The prefix was used for 2 purposes:
+
+    * define the pillar prefix where to lookup “:files\_switch”. It supports the colon “:” separator to lookup in pillar subtree like “foo:bar”
+    * define the path prefix where to look for “files/”, It did not support separator to lookup inside directory tree.
+
+    This patch only replace any colon “:” with “/” when looking up “files/” directory, with the “foo:bar” prefix:
+
+    * lookup “foo:bar:files\_switch” pillar to get list of grains to match
+    * lookup files under “salt://foo/bar/files/”
+    * TOFS\_pattern.md: document the new use of “prefix” supporting colon “:”.
+    * template/macros.jinja: transform any colon “:” in “prefix” by slash
+    “/” to lookup files.
+
+* Make TOFS pattern example usable. [Daniel Dehennin]
+
+    The example could not be used as-is. This commit improve conformity to formula conventions.
+
+    * TOFS\_pattern.md: add missing commas “,” in “map.jinja” and extra one
+    to ease the addition of new entries. Import “map.jinja” in “init.sls” and “conf.sls”. Declare descriptive state IDs. Use the “module.function” notation. Use the “name” parameter.
+
+* Cosmetics modification of TOFS pattern documentation. [Daniel Dehennin]
+    * TOFS\_pattern.md: add myself as modifier.
+    Trim trailing whitespaces. Separate titles from first paragraph.
+
+* Switch template.config to TOFS pattern. [Daniel Dehennin]
+* Import TOFS pattern from Zabbix formula. [Daniel Dehennin]
+
+## [0.0.9](https://github.com/saltstack-formulas/template-formula/compare/v0.0.8...v0.0.9) (2019-02-10)
+
+* Add VERSION file. [Karim Hamza]
+* Add note about formula versioning. [Karim Hamza]
+
+## [0.0.8](https://github.com/saltstack-formulas/template-formula/compare/v0.0.7...v0.0.8) (2019-02-10)
+
+* Align with SaltStack official formulas doc page. [Denys Havrysh]
+* Use https in the link to SaltStack documentation. [Denys Havrysh]
+
+## [0.0.7](https://github.com/saltstack-formulas/template-formula/compare/v0.0.6...v0.0.7) (2019-02-10)
+
+* Map.ninja: fix typos and leftover comments. [Marco Molteni]
+* Remove whitespace in map.jinja comment. [Andrew Gabbitas]
+
+## [0.0.6](https://github.com/saltstack-formulas/template-formula/compare/v0.0.5...v0.0.6) (2019-02-10)
+
+* Improve style and jinja too match salt-formula. [Niels Abspoel]
+* Propose new-ish formula style - defaults live in defaults.yml - map jinja overrides by grain + merges pillar:lookup - split all contextually similar states in their own files. [puneet kandhari]
+
+## [0.0.5](https://github.com/saltstack-formulas/template-formula/compare/v0.0.4...v0.0.5) (2019-02-10)
+
+* Change states to use short-dec style. [Seth House]
+* Update CHANGELOG.rst. [Nitin Madhok]
+* Update README.rst. [Nitin Madhok]
+
+    Fix broken link
+* Fixing pillar to match the map file. [Forrest]
+
+    Map file and pillar didn't match.
+
+## [0.0.4](https://github.com/saltstack-formulas/template-formula/compare/v0.0.3...v0.0.4) (2019-02-10)
+
+* Add change log. [Antti Jokipii]
+
+## [0.0.3](https://github.com/saltstack-formulas/template-formula/compare/v0.0.2...v0.0.3) (2019-02-10)
+
+* Updated the license and readme to match our standards. [Forrest Alvarez]
+* Use map.jinja content in init.sls. [Eugene Vereschagin]
+* Add map.jinja. [Eugene Vereschagin]
+
+## [0.0.2](https://github.com/saltstack-formulas/template-formula/compare/v0.0.1...v0.0.2) (2019-02-10)
+
+* Add link to Salt Formula documentation. [Eugene Vereschagin]
+* Change extension from .md to .rst. [Eugene Vereschagin]
+
+## [0.0.1](https://github.com/saltstack-formulas/template-formula/releases/tag/v0.0.1) (2019-02-10)
+
+* Initial commit. [Lukas Erlacher]
diff --git a/FORMULA b/FORMULA
new file mode 100644 (file)
index 0000000..f97022c
--- /dev/null
+++ b/FORMULA
@@ -0,0 +1,9 @@
+name: TEMPLATE
+os: Debian, Ubuntu, Raspbian, RedHat, Fedora, CentOS, Amazon, Suse, openSUSE, Gentoo, Funtoo, Arch, Manjaro, Alpine, FreeBSD, OpenBSD, Solaris, SmartOS, Windows, MacOS
+os_family: Debian, RedHat, Suse, Gentoo, Arch, Alpine, FreeBSD, OpenBSD, Solaris, Windows, MacOS
+version: 4.0.6
+release: 1
+minimum_version: 2017.7
+summary: TEMPLATE formula
+description: Formula to use as a template for other formulas
+top_level_dir: TEMPLATE
diff --git a/Gemfile b/Gemfile
new file mode 100644 (file)
index 0000000..8da7a69
--- /dev/null
+++ b/Gemfile
@@ -0,0 +1,11 @@
+# frozen_string_literal: true
+
+source 'https://rubygems.org'
+
+gem 'kitchen-docker', '>= 2.9'
+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'
diff --git a/LICENSE b/LICENSE
new file mode 100644 (file)
index 0000000..3e21c72
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,13 @@
+   Copyright (c) 2014 Salt Stack Formulas
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
diff --git a/TEMPLATE/clean.sls b/TEMPLATE/clean.sls
new file mode 100644 (file)
index 0000000..9e45fb4
--- /dev/null
@@ -0,0 +1,8 @@
+# -*- coding: utf-8 -*-
+# vim: ft=sls
+
+include:
+  - .subcomponent.clean
+  - .service.clean
+  - .config.clean
+  - .package.clean
diff --git a/TEMPLATE/config/clean.sls b/TEMPLATE/config/clean.sls
new file mode 100644 (file)
index 0000000..330029e
--- /dev/null
@@ -0,0 +1,16 @@
+# -*- coding: utf-8 -*-
+# vim: ft=sls
+
+{#- Get the `tplroot` from `tpldir` #}
+{%- set tplroot = tpldir.split('/')[0] %}
+{%- set sls_service_clean = tplroot ~ '.service.clean' %}
+{%- from tplroot ~ "/map.jinja" import TEMPLATE with context %}
+
+include:
+  - {{ sls_service_clean }}
+
+TEMPLATE-config-clean-file-absent:
+  file.absent:
+    - name: {{ TEMPLATE.config }}
+    - require:
+      - sls: {{ sls_service_clean }}
diff --git a/TEMPLATE/config/file.sls b/TEMPLATE/config/file.sls
new file mode 100644 (file)
index 0000000..985c1c8
--- /dev/null
@@ -0,0 +1,28 @@
+# -*- coding: utf-8 -*-
+# vim: ft=sls
+
+{#- Get the `tplroot` from `tpldir` #}
+{%- set tplroot = tpldir.split('/')[0] %}
+{%- set sls_package_install = tplroot ~ '.package.install' %}
+{%- from tplroot ~ "/map.jinja" import TEMPLATE with context %}
+{%- from tplroot ~ "/libtofs.jinja" import files_switch with context %}
+
+include:
+  - {{ sls_package_install }}
+
+TEMPLATE-config-file-file-managed:
+  file.managed:
+    - name: {{ TEMPLATE.config }}
+    - source: {{ files_switch(['example.tmpl'],
+                              lookup='TEMPLATE-config-file-file-managed'
+                 )
+              }}
+    - mode: 644
+    - user: root
+    - group: {{ TEMPLATE.rootgroup }}
+    - makedirs: True
+    - template: jinja
+    - require:
+      - sls: {{ sls_package_install }}
+    - context:
+        TEMPLATE: {{ TEMPLATE | json }}
diff --git a/TEMPLATE/config/init.sls b/TEMPLATE/config/init.sls
new file mode 100644 (file)
index 0000000..465ddfe
--- /dev/null
@@ -0,0 +1,5 @@
+# -*- coding: utf-8 -*-
+# vim: ft=sls
+
+include:
+  - .file
diff --git a/TEMPLATE/defaults.yaml b/TEMPLATE/defaults.yaml
new file mode 100644 (file)
index 0000000..a5c495e
--- /dev/null
@@ -0,0 +1,15 @@
+# -*- coding: utf-8 -*-
+# vim: ft=yaml
+---
+TEMPLATE:
+  pkg:
+    name: TEMPLATE
+  rootgroup: root
+  config: '/etc/TEMPLATE'
+  service:
+    name: TEMPLATE
+  subcomponent:
+    config: '/etc/TEMPLATE-subcomponent-formula.conf'
+  # Just here for testing
+  added_in_defaults: defaults_value
+  winner: defaults
diff --git a/TEMPLATE/files/default/example.tmpl b/TEMPLATE/files/default/example.tmpl
new file mode 100644 (file)
index 0000000..2c9c60f
--- /dev/null
@@ -0,0 +1,6 @@
+########################################################################
+# File managed by Salt at <{{ source }}>.
+# Your changes will be overwritten.
+########################################################################
+
+This is an example file from SaltStack template-formula.
diff --git a/TEMPLATE/files/default/example.tmpl.jinja b/TEMPLATE/files/default/example.tmpl.jinja
new file mode 100644 (file)
index 0000000..b8999ab
--- /dev/null
@@ -0,0 +1,11 @@
+########################################################################
+# File managed by Salt at <{{ source }}>.
+# Your changes will be overwritten.
+########################################################################
+
+This is another example file from SaltStack template-formula.
+
+# This is here for testing purposes
+{{ TEMPLATE | json }}
+
+winner of the merge: {{ TEMPLATE['winner'] }}
diff --git a/TEMPLATE/init.sls b/TEMPLATE/init.sls
new file mode 100644 (file)
index 0000000..275d1fc
--- /dev/null
@@ -0,0 +1,8 @@
+# -*- coding: utf-8 -*-
+# vim: ft=sls
+
+include:
+  - .package
+  - .config
+  - .service
+  - .subcomponent
diff --git a/TEMPLATE/libsaltcli.jinja b/TEMPLATE/libsaltcli.jinja
new file mode 100644 (file)
index 0000000..5374ae2
--- /dev/null
@@ -0,0 +1,16 @@
+# -*- coding: utf-8 -*-
+# vim: ft=jinja
+
+{#- Get the relevant values from the `opts` dict #}
+{%- set opts_cli = opts.get('__cli', '') %}
+{%- set opts_masteropts_cli = opts | traverse('__master_opts__:__cli', '') %}
+
+{#- Determine the type of salt command being run #}
+{%- if opts_cli == 'salt-minion' %}
+{%-   set cli = 'minion' %}
+{%- elif opts_cli == 'salt-call' %}
+{%-   set cli = 'ssh' if opts_masteropts_cli == 'salt-ssh' else 'local' %}
+{%- else %}
+{%-   set cli = 'unknown' %}
+{%- endif %}
+{%- do salt['log.debug']('[libsaltcli] the salt command type has been identified to be: ' ~ cli) %}
diff --git a/TEMPLATE/libtofs.jinja b/TEMPLATE/libtofs.jinja
new file mode 100644 (file)
index 0000000..0668925
--- /dev/null
@@ -0,0 +1,112 @@
+{%- macro files_switch(source_files,
+                       lookup=None,
+                       default_files_switch=['id', 'os_family'],
+                       indent_width=6,
+                       use_subpath=False) %}
+  {#-
+    Returns a valid value for the "source" parameter of a "file.managed"
+    state function. This makes easier the usage of the Template Override and
+    Files Switch (TOFS) pattern.
+
+    Params:
+      * source_files: ordered list of files to look for
+      * lookup: key under '<tplroot>:tofs:source_files' to prepend to the
+        list of source files
+      * default_files_switch: if there's no config (e.g. pillar)
+        '<tplroot>:tofs:files_switch' this is the ordered list of grains to
+        use as selector switch of the directories under
+        "<path_prefix>/files"
+      * indent_width: indentation of the result value to conform to YAML
+      * use_subpath: defaults to `False` but if set, lookup the source file
+        recursively from the current state directory up to `tplroot`
+
+    Example (based on a `tplroot` of `xxx`):
+
+    If we have a state:
+
+      Deploy configuration:
+        file.managed:
+          - name: /etc/yyy/zzz.conf
+          - source: {{ files_switch(['/etc/yyy/zzz.conf', '/etc/yyy/zzz.conf.jinja'],
+                                    lookup='Deploy configuration'
+                    ) }}
+          - template: jinja
+
+    In a minion with id=theminion and os_family=RedHat, it's going to be
+    rendered as:
+
+      Deploy configuration:
+        file.managed:
+          - name: /etc/yyy/zzz.conf
+          - source:
+            - salt://xxx/files/theminion/etc/yyy/zzz.conf
+            - salt://xxx/files/theminion/etc/yyy/zzz.conf.jinja
+            - salt://xxx/files/RedHat/etc/yyy/zzz.conf
+            - salt://xxx/files/RedHat/etc/yyy/zzz.conf.jinja
+            - salt://xxx/files/default/etc/yyy/zzz.conf
+            - salt://xxx/files/default/etc/yyy/zzz.conf.jinja
+          - template: jinja
+  #}
+  {#- Get the `tplroot` from `tpldir` #}
+  {%- set tplroot = tpldir.split('/')[0] %}
+  {%- set path_prefix = salt['config.get'](tplroot ~ ':tofs:path_prefix', tplroot) %}
+  {%- set files_dir = salt['config.get'](tplroot ~ ':tofs:dirs:files', 'files') %}
+  {%- set files_switch_list = salt['config.get'](
+      tplroot ~ ':tofs:files_switch',
+      default_files_switch
+  ) %}
+  {#- Lookup source_files (v2), files (v1), or fallback to an empty list #}
+  {%- set src_files = salt['config.get'](
+      tplroot ~ ':tofs:source_files:' ~ lookup,
+      salt['config.get'](tplroot ~ ':tofs:files:' ~ lookup, [])
+  ) %}
+  {#- Append the default source_files #}
+  {%- set src_files = src_files + source_files %}
+  {#- Only add to [''] when supporting older TOFS implementations #}
+  {%- set path_prefix_exts = [''] %}
+  {%- if use_subpath and tplroot != tpldir %}
+    {#- Walk directory tree to find {{ files_dir }} #}
+    {%- set subpath_parts = tpldir.lstrip(tplroot).lstrip('/').split('/') %}
+    {%- for path in subpath_parts %}
+      {%- set subpath = subpath_parts[0:loop.index] | join('/') %}
+      {%- do path_prefix_exts.append('/' ~ subpath) %}
+    {%- endfor %}
+  {%- endif %}
+  {%- for path_prefix_ext in path_prefix_exts|reverse %}
+    {%- set path_prefix_inc_ext = path_prefix ~ path_prefix_ext %}
+    {#- For older TOFS implementation, use `files_switch` from the config #}
+    {#- Use the default, new method otherwise #}
+    {%- set fsl = salt['config.get'](
+        tplroot ~ path_prefix_ext|replace('/', ':') ~ ':files_switch',
+        files_switch_list
+    ) %}
+    {#- Append an empty value to evaluate as `default` in the loop below #}
+    {%- if '' not in fsl %}
+      {%- set fsl = fsl + [''] %}
+    {%- endif %}
+    {%- for fs in fsl %}
+      {%- for src_file in src_files %}
+        {%- if fs %}
+          {%- set fs_dirs = salt['config.get'](fs, fs) %}
+        {%- else %}
+          {%- set fs_dirs = salt['config.get'](tplroot ~ ':tofs:dirs:default', 'default') %}
+        {%- endif %}
+        {#- Force the `config.get` lookup result as a list where necessary #}
+        {#- since we need to also handle grains that are lists #}
+        {%- if fs_dirs is string %}
+          {%- set fs_dirs = [fs_dirs] %}
+        {%- endif %}
+        {%- for fs_dir in fs_dirs %}
+          {%- set url = [
+              '- salt:/',
+              path_prefix_inc_ext.strip('/'),
+              files_dir.strip('/'),
+              fs_dir.strip('/'),
+              src_file.strip('/'),
+          ] | select | join('/') %}
+{{ url | indent(indent_width, true) }}
+        {%- endfor %}
+      {%- endfor %}
+    {%- endfor %}
+  {%- endfor %}
+{%- endmacro %}
diff --git a/TEMPLATE/map.jinja b/TEMPLATE/map.jinja
new file mode 100644 (file)
index 0000000..1b8b1c6
--- /dev/null
@@ -0,0 +1,56 @@
+# -*- coding: utf-8 -*-
+# vim: ft=jinja
+
+{#- Get the `tplroot` from `tpldir` #}
+{%- set tplroot = tpldir.split('/')[0] %}
+{#- Start imports as #}
+{%- import_yaml tplroot ~ "/defaults.yaml" as default_settings %}
+{%- import_yaml tplroot ~ "/osarchmap.yaml" as osarchmap %}
+{%- import_yaml tplroot ~ "/osfamilymap.yaml" as osfamilymap %}
+{%- import_yaml tplroot ~ "/osmap.yaml" as osmap %}
+{%- import_yaml tplroot ~ "/osfingermap.yaml" as osfingermap %}
+
+{#- Retrieve the config dict only once #}
+{%- set _config = salt['config.get'](tplroot, default={}) %}
+
+{%- set defaults = salt['grains.filter_by'](
+      default_settings,
+      default=tplroot,
+      merge=salt['grains.filter_by'](
+        osarchmap,
+        grain='osarch',
+        merge=salt['grains.filter_by'](
+          osfamilymap,
+          grain='os_family',
+          merge=salt['grains.filter_by'](
+            osmap,
+            grain='os',
+            merge=salt['grains.filter_by'](
+              osfingermap,
+              grain='osfinger',
+              merge=salt['grains.filter_by'](
+                _config,
+                default='lookup'
+              )
+            )
+          )
+        )
+      )
+    )
+%}
+
+{%- set config = salt['grains.filter_by'](
+      {'defaults': defaults},
+      default='defaults',
+      merge=_config
+    )
+%}
+
+{#- Change **TEMPLATE** to match with your formula's name and then remove this line #}
+{%- set TEMPLATE = config %}
+
+{#- Post-processing for specific non-YAML customisations #}
+{%- if grains.os == 'MacOS' %}
+{%-   set macos_group = salt['cmd.run']("stat -f '%Sg' /dev/console") %}
+{%-   do TEMPLATE.update({'rootgroup': macos_group}) %}
+{%- endif %}
diff --git a/TEMPLATE/osarchmap.yaml b/TEMPLATE/osarchmap.yaml
new file mode 100644 (file)
index 0000000..ab3bc1f
--- /dev/null
@@ -0,0 +1,35 @@
+# -*- coding: utf-8 -*-
+# vim: ft=yaml
+#
+# Setup variables using grains['osarch'] based logic.
+# You just need to add the key:values for an `osarch` that differ
+# from `defaults.yaml`.
+# Only add an `osarch` which is/will be supported by the formula.
+#
+# If you do not need to provide defaults via the `osarch` grain,
+# you will need to provide at least an empty dict in this file, e.g.
+# osarch: {}
+---
+amd64:
+  arch: amd64
+
+x86_64:
+  arch: amd64
+
+386:
+  arch: 386
+
+arm64:
+  arch: arm64
+
+armv6l:
+  arch: armv6l
+
+armv7l:
+  arch: armv7l
+
+ppc64le:
+  arch: ppc64le
+
+s390x:
+  arch: s390x
diff --git a/TEMPLATE/osfamilymap.yaml b/TEMPLATE/osfamilymap.yaml
new file mode 100644 (file)
index 0000000..6b473a8
--- /dev/null
@@ -0,0 +1,47 @@
+# -*- coding: utf-8 -*-
+# vim: ft=yaml
+#
+# Setup variables using grains['os_family'] based logic.
+# You just need to add the key:values for an `os_family` that differ
+# from `defaults.yaml` + `osarch.yaml`.
+# Only add an `os_family` which is/will be supported by the formula.
+#
+# If you do not need to provide defaults via the `os_family` grain,
+# you will need to provide at least an empty dict in this file, e.g.
+# osfamilymap: {}
+---
+Debian:
+  pkg:
+    name: TEMPLATE-debian
+  config: /etc/TEMPLATE.d/custom.conf
+
+RedHat:
+  pkg:
+    name: TEMPLATE-redhat
+  config: /etc/TEMPLATE.conf
+
+Suse:
+  pkg:
+    name: TEMPLATE-suse
+
+Gentoo: {}
+
+Arch:
+  pkg:
+    name: TEMPLATE-arch
+  service:
+    name: service-arch
+
+Alpine: {}
+
+FreeBSD:
+  rootgroup: wheel
+
+OpenBSD:
+  rootgroup: wheel
+
+Solaris: {}
+
+Windows: {}
+
+MacOS: {}
diff --git a/TEMPLATE/osfingermap.yaml b/TEMPLATE/osfingermap.yaml
new file mode 100644 (file)
index 0000000..7bd9ba7
--- /dev/null
@@ -0,0 +1,49 @@
+# -*- coding: utf-8 -*-
+# vim: ft=yaml
+#
+# Setup variables using grains['osfinger'] based logic.
+# You just need to add the key:values for an `osfinger` that differ
+# from `defaults.yaml` + `osarch.yaml` + `os_family.yaml` + `osmap.yaml`.
+# Only add an `osfinger` which is/will be supported by the formula.
+#
+# If you do not need to provide defaults via the `os_finger` grain,
+# you will need to provide at least an empty dict in this file, e.g.
+# osfingermap: {}
+---
+# os: Debian
+Debian-10: {}
+Debian-9: {}
+Debian-8: {}
+
+# os: Ubuntu
+Ubuntu-18.04:
+  config: /etc/TEMPLATE.d/custom-ubuntu-18.04.conf
+Ubuntu-16.04: {}
+
+# os: Fedora
+Fedora-31: {}
+Fedora-30: {}
+
+# os: CentOS
+CentOS Linux-8: {}
+CentOS Linux-7: {}
+CentOS-6:
+  pkg:
+    name: TEMPLATE-centos-6
+  config: /etc/TEMPLATE.d/custom-centos-6.conf
+
+# os: Amazon
+Amazon Linux-2: {}
+Amazon Linux AMI-2018: {}
+
+# os: SUSE
+Leap-15: {}
+
+# os: FreeBSD
+FreeBSD-12: {}
+
+# os: Windows
+Windows-8.1: {}
+
+# os: Gentoo
+Gentoo-2: {}
diff --git a/TEMPLATE/osmap.yaml b/TEMPLATE/osmap.yaml
new file mode 100644 (file)
index 0000000..9e2d89e
--- /dev/null
@@ -0,0 +1,40 @@
+# -*- coding: utf-8 -*-
+# vim: ft=yaml
+#
+# Setup variables using grains['os'] based logic.
+# You just need to add the key:values for an `os` that differ
+# from `defaults.yaml` + `osarch.yaml` + `os_family.yaml`.
+# Only add an `os` which is/will be supported by the formula.
+#
+# If you do not need to provide defaults via the `os` grain,
+# you will need to provide at least an empty dict in this file, e.g.
+# osmap: {}
+---
+# os_family: Debian
+Ubuntu:
+  pkg:
+    name: TEMPLATE-ubuntu
+  config: /etc/TEMPLATE.d/custom-ubuntu.conf
+Raspbian: {}
+
+# os_family: RedHat
+Fedora:
+  pkg:
+    name: TEMPLATE-fedora
+  service:
+    name: service-fedora
+CentOS: {}
+Amazon: {}
+
+# os_family: Suse
+SUSE: {}
+openSUSE: {}
+
+# os_family: Gentoo
+Funtoo: {}
+
+# os_family: Arch
+Manjaro: {}
+
+# os_family: Solaris
+SmartOS: {}
diff --git a/TEMPLATE/package/clean.sls b/TEMPLATE/package/clean.sls
new file mode 100644 (file)
index 0000000..50b7718
--- /dev/null
@@ -0,0 +1,16 @@
+# -*- coding: utf-8 -*-
+# vim: ft=sls
+
+{#- Get the `tplroot` from `tpldir` #}
+{%- set tplroot = tpldir.split('/')[0] %}
+{%- set sls_config_clean = tplroot ~ '.config.clean' %}
+{%- from tplroot ~ "/map.jinja" import TEMPLATE with context %}
+
+include:
+  - {{ sls_config_clean }}
+
+TEMPLATE-package-clean-pkg-removed:
+  pkg.removed:
+    - name: {{ TEMPLATE.pkg.name }}
+    - require:
+      - sls: {{ sls_config_clean }}
diff --git a/TEMPLATE/package/init.sls b/TEMPLATE/package/init.sls
new file mode 100644 (file)
index 0000000..d3e5518
--- /dev/null
@@ -0,0 +1,5 @@
+# -*- coding: utf-8 -*-
+# vim: ft=sls
+
+include:
+  - .install
diff --git a/TEMPLATE/package/install.sls b/TEMPLATE/package/install.sls
new file mode 100644 (file)
index 0000000..4533b4c
--- /dev/null
@@ -0,0 +1,10 @@
+# -*- coding: utf-8 -*-
+# vim: ft=sls
+
+{#- Get the `tplroot` from `tpldir` #}
+{%- set tplroot = tpldir.split('/')[0] %}
+{%- from tplroot ~ "/map.jinja" import TEMPLATE with context %}
+
+TEMPLATE-package-install-pkg-installed:
+  pkg.installed:
+    - name: {{ TEMPLATE.pkg.name }}
diff --git a/TEMPLATE/service/clean.sls b/TEMPLATE/service/clean.sls
new file mode 100644 (file)
index 0000000..197aca6
--- /dev/null
@@ -0,0 +1,11 @@
+# -*- coding: utf-8 -*-
+# vim: ft=sls
+
+{#- Get the `tplroot` from `tpldir` #}
+{%- set tplroot = tpldir.split('/')[0] %}
+{%- from tplroot ~ "/map.jinja" import TEMPLATE with context %}
+
+TEMPLATE-service-clean-service-dead:
+  service.dead:
+    - name: {{ TEMPLATE.service.name }}
+    - enable: False
diff --git a/TEMPLATE/service/init.sls b/TEMPLATE/service/init.sls
new file mode 100644 (file)
index 0000000..6fe4d1a
--- /dev/null
@@ -0,0 +1,5 @@
+# -*- coding: utf-8 -*-
+# vim: ft=sls
+
+include:
+  - .running
diff --git a/TEMPLATE/service/running.sls b/TEMPLATE/service/running.sls
new file mode 100644 (file)
index 0000000..fb3a3ab
--- /dev/null
@@ -0,0 +1,17 @@
+# -*- coding: utf-8 -*-
+# vim: ft=sls
+
+{#- Get the `tplroot` from `tpldir` #}
+{%- set tplroot = tpldir.split('/')[0] %}
+{%- set sls_config_file = tplroot ~ '.config.file' %}
+{%- from tplroot ~ "/map.jinja" import TEMPLATE with context %}
+
+include:
+  - {{ sls_config_file }}
+
+TEMPLATE-service-running-service-running:
+  service.running:
+    - name: {{ TEMPLATE.service.name }}
+    - enable: True
+    - watch:
+      - sls: {{ sls_config_file }}
diff --git a/TEMPLATE/subcomponent/clean.sls b/TEMPLATE/subcomponent/clean.sls
new file mode 100644 (file)
index 0000000..564769d
--- /dev/null
@@ -0,0 +1,5 @@
+# -*- coding: utf-8 -*-
+# vim: ft=sls
+
+include:
+  - .config.clean
diff --git a/TEMPLATE/subcomponent/config/clean.sls b/TEMPLATE/subcomponent/config/clean.sls
new file mode 100644 (file)
index 0000000..e469804
--- /dev/null
@@ -0,0 +1,16 @@
+# -*- coding: utf-8 -*-
+# vim: ft=sls
+
+{#- Get the `tplroot` from `tpldir` #}
+{%- set tplroot = tpldir.split('/')[0] %}
+{%- set sls_service_clean = tplroot ~ '.service.clean' %}
+{%- from tplroot ~ "/map.jinja" import TEMPLATE with context %}
+
+include:
+  - {{ sls_service_clean }}
+
+TEMPLATE-subcomponent-config-clean-file-absent:
+  file.absent:
+    - name: {{ TEMPLATE.subcomponent.config }}
+    - watch_in:
+        - sls: {{ sls_service_clean }}
diff --git a/TEMPLATE/subcomponent/config/file.sls b/TEMPLATE/subcomponent/config/file.sls
new file mode 100644 (file)
index 0000000..75b415a
--- /dev/null
@@ -0,0 +1,27 @@
+# -*- coding: utf-8 -*-
+# vim: ft=sls
+
+{#- Get the `tplroot` from `tpldir` #}
+{%- set tplroot = tpldir.split('/')[0] %}
+{%- set sls_config_file = tplroot ~ '.config.file' %}
+{%- from tplroot ~ "/map.jinja" import TEMPLATE with context %}
+{%- from tplroot ~ "/libtofs.jinja" import files_switch with context %}
+
+include:
+  - {{ sls_config_file }}
+
+TEMPLATE-subcomponent-config-file-file-managed:
+  file.managed:
+    - name: {{ TEMPLATE.subcomponent.config }}
+    - source: {{ files_switch(['subcomponent-example.tmpl'],
+                              lookup='TEMPLATE-subcomponent-config-file-file-managed',
+                              use_subpath=True
+                 )
+              }}
+    - mode: 644
+    - user: root
+    - group: {{ TEMPLATE.rootgroup }}
+    - makedirs: True
+    - template: jinja
+    - require_in:
+      - sls: {{ sls_config_file }}
diff --git a/TEMPLATE/subcomponent/config/files/default/subcomponent-example.tmpl b/TEMPLATE/subcomponent/config/files/default/subcomponent-example.tmpl
new file mode 100644 (file)
index 0000000..522de00
--- /dev/null
@@ -0,0 +1,6 @@
+########################################################################
+# File managed by Salt at <{{ source }}>.
+# Your changes will be overwritten.
+########################################################################
+
+This is a subcomponent example file from SaltStack template-formula.
diff --git a/TEMPLATE/subcomponent/config/files/default/subcomponent-example.tmpl.jinja b/TEMPLATE/subcomponent/config/files/default/subcomponent-example.tmpl.jinja
new file mode 100644 (file)
index 0000000..cbfd51d
--- /dev/null
@@ -0,0 +1,6 @@
+########################################################################
+# File managed by Salt at <{{ source }}>.
+# Your changes will be overwritten.
+########################################################################
+
+This is another subcomponent example file from SaltStack template-formula.
diff --git a/TEMPLATE/subcomponent/config/init.sls b/TEMPLATE/subcomponent/config/init.sls
new file mode 100644 (file)
index 0000000..465ddfe
--- /dev/null
@@ -0,0 +1,5 @@
+# -*- coding: utf-8 -*-
+# vim: ft=sls
+
+include:
+  - .file
diff --git a/TEMPLATE/subcomponent/init.sls b/TEMPLATE/subcomponent/init.sls
new file mode 100644 (file)
index 0000000..6003be1
--- /dev/null
@@ -0,0 +1,5 @@
+# -*- coding: utf-8 -*-
+# vim: ft=sls
+
+include:
+  - .config
diff --git a/bin/convert-formula.sh b/bin/convert-formula.sh
new file mode 100755 (executable)
index 0000000..03d3710
--- /dev/null
@@ -0,0 +1,59 @@
+#!/usr/bin/env sh
+set -o nounset # Treat unset variables as an error and immediately exit
+set -o errexit # If a command fails exit the whole script
+
+if [ "${DEBUG:-false}" = "true" ]; then
+  set -x # Run the entire script in debug mode
+fi
+
+usage() {
+  echo "usage: $(basename "$0") <new-formula-name>" 1>&2
+  echo 1>&2
+  echo "Convert template-formula to <new-formula-name>-formula." 1>&2
+  echo "<new-formula-name> should be a string of lowercase characters and numbers only." 1>&2
+  echo "<new-formula-name> should not be any of 'bin' 'docs' 'test'." 1>&2
+}
+
+args() {
+  if [ $# -ne 1 ]; then
+    usage
+    exit 1
+  fi
+  NEW_NAME=$1
+  if echo "$NEW_NAME" | grep -E --quiet --invert-match '^[a-z0-9]+$'; then
+    usage
+    exit 1
+  fi
+  if echo bin docs test | grep --quiet --word-regexp "$NEW_NAME"; then
+    usage
+    exit 1
+  fi
+}
+
+convert_formula() {
+  # Empty history and make commit message `semantic-release`-compliant
+  # Works for forks of `template-formula` as well as GitHub "Use this template"
+  # See https://stackoverflow.com/a/15572071/5009408
+  git reset \
+    "$(echo 'feat: initial commit' \
+      | git commit-tree 'HEAD^{tree}')"
+  git rm --quiet bin/convert-formula.sh AUTHORS.md CHANGELOG.md \
+    docs/_static/css/custom.css docs/AUTHORS.rst docs/CHANGELOG.rst \
+    docs/conf.py docs/CONTRIBUTING_DOCS.rst docs/index.rst
+  git mv TEMPLATE "${NEW_NAME}"
+  grep --recursive --files-with-matches --exclude-dir=.git TEMPLATE . \
+    | xargs -L 1 ex -u NONE -sc '%s/TEMPLATE/'"${NEW_NAME}"'/g|x'
+  # Searching across multiple lines.
+  # See https://vim.fandom.com/wiki/Search_across_multiple_lines
+  ex -u NONE -sc '%s/^.. <REMOVEME\_.\{-}.. REMOVEME>/None/g|x' docs/README.rst
+  ex -u NONE -sc '%s/^\s*# <REMOVEME\_.\{-}# REMOVEME>\n//g|x' .travis.yml
+  ex -u NONE -sc '%s/^\s*# <REMOVEME\_.\{-}# REMOVEME>\n//g|x' .rubocop.yml
+  ex -u NONE -sc '%s/^\(version:\).*/\1 1.0.0/g|x' FORMULA
+  # shellcheck disable=SC2016 # Expressions don't expand in single quotes
+  git commit --quiet --all \
+    --message 'feat: convert `template-formula` to `'"${NEW_NAME}"'-formula`' \
+    --message 'BREAKING CHANGE: changed all state names and ids'
+}
+
+args "$@"
+convert_formula
diff --git a/bin/kitchen b/bin/kitchen
new file mode 100755 (executable)
index 0000000..dcfdb4c
--- /dev/null
@@ -0,0 +1,32 @@
+#!/usr/bin/env ruby
+# frozen_string_literal: true
+
+#
+# This file was generated by Bundler.
+#
+# The application 'kitchen' is installed as part of a gem, and
+# this file is here to facilitate running it.
+#
+
+require 'pathname'
+ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile',
+                                           Pathname.new(__FILE__).realpath)
+
+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.'
+    )
+  end
+end
+
+require 'rubygems'
+require 'bundler/setup'
+
+load Gem.bin_path('test-kitchen', 'kitchen')
diff --git a/commitlint.config.js b/commitlint.config.js
new file mode 100644 (file)
index 0000000..2f9d1aa
--- /dev/null
@@ -0,0 +1,3 @@
+module.exports = {
+    extends: ['@commitlint/config-conventional'],
+};
diff --git a/docs/AUTHORS.rst b/docs/AUTHORS.rst
new file mode 100644 (file)
index 0000000..42d9833
--- /dev/null
@@ -0,0 +1,92 @@
+.. role:: raw-html-m2r(raw)
+   :format: html
+
+
+Authors
+=======
+
+This list is sorted by the number of commits per contributor in *descending* order.
+
+.. list-table::
+   :header-rows: 1
+
+   * - Avatar
+     - Contributor
+     - Contributions
+   * - :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>`_
+     - 255
+   * - :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>`_
+     - 27
+   * - :raw-html-m2r:`<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>`_
+     - 18
+   * - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars1.githubusercontent.com/u/13322818?v=4' width='36' height='36' alt='@noelmcloughlin'>`
+     - `@noelmcloughlin <https://github.com/noelmcloughlin>`_
+     - 11
+   * - :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>`_
+     - 10
+   * - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars3.githubusercontent.com/u/3433835?v=4' width='36' height='36' alt='@n-rodriguez'>`
+     - `@n-rodriguez <https://github.com/n-rodriguez>`_
+     - 8
+   * - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars3.githubusercontent.com/u/52996?v=4' width='36' height='36' alt='@daks'>`
+     - `@daks <https://github.com/daks>`_
+     - 7
+   * - :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>`_
+     - 6
+   * - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars0.githubusercontent.com/u/1920805?v=4' width='36' height='36' alt='@alxwr'>`
+     - `@alxwr <https://github.com/alxwr>`_
+     - 5
+   * - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars0.githubusercontent.com/u/1233212?v=4' width='36' height='36' alt='@baby-gnu'>`
+     - `@baby-gnu <https://github.com/baby-gnu>`_
+     - 5
+   * - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars3.githubusercontent.com/u/4542588?v=4' width='36' height='36' alt='@evvers'>`
+     - `@evvers <https://github.com/evvers>`_
+     - 4
+   * - :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>`_
+     - 3
+   * - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars0.githubusercontent.com/u/16338056?v=4' width='36' height='36' alt='@vutny'>`
+     - `@vutny <https://github.com/vutny>`_
+     - 2
+   * - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars2.githubusercontent.com/u/29522418?v=4' width='36' height='36' alt='@k-hamza'>`
+     - `@k-hamza <https://github.com/k-hamza>`_
+     - 2
+   * - :raw-html-m2r:`<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>`_
+     - 2
+   * - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars1.githubusercontent.com/u/3536289?v=4' width='36' height='36' alt='@andygabby'>`
+     - `@andygabby <https://github.com/andygabby>`_
+     - 1
+   * - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars2.githubusercontent.com/u/1269218?v=4' width='36' height='36' alt='@Jokipii'>`
+     - `@Jokipii <https://github.com/Jokipii>`_
+     - 1
+   * - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars3.githubusercontent.com/u/5306980?v=4' width='36' height='36' alt='@johnkeates'>`
+     - `@johnkeates <https://github.com/johnkeates>`_
+     - 1
+   * - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars2.githubusercontent.com/u/611471?v=4' width='36' height='36' alt='@duk3luk3'>`
+     - `@duk3luk3 <https://github.com/duk3luk3>`_
+     - 1
+   * - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars3.githubusercontent.com/u/3075069?v=4' width='36' height='36' alt='@marco-m'>`
+     - `@marco-m <https://github.com/marco-m>`_
+     - 1
+   * - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars2.githubusercontent.com/u/91293?v=4' width='36' height='36' alt='@whiteinge'>`
+     - `@whiteinge <https://github.com/whiteinge>`_
+     - 1
+   * - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars0.githubusercontent.com/u/22272?v=4' width='36' height='36' alt='@sroegner'>`
+     - `@sroegner <https://github.com/sroegner>`_
+     - 1
+   * - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars1.githubusercontent.com/u/117961?v=4' width='36' height='36' alt='@babilen5'>`
+     - `@babilen5 <https://github.com/babilen5>`_
+     - 1
+   * - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars0.githubusercontent.com/u/2205993?v=4' width='36' height='36' alt='@GMAzrael'>`
+     - `@GMAzrael <https://github.com/GMAzrael>`_
+     - 1
+
+
+----
+
+Auto-generated by a `forked version <https://github.com/myii/maintainer>`_ of `gaocegege/maintainer <https://github.com/gaocegege/maintainer>`_ on 2020-04-07.
diff --git a/docs/CHANGELOG.rst b/docs/CHANGELOG.rst
new file mode 100644 (file)
index 0000000..1379e48
--- /dev/null
@@ -0,0 +1,1395 @@
+
+Changelog
+=========
+
+`4.0.6 <https://github.com/saltstack-formulas/template-formula/compare/v4.0.5...v4.0.6>`_ (2020-04-07)
+----------------------------------------------------------------------------------------------------------
+
+Bug Fixes
+^^^^^^^^^
+
+
+* **running.sls:** use ``watch`` not ``require`` to ensure service restart (\ `3a1fc35 <https://github.com/saltstack-formulas/template-formula/commit/3a1fc35a13f66714cd42583f13679c6f189ae48f>`_\ )
+
+Code Refactoring
+^^^^^^^^^^^^^^^^
+
+
+* **libsaltcli:** use the ``opts`` dict throughout [skip ci] (\ `69b632f <https://github.com/saltstack-formulas/template-formula/commit/69b632fbe613d4f99a48f59f64ec93c3897431c8>`_\ )
+
+Continuous Integration
+^^^^^^^^^^^^^^^^^^^^^^
+
+
+* **kitchen+travis:** adjust matrix to add ``3000`` & remove ``2017.7`` [skip ci] (\ `f81c372 <https://github.com/saltstack-formulas/template-formula/commit/f81c372dfe12d42139275fc8c9e7aad1b6eec976>`_\ )
+* **kitchen+travis:** adjust matrix to update ``3000`` to ``3000.1`` [skip ci] (\ `f48a727 <https://github.com/saltstack-formulas/template-formula/commit/f48a7275644d2baef06adb0d8e74b3c19fd2d8a0>`_\ )
+
+`4.0.5 <https://github.com/saltstack-formulas/template-formula/compare/v4.0.4...v4.0.5>`_ (2020-03-23)
+----------------------------------------------------------------------------------------------------------
+
+Bug Fixes
+^^^^^^^^^
+
+
+* **libtofs:** “files_switch” mess up the variable exported by “map.jinja” [skip ci] (\ `241646f <https://github.com/saltstack-formulas/template-formula/commit/241646fe96447369df00f17ec1c27a53de08bec4>`_\ )
+
+Code Refactoring
+^^^^^^^^^^^^^^^^
+
+
+* **service:** use ``systemd-journald`` instead of ``systemd-udevd`` (\ `a265105 <https://github.com/saltstack-formulas/template-formula/commit/a2651058be0d8b09f910aeee2f23703b6cefaa09>`_\ )
+
+`4.0.4 <https://github.com/saltstack-formulas/template-formula/compare/v4.0.3...v4.0.4>`_ (2020-02-14)
+----------------------------------------------------------------------------------------------------------
+
+Bug Fixes
+^^^^^^^^^
+
+
+* **libtofs:** “files_switch” mess up the variable defined by “map.jinja” (\ `ab4ce75 <https://github.com/saltstack-formulas/template-formula/commit/ab4ce751a4640303af7acbf7a278aef79b530bb6>`_\ )
+
+Continuous Integration
+^^^^^^^^^^^^^^^^^^^^^^
+
+
+* **kitchen:** avoid using bootstrap for ``master`` instances (\ `6ecdb99 <https://github.com/saltstack-formulas/template-formula/commit/6ecdb99f83b807b4679dc6534ae425b97eefbe54>`_\ )
+
+`4.0.3 <https://github.com/saltstack-formulas/template-formula/compare/v4.0.2...v4.0.3>`_ (2020-01-27)
+----------------------------------------------------------------------------------------------------------
+
+Bug Fixes
+^^^^^^^^^
+
+
+* fix ``CentOS Linux-7`` and add ``os`` details from current CI setup (\ `4be16ca <https://github.com/saltstack-formulas/template-formula/commit/4be16ca4befeddeeb8be1199cd088df7c547523f>`_\ )
+* **travis:** reinstate conversion test [skip ci] (\ `5d47fda <https://github.com/saltstack-formulas/template-formula/commit/5d47fda1b9f52bff1a4c2cad5097cd3d8cd43521>`_\ )
+
+Continuous Integration
+^^^^^^^^^^^^^^^^^^^^^^
+
+
+* **travis:** use ``major.minor`` for ``semantic-release`` version [skip ci] (\ `e9bfb71 <https://github.com/saltstack-formulas/template-formula/commit/e9bfb71fdc0fa80ac63e6ce724f0e5621a4b30ca>`_\ )
+
+`4.0.2 <https://github.com/saltstack-formulas/template-formula/compare/v4.0.1...v4.0.2>`_ (2019-12-19)
+----------------------------------------------------------------------------------------------------------
+
+Bug Fixes
+^^^^^^^^^
+
+
+* **convert-formula.sh:** remove "Using this template" post-conversion (\ `55ab937 <https://github.com/saltstack-formulas/template-formula/commit/55ab937c047374fce0548d8c18e8513bc15ead78>`_\ )
+* **convert-formula.sh:** remove ``rubocop`` override post-conversion (\ `aca4e44 <https://github.com/saltstack-formulas/template-formula/commit/aca4e4428964da745e7b1b7dce15d2c751f76490>`_\ )
+* **convert-formula.sh:** remove CI test post-conversion (\ `06ec949 <https://github.com/saltstack-formulas/template-formula/commit/06ec949fd17bb4b52bb230a6ad2eddfe08a4e693>`_\ )
+* **convert-formula.sh:** reset version to ``1.0.0`` (\ `39889ce <https://github.com/saltstack-formulas/template-formula/commit/39889ce303cb57125ba0411ab55266ee018d40e1>`_\ )
+
+Documentation
+^^^^^^^^^^^^^
+
+
+* **convert-formula.sh:** add usage guide (\ `539a335 <https://github.com/saltstack-formulas/template-formula/commit/539a335f8b01ffb3944b742cc2f5852a718546dd>`_\ )
+
+`4.0.1 <https://github.com/saltstack-formulas/template-formula/compare/v4.0.0...v4.0.1>`_ (2019-12-17)
+----------------------------------------------------------------------------------------------------------
+
+Bug Fixes
+^^^^^^^^^
+
+
+* **convert-formula.sh:** apply remaining suggestions from `#180 <https://github.com/saltstack-formulas/template-formula/issues/180>`_ (\ `76ecd44 <https://github.com/saltstack-formulas/template-formula/commit/76ecd447be66fd9b33ace56836796d3ce24537db>`_\ ), closes `/github.com/saltstack-formulas/template-formula/pull/180#discussion_r357308821 <https://github.com//github.com/saltstack-formulas/template-formula/pull/180/issues/discussion_r357308821>`_ `/github.com/saltstack-formulas/template-formula/pull/180#discussion_r357318860 <https://github.com//github.com/saltstack-formulas/template-formula/pull/180/issues/discussion_r357318860>`_ `/github.com/saltstack-formulas/template-formula/pull/180#discussion_r357362707 <https://github.com//github.com/saltstack-formulas/template-formula/pull/180/issues/discussion_r357362707>`_
+
+`4.0.0 <https://github.com/saltstack-formulas/template-formula/compare/v3.3.4...v4.0.0>`_ (2019-12-16)
+----------------------------------------------------------------------------------------------------------
+
+Code Refactoring
+^^^^^^^^^^^^^^^^
+
+
+* improve reusability using an unique keyword TEMPLATE (\ `2e8ded6 <https://github.com/saltstack-formulas/template-formula/commit/2e8ded6565f7bad166323792bf42979aac2980fa>`_\ )
+
+Continuous Integration
+^^^^^^^^^^^^^^^^^^^^^^
+
+
+* **gemfile:** restrict ``train`` gem version until upstream fix [skip ci] (\ `1b6164f <https://github.com/saltstack-formulas/template-formula/commit/1b6164fc4a5bda44e8cb1104039606603dab4c2e>`_\ )
+* **travis:** quote pathspecs used with ``git ls-files`` [skip ci] (\ `341f495 <https://github.com/saltstack-formulas/template-formula/commit/341f495336da0e35d92b3b4acda30f9efa44ec52>`_\ )
+
+Features
+^^^^^^^^
+
+
+* add script to ease conversion from template to real formula (\ `edfa269 <https://github.com/saltstack-formulas/template-formula/commit/edfa269e9655407ca26788a8d5564c759abbbb30>`_\ )
+
+Tests
+^^^^^
+
+
+* add CI test of conversion script (\ `7ad85ae <https://github.com/saltstack-formulas/template-formula/commit/7ad85ae0db21888921efabbc88bcafbc65e5bd21>`_\ )
+
+BREAKING CHANGES
+^^^^^^^^^^^^^^^^
+
+
+* changed all state names and ids
+
+`3.3.4 <https://github.com/saltstack-formulas/template-formula/compare/v3.3.3...v3.3.4>`_ (2019-11-27)
+----------------------------------------------------------------------------------------------------------
+
+Bug Fixes
+^^^^^^^^^
+
+
+* **release.config.js:** use full commit hash in commit link [skip ci] (\ `4ac8d92 <https://github.com/saltstack-formulas/template-formula/commit/4ac8d92778977ed63fe99e4506a2b0a2d41a2bce>`_\ )
+
+Continuous Integration
+^^^^^^^^^^^^^^^^^^^^^^
+
+
+* **kitchen:** use ``debian-10-master-py3`` instead of ``develop`` [skip ci] (\ `14ebf92 <https://github.com/saltstack-formulas/template-formula/commit/14ebf928bc07cefa086523e63bed5df7c2879e9b>`_\ )
+* **kitchen:** use ``develop`` image until ``master`` is ready (\ ``amazonlinux``\ ) [skip ci] (\ `42482d7 <https://github.com/saltstack-formulas/template-formula/commit/42482d7f9b77f5d34417e25233a9f385075feace>`_\ )
+* **kitchen+travis:** upgrade matrix after ``2019.2.2`` release [skip ci] (\ `d0e07b8 <https://github.com/saltstack-formulas/template-formula/commit/d0e07b88834f68cc81ce4de34c14a880347fc497>`_\ )
+* **travis:** apply changes from build config validation [skip ci] (\ `b625245 <https://github.com/saltstack-formulas/template-formula/commit/b625245fc62deb6da7cb35de1280ec267718b1cd>`_\ )
+* **travis:** opt-in to ``dpl v2`` to complete build config validation [skip ci] (\ `f1fbf7f <https://github.com/saltstack-formulas/template-formula/commit/f1fbf7f620c886827c70fb3970e3b2fac58b8db8>`_\ )
+* **travis:** run ``shellcheck`` during lint job (\ `a711665 <https://github.com/saltstack-formulas/template-formula/commit/a7116654d875ecb0e7e3e10fc96cbab2e91575f7>`_\ )
+* **travis:** update ``salt-lint`` config for ``v0.0.10`` [skip ci] (\ `faea464 <https://github.com/saltstack-formulas/template-formula/commit/faea464f923f552e23a83f28e3192c437f7eabfe>`_\ )
+* **travis:** use build config validation (beta) [skip ci] (\ `66494bb <https://github.com/saltstack-formulas/template-formula/commit/66494bbc1058adc9ed6fa0074b1c4b6018c4cd48>`_\ )
+
+Performance Improvements
+^^^^^^^^^^^^^^^^^^^^^^^^
+
+
+* **travis:** improve ``salt-lint`` invocation [skip ci] (\ `7a96cd7 <https://github.com/saltstack-formulas/template-formula/commit/7a96cd77db71eb8b022df7bd5c1014664124a022>`_\ )
+
+`3.3.3 <https://github.com/saltstack-formulas/template-formula/compare/v3.3.2...v3.3.3>`_ (2019-10-16)
+----------------------------------------------------------------------------------------------------------
+
+Documentation
+^^^^^^^^^^^^^
+
+
+* **contributing:** add recent ``semantic-release`` formulas [skip ci] (\ ` <https://github.com/saltstack-formulas/template-formula/commit/e6fb519>`_\ )
+* **contributing:** remove to use org-level file instead [skip ci] (\ ` <https://github.com/saltstack-formulas/template-formula/commit/d2ebccf>`_\ )
+* **readme:** update link to ``CONTRIBUTING`` [skip ci] (\ ` <https://github.com/saltstack-formulas/template-formula/commit/ed61d09>`_\ )
+* **reamde:** have special notes section (\ ` <https://github.com/saltstack-formulas/template-formula/commit/c68aed5>`_\ )
+
+`3.3.2 <https://github.com/saltstack-formulas/template-formula/compare/v3.3.1...v3.3.2>`_ (2019-10-08)
+----------------------------------------------------------------------------------------------------------
+
+Bug Fixes
+^^^^^^^^^
+
+
+* **rubocop:** add fixes using ``rubocop --safe-auto-correct`` (\ `484ce24 <https://github.com/saltstack-formulas/template-formula/commit/484ce24>`_\ )
+* **rubocop:** fix remaining errors manually (\ `9566b6f <https://github.com/saltstack-formulas/template-formula/commit/9566b6f>`_\ )
+
+Code Refactoring
+^^^^^^^^^^^^^^^^
+
+
+* **travis:** merge ``lint`` stage into the ``test`` stage (\ `d3b93f8 <https://github.com/saltstack-formulas/template-formula/commit/d3b93f8>`_\ )
+
+Continuous Integration
+^^^^^^^^^^^^^^^^^^^^^^
+
+
+* **kitchen:** install required packages to bootstrapped ``opensuse`` [skip ci] (\ `1cfed60 <https://github.com/saltstack-formulas/template-formula/commit/1cfed60>`_\ )
+* **kitchen:** use bootstrapped ``opensuse`` images until ``2019.2.2`` [skip ci] (\ `0467bdf <https://github.com/saltstack-formulas/template-formula/commit/0467bdf>`_\ )
+* **travis:** quote ``${INSTANCE}`` when running ``kitchen verify`` (\ `00d56a4 <https://github.com/saltstack-formulas/template-formula/commit/00d56a4>`_\ ), closes `/github.com/saltstack-formulas/template-formula/pull/175#discussion_r332525964 <https://github.com//github.com/saltstack-formulas/template-formula/pull/175/issues/discussion_r332525964>`_
+* **travis:** run ``rubocop`` during the ``Lint`` job (\ `8d8c766 <https://github.com/saltstack-formulas/template-formula/commit/8d8c766>`_\ )
+* **travis:** run ``salt-lint`` during the ``Lint`` job (\ `2df4646 <https://github.com/saltstack-formulas/template-formula/commit/2df4646>`_\ ), closes `/freenode.logbot.info/saltstack-formulas/20191004#c2723464 <https://github.com//freenode.logbot.info/saltstack-formulas/20191004/issues/c2723464>`_ `/freenode.logbot.info/saltstack-formulas/20191004#c2724272 <https://github.com//freenode.logbot.info/saltstack-formulas/20191004/issues/c2724272>`_
+* **travis:** use ``env`` and ``name`` for improved display in Travis (\ `5f773d1 <https://github.com/saltstack-formulas/template-formula/commit/5f773d1>`_\ ), closes `/github.com/saltstack-formulas/template-formula/pull/175#discussion_r332613933 <https://github.com//github.com/saltstack-formulas/template-formula/pull/175/issues/discussion_r332613933>`_
+
+Documentation
+^^^^^^^^^^^^^
+
+
+* **bug_report:** add section requesting commit hash / release tag (\ `faccb6a <https://github.com/saltstack-formulas/template-formula/commit/faccb6a>`_\ )
+* **bug_report:** group into sections for better logical ordering (\ `e9b6c2f <https://github.com/saltstack-formulas/template-formula/commit/e9b6c2f>`_\ )
+* **contributing:** add recent ``semantic-release`` formula (\ `c2924b0 <https://github.com/saltstack-formulas/template-formula/commit/c2924b0>`_\ )
+* **contributing:** add recent ``semantic-release`` formula (\ `8d2318c <https://github.com/saltstack-formulas/template-formula/commit/8d2318c>`_\ )
+* **contributing:** add recent ``semantic-release`` formula [skip ci] (\ `85118de <https://github.com/saltstack-formulas/template-formula/commit/85118de>`_\ )
+* **issues:** provide ``Bug report`` & ``Feature request`` templates (\ `f90f1f6 <https://github.com/saltstack-formulas/template-formula/commit/f90f1f6>`_\ )
+* **issues:** use ``Meta`` instead of ``Optional`` as suggested (\ `65cadb4 <https://github.com/saltstack-formulas/template-formula/commit/65cadb4>`_\ ), closes `/github.com/saltstack-formulas/template-formula/pull/174#issuecomment-538999459 <https://github.com//github.com/saltstack-formulas/template-formula/pull/174/issues/issuecomment-538999459>`_
+* **issues:** use larger headings (from level 4 to level 3) (\ `53e7b75 <https://github.com/saltstack-formulas/template-formula/commit/53e7b75>`_\ )
+* **pillar.example:** fix TOFS comment to explain the default path [skip ci] (\ `fde5063 <https://github.com/saltstack-formulas/template-formula/commit/fde5063>`_\ ), closes `/github.com/saltstack-formulas/libvirt-formula/pull/60#issuecomment-537965254 <https://github.com//github.com/saltstack-formulas/libvirt-formula/pull/60/issues/issuecomment-537965254>`_ `/github.com/saltstack-formulas/libvirt-formula/pull/60#issuecomment-537988138 <https://github.com//github.com/saltstack-formulas/libvirt-formula/pull/60/issues/issuecomment-537988138>`_
+* **pillar.example:** improve TOFS comment to explain the default path [skip ci] (\ `27d2fe4 <https://github.com/saltstack-formulas/template-formula/commit/27d2fe4>`_\ ), closes `/github.com/saltstack-formulas/nginx-formula/blob/17291a0ae2c2554707b79d897bb6ddec716e8426/pillar.example#L340-L341 <https://github.com//github.com/saltstack-formulas/nginx-formula/blob/17291a0ae2c2554707b79d897bb6ddec716e8426/pillar.example/issues/L340-L341>`_
+
+`3.3.1 <https://github.com/saltstack-formulas/template-formula/compare/v3.3.0...v3.3.1>`_ (2019-09-23)
+----------------------------------------------------------------------------------------------------------
+
+Bug Fixes
+^^^^^^^^^
+
+
+* **subcomponent:** clean referencing wrong sls (\ `394808e <https://github.com/saltstack-formulas/template-formula/commit/394808e>`_\ )
+
+Continuous Integration
+^^^^^^^^^^^^^^^^^^^^^^
+
+
+* use ``dist: bionic`` & apply ``opensuse-leap-15`` SCP error workaround (\ `330b0cb <https://github.com/saltstack-formulas/template-formula/commit/330b0cb>`_\ )
+* **kitchen:** change ``log_level`` to ``debug`` instead of ``info`` (\ `1b929ff <https://github.com/saltstack-formulas/template-formula/commit/1b929ff>`_\ )
+* **platform:** add ``arch-base-latest`` (\ `042e8e2 <https://github.com/saltstack-formulas/template-formula/commit/042e8e2>`_\ )
+* **yamllint:** add rule ``empty-values`` & use new ``yaml-files`` setting (\ `70ed7e2 <https://github.com/saltstack-formulas/template-formula/commit/70ed7e2>`_\ ), closes `#164 <https://github.com/saltstack-formulas/template-formula/issues/164>`_
+
+Documentation
+^^^^^^^^^^^^^
+
+
+* **contributing:** add recent ``semantic-release`` formulas (\ `7f36ae9 <https://github.com/saltstack-formulas/template-formula/commit/7f36ae9>`_\ )
+
+`3.3.0 <https://github.com/saltstack-formulas/template-formula/compare/v3.2.1...v3.3.0>`_ (2019-08-27)
+----------------------------------------------------------------------------------------------------------
+
+Bug Fixes
+^^^^^^^^^
+
+
+* **libtofs:** avoid using subpath by default (\ `c07471d <https://github.com/saltstack-formulas/template-formula/commit/c07471d>`_\ )
+
+Code Refactoring
+^^^^^^^^^^^^^^^^
+
+
+* **libtofs:** remove deprecated ``v1_path_prefix`` argument (\ `ad2a965 <https://github.com/saltstack-formulas/template-formula/commit/ad2a965>`_\ )
+
+Features
+^^^^^^^^
+
+
+* **yamllint:** include for this repo and apply rules throughout (\ `e76525f <https://github.com/saltstack-formulas/template-formula/commit/e76525f>`_\ )
+
+`3.2.1 <https://github.com/saltstack-formulas/template-formula/compare/v3.2.0...v3.2.1>`_ (2019-08-06)
+----------------------------------------------------------------------------------------------------------
+
+Code Refactoring
+^^^^^^^^^^^^^^^^
+
+
+* **tofs:** move subcomponent definition to ``defaults.yaml`` (\ `c269673 <https://github.com/saltstack-formulas/template-formula/commit/c269673>`_\ )
+* **tofs:** move subcomponent templates to first ``source`` match (\ `70cc92d <https://github.com/saltstack-formulas/template-formula/commit/70cc92d>`_\ )
+
+Continuous Integration
+^^^^^^^^^^^^^^^^^^^^^^
+
+
+* **kitchen+travis:** replace EOL pre-salted images (\ `42ab22c <https://github.com/saltstack-formulas/template-formula/commit/42ab22c>`_\ )
+
+`3.2.0 <https://github.com/saltstack-formulas/template-formula/compare/v3.1.1...v3.2.0>`_ (2019-08-03)
+----------------------------------------------------------------------------------------------------------
+
+Bug Fixes
+^^^^^^^^^
+
+
+* **formula:** update to current oldest supported version of Salt (\ `878eca1 <https://github.com/saltstack-formulas/template-formula/commit/878eca1>`_\ )
+
+Documentation
+^^^^^^^^^^^^^
+
+
+* **libtofs:** explain usage of sub-directory for components (\ `42a75d9 <https://github.com/saltstack-formulas/template-formula/commit/42a75d9>`_\ )
+* **readme:** describe the new “template.subcomponent” states (\ `6b595cd <https://github.com/saltstack-formulas/template-formula/commit/6b595cd>`_\ )
+
+Features
+^^^^^^^^
+
+
+* **sub-component:** manage a dedicated configuration file (\ `c4440d7 <https://github.com/saltstack-formulas/template-formula/commit/c4440d7>`_\ )
+* **tofs:** lookup files directory in “tpldir” hierarchy (\ `5c495fb <https://github.com/saltstack-formulas/template-formula/commit/5c495fb>`_\ )
+
+Tests
+^^^^^
+
+
+* **inspec:** verify subcomponent configuration file (\ `fd55e03 <https://github.com/saltstack-formulas/template-formula/commit/fd55e03>`_\ )
+
+`3.1.1 <https://github.com/saltstack-formulas/template-formula/compare/v3.1.0...v3.1.1>`_ (2019-07-25)
+----------------------------------------------------------------------------------------------------------
+
+Bug Fixes
+^^^^^^^^^
+
+
+* **tofs:** prepend the config-based ``source_files`` to the default (\ `3483e76 <https://github.com/saltstack-formulas/template-formula/commit/3483e76>`_\ ), closes `/github.com/saltstack-formulas/nginx-formula/pull/247#issuecomment-514262549 <https://github.com//github.com/saltstack-formulas/nginx-formula/pull/247/issues/issuecomment-514262549>`_ `#151 <https://github.com/saltstack-formulas/template-formula/issues/151>`_
+
+Documentation
+^^^^^^^^^^^^^
+
+
+* **tofs:** ensure merged will all recent changes (\ `6a614d9 <https://github.com/saltstack-formulas/template-formula/commit/6a614d9>`_\ )
+* **tofs:** update from ``nginx-formula`` (\ `23a221e <https://github.com/saltstack-formulas/template-formula/commit/23a221e>`_\ ), closes `/github.com/saltstack-formulas/nginx-formula/pull/238#discussion_r289124365 <https://github.com//github.com/saltstack-formulas/nginx-formula/pull/238/issues/discussion_r289124365>`_
+
+`3.1.0 <https://github.com/saltstack-formulas/template-formula/compare/v3.0.9...v3.1.0>`_ (2019-07-24)
+----------------------------------------------------------------------------------------------------------
+
+Bug Fixes
+^^^^^^^^^
+
+
+* **grain:** fix grain value (\ `26edfa0 <https://github.com/saltstack-formulas/template-formula/commit/26edfa0>`_\ )
+
+Documentation
+^^^^^^^^^^^^^
+
+
+* **map:** update comments in ``os*.yaml`` after adding ``osarchmap`` (\ `d71a258 <https://github.com/saltstack-formulas/template-formula/commit/d71a258>`_\ )
+
+Features
+^^^^^^^^
+
+
+* **mapping:** introduce osarchmap per issue `#13 <https://github.com/saltstack-formulas/template-formula/issues/13>`_ (\ `41ac40d <https://github.com/saltstack-formulas/template-formula/commit/41ac40d>`_\ )
+
+Tests
+^^^^^
+
+
+* **osarch:** add unit test for osarch (\ `1be2052 <https://github.com/saltstack-formulas/template-formula/commit/1be2052>`_\ )
+
+`3.0.9 <https://github.com/saltstack-formulas/template-formula/compare/v3.0.8...v3.0.9>`_ (2019-07-24)
+----------------------------------------------------------------------------------------------------------
+
+Bug Fixes
+^^^^^^^^^
+
+
+* **libtofs:** don't crash if “tofs.files_switch” lookup a list (\ `0979d35 <https://github.com/saltstack-formulas/template-formula/commit/0979d35>`_\ )
+
+Documentation
+^^^^^^^^^^^^^
+
+
+* **contributing:** add recent ``semantic-release`` formula (\ `f9def86 <https://github.com/saltstack-formulas/template-formula/commit/f9def86>`_\ )
+* **contributing:** add recent ``semantic-release`` formula (\ `ed8c55a <https://github.com/saltstack-formulas/template-formula/commit/ed8c55a>`_\ )
+* **contributing:** add recent ``semantic-release`` formulas (\ `57d0b85 <https://github.com/saltstack-formulas/template-formula/commit/57d0b85>`_\ )
+
+Tests
+^^^^^
+
+
+* **libtofs:** “tofs.files_switch” lookup can return a list (\ `13f1728 <https://github.com/saltstack-formulas/template-formula/commit/13f1728>`_\ )
+
+`3.0.8 <https://github.com/saltstack-formulas/template-formula/compare/v3.0.7...v3.0.8>`_ (2019-07-08)
+----------------------------------------------------------------------------------------------------------
+
+Documentation
+^^^^^^^^^^^^^
+
+
+* **contributing:** add template-formula to ``semantic-release`` formulas (\ `87e4ebc <https://github.com/saltstack-formulas/template-formula/commit/87e4ebc>`_\ )
+
+`3.0.7 <https://github.com/saltstack-formulas/template-formula/compare/v3.0.6...v3.0.7>`_ (2019-07-04)
+----------------------------------------------------------------------------------------------------------
+
+Documentation
+^^^^^^^^^^^^^
+
+
+* **contributing:** add recent ``semantic-release`` formula (\ `c679cb5 <https://github.com/saltstack-formulas/template-formula/commit/c679cb5>`_\ )
+
+`3.0.6 <https://github.com/saltstack-formulas/template-formula/compare/v3.0.5...v3.0.6>`_ (2019-06-28)
+----------------------------------------------------------------------------------------------------------
+
+Code Refactoring
+^^^^^^^^^^^^^^^^
+
+
+* **string:** remove capitalisation from 'template' string (\ `7062210 <https://github.com/saltstack-formulas/template-formula/commit/7062210>`_\ )
+
+`3.0.5 <https://github.com/saltstack-formulas/template-formula/compare/v3.0.4...v3.0.5>`_ (2019-06-28)
+----------------------------------------------------------------------------------------------------------
+
+Documentation
+^^^^^^^^^^^^^
+
+
+* **contributing:** add recent ``semantic-release`` formula (\ `fc50a9e <https://github.com/saltstack-formulas/template-formula/commit/fc50a9e>`_\ )
+
+`3.0.4 <https://github.com/saltstack-formulas/template-formula/compare/v3.0.3...v3.0.4>`_ (2019-06-27)
+----------------------------------------------------------------------------------------------------------
+
+Documentation
+^^^^^^^^^^^^^
+
+
+* **contributing:** add recent ``semantic-release`` formulas (\ `22052fc <https://github.com/saltstack-formulas/template-formula/commit/22052fc>`_\ )
+
+`3.0.3 <https://github.com/saltstack-formulas/template-formula/compare/v3.0.2...v3.0.3>`_ (2019-06-25)
+----------------------------------------------------------------------------------------------------------
+
+Documentation
+^^^^^^^^^^^^^
+
+
+* **contributing:** add recent ``semantic-release`` formula (\ `7f56237 <https://github.com/saltstack-formulas/template-formula/commit/7f56237>`_\ )
+
+`3.0.2 <https://github.com/saltstack-formulas/template-formula/compare/v3.0.1...v3.0.2>`_ (2019-06-20)
+----------------------------------------------------------------------------------------------------------
+
+Documentation
+^^^^^^^^^^^^^
+
+
+* **contributing:** add recent ``semantic-release`` formulas (\ `461c7a5 <https://github.com/saltstack-formulas/template-formula/commit/461c7a5>`_\ )
+
+`3.0.1 <https://github.com/saltstack-formulas/template-formula/compare/v3.0.0...v3.0.1>`_ (2019-06-16)
+----------------------------------------------------------------------------------------------------------
+
+Tests
+^^^^^
+
+
+* **inspec:** readme for default profile & os-name depreciated (\ `3fa7bce <https://github.com/saltstack-formulas/template-formula/commit/3fa7bce>`_\ )
+
+`3.0.0 <https://github.com/saltstack-formulas/template-formula/compare/v2.2.1...v3.0.0>`_ (2019-06-13)
+----------------------------------------------------------------------------------------------------------
+
+Code Refactoring
+^^^^^^^^^^^^^^^^
+
+
+* **pkgname:** reserve 'pkg' as packaging dict (\ `c6ae81c <https://github.com/saltstack-formulas/template-formula/commit/c6ae81c>`_\ )
+
+Continuous Integration
+^^^^^^^^^^^^^^^^^^^^^^
+
+
+* **kitchen+travis:** modify matrix to include ``develop`` platform (\ `7b5d4ff <https://github.com/saltstack-formulas/template-formula/commit/7b5d4ff>`_\ )
+
+BREAKING CHANGES
+^^^^^^^^^^^^^^^^
+
+
+* **pkgname:** the parameter ``pkg`` is now a dictionary. References
+  to ``template.pkg`` should be changed to ``template.pkg.name``.
+
+`2.2.1 <https://github.com/saltstack-formulas/template-formula/compare/v2.2.0...v2.2.1>`_ (2019-05-31)
+----------------------------------------------------------------------------------------------------------
+
+Code Refactoring
+^^^^^^^^^^^^^^^^
+
+
+* **\ ``osfamilymap``\ :** avoid *BSD ambiguity with MacOS ``rootgroup`` (\ `3338605 <https://github.com/saltstack-formulas/template-formula/commit/3338605>`_\ )
+
+`2.2.0 <https://github.com/saltstack-formulas/template-formula/compare/v2.1.18...v2.2.0>`_ (2019-05-31)
+-----------------------------------------------------------------------------------------------------------
+
+Features
+^^^^^^^^
+
+
+* **macos:** basic package and group handling (\ `8c3fe22 <https://github.com/saltstack-formulas/template-formula/commit/8c3fe22>`_\ )
+
+`2.1.18 <https://github.com/saltstack-formulas/template-formula/compare/v2.1.17...v2.1.18>`_ (2019-05-29)
+-------------------------------------------------------------------------------------------------------------
+
+Bug Fixes
+^^^^^^^^^
+
+
+* **\ ``libtofs``\ :** use ``select`` to deal with empty strings in path (\ `afe0751 <https://github.com/saltstack-formulas/template-formula/commit/afe0751>`_\ )
+* **\ ``libtofs``\ :** use ``strip`` to deal with leading/trailing slashes (\ `2563a46 <https://github.com/saltstack-formulas/template-formula/commit/2563a46>`_\ )
+
+`2.1.17 <https://github.com/saltstack-formulas/template-formula/compare/v2.1.16...v2.1.17>`_ (2019-05-27)
+-------------------------------------------------------------------------------------------------------------
+
+Continuous Integration
+^^^^^^^^^^^^^^^^^^^^^^
+
+
+* **kitchen:** add Bundler binstub for Kitchen (\ `7bb7c53 <https://github.com/saltstack-formulas/template-formula/commit/7bb7c53>`_\ )
+
+Documentation
+^^^^^^^^^^^^^
+
+
+* **readme:** tidy headings (\ `d931ed1 <https://github.com/saltstack-formulas/template-formula/commit/d931ed1>`_\ )
+
+`2.1.16 <https://github.com/saltstack-formulas/template-formula/compare/v2.1.15...v2.1.16>`_ (2019-05-27)
+-------------------------------------------------------------------------------------------------------------
+
+Documentation
+^^^^^^^^^^^^^
+
+
+* **contributing:** add ufw formula to semantic release formulas (\ `18ff689 <https://github.com/saltstack-formulas/template-formula/commit/18ff689>`_\ )
+
+`2.1.15 <https://github.com/saltstack-formulas/template-formula/compare/v2.1.14...v2.1.15>`_ (2019-05-25)
+-------------------------------------------------------------------------------------------------------------
+
+Tests
+^^^^^
+
+
+* **\ ``services_spec``\ :** remove temporary ``suse`` conditional (\ `00d4a77 <https://github.com/saltstack-formulas/template-formula/commit/00d4a77>`_\ )
+
+`2.1.14 <https://github.com/saltstack-formulas/template-formula/compare/v2.1.13...v2.1.14>`_ (2019-05-25)
+-------------------------------------------------------------------------------------------------------------
+
+Bug Fixes
+^^^^^^^^^
+
+
+* **\ ``config/file``\ :** add missing space before Jinja ``}}`` (\ `5cd08ab <https://github.com/saltstack-formulas/template-formula/commit/5cd08ab>`_\ )
+
+`2.1.13 <https://github.com/saltstack-formulas/template-formula/compare/v2.1.12...v2.1.13>`_ (2019-05-24)
+-------------------------------------------------------------------------------------------------------------
+
+Documentation
+^^^^^^^^^^^^^
+
+
+* **readme:** add testing requirements section (from ``vault-formula``\ ) (\ `e04413e <https://github.com/saltstack-formulas/template-formula/commit/e04413e>`_\ )
+
+`2.1.12 <https://github.com/saltstack-formulas/template-formula/compare/v2.1.11...v2.1.12>`_ (2019-05-24)
+-------------------------------------------------------------------------------------------------------------
+
+Continuous Integration
+^^^^^^^^^^^^^^^^^^^^^^
+
+
+* **travis:** improve recommended matrix usage comment (\ `b08a0fd <https://github.com/saltstack-formulas/template-formula/commit/b08a0fd>`_\ )
+* **travis:** reduce matrix down to 6 instances (ref: `#118 <https://github.com/saltstack-formulas/template-formula/issues/118>`_\ ) (\ `a8834e2 <https://github.com/saltstack-formulas/template-formula/commit/a8834e2>`_\ )
+
+Documentation
+^^^^^^^^^^^^^
+
+
+* **contributing:** add ``bind-formula`` to ``semantic-release`` formulas (\ `3da78b0 <https://github.com/saltstack-formulas/template-formula/commit/3da78b0>`_\ )
+
+`2.1.11 <https://github.com/saltstack-formulas/template-formula/compare/v2.1.10...v2.1.11>`_ (2019-05-18)
+-------------------------------------------------------------------------------------------------------------
+
+Documentation
+^^^^^^^^^^^^^
+
+
+* **contributing:** add recent ``semantic-release`` formula (\ `486b393 <https://github.com/saltstack-formulas/template-formula/commit/486b393>`_\ )
+
+`2.1.10 <https://github.com/saltstack-formulas/template-formula/compare/v2.1.9...v2.1.10>`_ (2019-05-16)
+------------------------------------------------------------------------------------------------------------
+
+Documentation
+^^^^^^^^^^^^^
+
+
+* **contributing:** fix link to contributing docs (\ `b6a33d3 <https://github.com/saltstack-formulas/template-formula/commit/b6a33d3>`_\ )
+
+`2.1.9 <https://github.com/saltstack-formulas/template-formula/compare/v2.1.8...v2.1.9>`_ (2019-05-16)
+----------------------------------------------------------------------------------------------------------
+
+Documentation
+^^^^^^^^^^^^^
+
+
+* move contributing sections and links to ease adaptation (\ `741896d <https://github.com/saltstack-formulas/template-formula/commit/741896d>`_\ )
+
+`2.1.8 <https://github.com/saltstack-formulas/template-formula/compare/v2.1.7...v2.1.8>`_ (2019-05-16)
+----------------------------------------------------------------------------------------------------------
+
+Documentation
+^^^^^^^^^^^^^
+
+
+* **contributing:** add recent ``semantic-release`` formulas (\ `#110 <https://github.com/saltstack-formulas/template-formula/issues/110>`_\ ) (\ `ab7afd4 <https://github.com/saltstack-formulas/template-formula/commit/ab7afd4>`_\ )
+
+`2.1.7 <https://github.com/saltstack-formulas/template-formula/compare/v2.1.6...v2.1.7>`_ (2019-05-15)
+----------------------------------------------------------------------------------------------------------
+
+Styles
+^^^^^^
+
+
+* **indent:** fix indentation (\ `34d1307 <https://github.com/saltstack-formulas/template-formula/commit/34d1307>`_\ )
+
+`2.1.6 <https://github.com/saltstack-formulas/template-formula/compare/v2.1.5...v2.1.6>`_ (2019-05-15)
+----------------------------------------------------------------------------------------------------------
+
+Bug Fixes
+^^^^^^^^^
+
+
+* **\ ``map.jinja``\ :** *merge* defaults and ``config.get`` (\ `91bc2f0 <https://github.com/saltstack-formulas/template-formula/commit/91bc2f0>`_\ )
+
+`2.1.5 <https://github.com/saltstack-formulas/template-formula/compare/v2.1.4...v2.1.5>`_ (2019-05-15)
+----------------------------------------------------------------------------------------------------------
+
+Bug Fixes
+^^^^^^^^^
+
+
+* **\ ``map.jinja``\ :** use tplroot (\ `b9c5e03 <https://github.com/saltstack-formulas/template-formula/commit/b9c5e03>`_\ )
+
+`2.1.4 <https://github.com/saltstack-formulas/template-formula/compare/v2.1.3...v2.1.4>`_ (2019-05-15)
+----------------------------------------------------------------------------------------------------------
+
+Bug Fixes
+^^^^^^^^^
+
+
+* **\ ``map.jinja``\ :** remove ``merge`` from ``config.get`` (for ``salt-ssh``\ ) (\ `00e474c <https://github.com/saltstack-formulas/template-formula/commit/00e474c>`_\ ), closes `#95 <https://github.com/saltstack-formulas/template-formula/issues/95>`_
+
+`2.1.3 <https://github.com/saltstack-formulas/template-formula/compare/v2.1.2...v2.1.3>`_ (2019-05-13)
+----------------------------------------------------------------------------------------------------------
+
+Bug Fixes
+^^^^^^^^^
+
+
+* **travis:** don't install gems twice (\ `925d8e2 <https://github.com/saltstack-formulas/template-formula/commit/925d8e2>`_\ )
+
+Documentation
+^^^^^^^^^^^^^
+
+
+* **readme:** add testing section based on ``postgres-formula`` (\ `c309d5f <https://github.com/saltstack-formulas/template-formula/commit/c309d5f>`_\ )
+
+`2.1.2 <https://github.com/saltstack-formulas/template-formula/compare/v2.1.1...v2.1.2>`_ (2019-05-13)
+----------------------------------------------------------------------------------------------------------
+
+Bug Fixes
+^^^^^^^^^
+
+
+* **gitignore:** add Gemfile.lock to .gitignore (\ `87fa410 <https://github.com/saltstack-formulas/template-formula/commit/87fa410>`_\ )
+
+`2.1.1 <https://github.com/saltstack-formulas/template-formula/compare/v2.1.0...v2.1.1>`_ (2019-05-13)
+----------------------------------------------------------------------------------------------------------
+
+Documentation
+^^^^^^^^^^^^^
+
+
+* **semantic-release:** add list of semantic-release compatible formulas (\ `97b19b9 <https://github.com/saltstack-formulas/template-formula/commit/97b19b9>`_\ )
+
+`2.1.0 <https://github.com/saltstack-formulas/template-formula/compare/v2.0.6...v2.1.0>`_ (2019-05-12)
+----------------------------------------------------------------------------------------------------------
+
+Features
+^^^^^^^^
+
+
+* **centos-6:** reshape formula and tests for this platform (\ `a4b1608 <https://github.com/saltstack-formulas/template-formula/commit/a4b1608>`_\ ), closes `#104 <https://github.com/saltstack-formulas/template-formula/issues/104>`_
+
+`2.0.6 <https://github.com/saltstack-formulas/template-formula/compare/v2.0.5...v2.0.6>`_ (2019-05-02)
+----------------------------------------------------------------------------------------------------------
+
+Continuous Integration
+^^^^^^^^^^^^^^^^^^^^^^
+
+
+* **kitchen+travis:** use latest pre-salted images (\ `91ef13b <https://github.com/saltstack-formulas/template-formula/commit/91ef13b>`_\ )
+
+Tests
+^^^^^
+
+
+* **inspec:** disable ``service``\ -based tests for ``opensuse-leap-15`` (\ `848c2ad <https://github.com/saltstack-formulas/template-formula/commit/848c2ad>`_\ )
+
+`2.0.5 <https://github.com/saltstack-formulas/template-formula/compare/v2.0.4...v2.0.5>`_ (2019-04-30)
+----------------------------------------------------------------------------------------------------------
+
+Documentation
+^^^^^^^^^^^^^
+
+
+* **tofs:** remove whitespace from blank line (\ `0881b7d <https://github.com/saltstack-formulas/template-formula/commit/0881b7d>`_\ )
+
+`2.0.4 <https://github.com/saltstack-formulas/template-formula/compare/v2.0.3...v2.0.4>`_ (2019-04-27)
+----------------------------------------------------------------------------------------------------------
+
+Code Refactoring
+^^^^^^^^^^^^^^^^
+
+
+* **map:** use ``config.get`` instead of ``pillar.get`` (\ `5dc0b86 <https://github.com/saltstack-formulas/template-formula/commit/5dc0b86>`_\ )
+
+Continuous Integration
+^^^^^^^^^^^^^^^^^^^^^^
+
+
+* **gemfile:** update ``kitchen-salt`` version (\ `ad31c32 <https://github.com/saltstack-formulas/template-formula/commit/ad31c32>`_\ )
+
+`2.0.3 <https://github.com/saltstack-formulas/template-formula/compare/v2.0.2...v2.0.3>`_ (2019-04-24)
+----------------------------------------------------------------------------------------------------------
+
+Bug Fixes
+^^^^^^^^^
+
+
+* **comments:** explain that at least an empty dict is required (\ `426f955 <https://github.com/saltstack-formulas/template-formula/commit/426f955>`_\ ), closes `#93 <https://github.com/saltstack-formulas/template-formula/issues/93>`_
+
+Continuous Integration
+^^^^^^^^^^^^^^^^^^^^^^
+
+
+* **kitchen:** use pre-salted images instead (\ `2855ed6 <https://github.com/saltstack-formulas/template-formula/commit/2855ed6>`_\ )
+
+`2.0.2 <https://github.com/saltstack-formulas/template-formula/compare/v2.0.1...v2.0.2>`_ (2019-04-22)
+----------------------------------------------------------------------------------------------------------
+
+Code Refactoring
+^^^^^^^^^^^^^^^^
+
+
+* **config_clean:** remove unused import from ``libtofs.jinja`` (\ `b7cb585 <https://github.com/saltstack-formulas/template-formula/commit/b7cb585>`_\ )
+
+Continuous Integration
+^^^^^^^^^^^^^^^^^^^^^^
+
+
+* **kitchen+travis:** implement new distro-python-salt_version matrix (\ `bd4792d <https://github.com/saltstack-formulas/template-formula/commit/bd4792d>`_\ )
+
+`2.0.1 <https://github.com/saltstack-formulas/template-formula/compare/v2.0.0...v2.0.1>`_ (2019-03-25)
+----------------------------------------------------------------------------------------------------------
+
+Code Refactoring
+^^^^^^^^^^^^^^^^
+
+
+* **tofs:** ensure (v2 > v1 > default) checking for ``src_files`` (\ `3e62d7b <https://github.com/saltstack-formulas/template-formula/commit/3e62d7b>`_\ )
+* **tofs:** make ``files_switch`` macro fully portable (\ `a98b777 <https://github.com/saltstack-formulas/template-formula/commit/a98b777>`_\ )
+* **tofs:** use ``config`` rather than ``pillar`` throughout (\ `5730e94 <https://github.com/saltstack-formulas/template-formula/commit/5730e94>`_\ )
+
+`2.0.0 <https://github.com/saltstack-formulas/template-formula/compare/v1.2.6...v2.0.0>`_ (2019-03-24)
+----------------------------------------------------------------------------------------------------------
+
+Code Refactoring
+^^^^^^^^^^^^^^^^
+
+
+* **tofs:** move “files_switch” macro to “libtofs.jinja” (\ `da7e692 <https://github.com/saltstack-formulas/template-formula/commit/da7e692>`_\ )
+
+BREAKING CHANGES
+^^^^^^^^^^^^^^^^
+
+
+* 
+  **tofs:** every formula writer will need to change the import
+  to use this new version.
+
+* 
+  template/libtofs.jinja: provides the “files_switch” macro.
+
+* 
+  docs/TOFS_pattern.rst: update documentation to use the new path.
+
+* 
+  template/config/clean.sls: change import from “macros.jinja” to “libtofs.jinja”.
+
+* 
+  template/config/file.sls: ditoo.
+
+`1.2.6 <https://github.com/saltstack-formulas/template-formula/compare/v1.2.5...v1.2.6>`_ (2019-03-24)
+----------------------------------------------------------------------------------------------------------
+
+Reverts
+^^^^^^^
+
+
+* **kitchen+travis:** use ``debian:jessie-backports`` as ``debian-8`` (\ `dcd141a <https://github.com/saltstack-formulas/template-formula/commit/dcd141a>`_\ ), closes `/github.com/saltstack/salt-pack/issues/657#issuecomment-474954298 <https://github.com//github.com/saltstack/salt-pack/issues/657/issues/issuecomment-474954298>`_
+
+`1.2.5 <https://github.com/saltstack-formulas/template-formula/compare/v1.2.4...v1.2.5>`_ (2019-03-23)
+----------------------------------------------------------------------------------------------------------
+
+Bug Fixes
+^^^^^^^^^
+
+
+* **travis:** use version numbers in Gemfile to prevent failed builds (\ `35f7111 <https://github.com/saltstack-formulas/template-formula/commit/35f7111>`_\ )
+
+`1.2.4 <https://github.com/saltstack-formulas/template-formula/compare/v1.2.3...v1.2.4>`_ (2019-03-22)
+----------------------------------------------------------------------------------------------------------
+
+Code Refactoring
+^^^^^^^^^^^^^^^^
+
+
+* **tofs:** avoid using “salt['config.get']” for formula writers (\ `60d43e7 <https://github.com/saltstack-formulas/template-formula/commit/60d43e7>`_\ )
+
+`1.2.3 <https://github.com/saltstack-formulas/template-formula/compare/v1.2.2...v1.2.3>`_ (2019-03-13)
+----------------------------------------------------------------------------------------------------------
+
+Documentation
+^^^^^^^^^^^^^
+
+
+* **tofs:** incorrect path for “source_files” lookup key (\ `a76f659 <https://github.com/saltstack-formulas/template-formula/commit/a76f659>`_\ )
+
+`1.2.2 <https://github.com/saltstack-formulas/template-formula/compare/v1.2.1...v1.2.2>`_ (2019-03-09)
+----------------------------------------------------------------------------------------------------------
+
+Bug Fixes
+^^^^^^^^^
+
+
+* **tofs:** update use of state ID in ``config`` and ``pillar`` (\ `3d9a24c <https://github.com/saltstack-formulas/template-formula/commit/3d9a24c>`_\ )
+* **tofs:** use ``source_files`` instead of ``files`` (\ `5110716 <https://github.com/saltstack-formulas/template-formula/commit/5110716>`_\ ), closes `/freenode.logbot.info/saltstack-formulas/20190308#c2046753 <https://github.com//freenode.logbot.info/saltstack-formulas/20190308/issues/c2046753>`_
+
+`1.2.1 <https://github.com/saltstack-formulas/template-formula/compare/v1.2.0...v1.2.1>`_ (2019-03-07)
+----------------------------------------------------------------------------------------------------------
+
+Code Refactoring
+^^^^^^^^^^^^^^^^
+
+
+* **kitchen:** ``pillars-from-files`` => ``pillars_from_files`` (\ `7c954a7 <https://github.com/saltstack-formulas/template-formula/commit/7c954a7>`_\ ), closes `/github.com/saltstack-formulas/packages-formula/pull/50#discussion_r262769817 <https://github.com//github.com/saltstack-formulas/packages-formula/pull/50/issues/discussion_r262769817>`_
+
+Styles
+^^^^^^
+
+
+* **map:** use ``-`` for each Jinja block (\ `64e3834 <https://github.com/saltstack-formulas/template-formula/commit/64e3834>`_\ )
+
+`1.2.0 <https://github.com/saltstack-formulas/template-formula/compare/v1.1.2...v1.2.0>`_ (2019-03-03)
+----------------------------------------------------------------------------------------------------------
+
+Features
+^^^^^^^^
+
+
+* **m2r:** use ``m2r`` to convert automatic ``.md`` files to ``.rst`` (\ `b86ddf4 <https://github.com/saltstack-formulas/template-formula/commit/b86ddf4>`_\ )
+
+`1.1.2 <https://github.com/saltstack-formulas/template-formula/compare/v1.1.1...v1.1.2>`_ (2019-03-03)
+----------------------------------------------------------------------------------------------------------
+
+Documentation
+^^^^^^^^^^^^^
+
+
+* **contributing:** add documentation contribution guidelines (\ `dff0ee8 <https://github.com/saltstack-formulas/template-formula/commit/dff0ee8>`_\ )
+* **rtd:** add comment to CSS file for overriding in-use Sphinx theme (\ `f237364 <https://github.com/saltstack-formulas/template-formula/commit/f237364>`_\ )
+* **rtd:** clean up numerous issues and inconsistencies (\ `ad5a8b8 <https://github.com/saltstack-formulas/template-formula/commit/ad5a8b8>`_\ )
+* **tofs:** use ``literalinclude`` of ``macros.jinja`` instead of code dupe (\ `3f0071b <https://github.com/saltstack-formulas/template-formula/commit/3f0071b>`_\ )
+
+`1.1.1 <https://github.com/saltstack-formulas/template-formula/compare/v1.1.0...v1.1.1>`_ (2019-03-01)
+----------------------------------------------------------------------------------------------------------
+
+Continuous Integration
+^^^^^^^^^^^^^^^^^^^^^^
+
+
+* **travis:** remove obsolete ``markdown-toc`` process (\ `97fbb60 <https://github.com/saltstack-formulas/template-formula/commit/97fbb60>`_\ )
+
+Documentation
+^^^^^^^^^^^^^
+
+
+* **contributing:** add TOC to match all other pages (\ `7b1a2a9 <https://github.com/saltstack-formulas/template-formula/commit/7b1a2a9>`_\ )
+* **readme:** add Read the Docs build status badge (\ `f47797d <https://github.com/saltstack-formulas/template-formula/commit/f47797d>`_\ )
+* **tofs:** replace existing ``.md`` with ``.rst`` and add to RTD (\ `fd68168 <https://github.com/saltstack-formulas/template-formula/commit/fd68168>`_\ )
+* **tofs:** use table to list authorship (\ `2f0e20f <https://github.com/saltstack-formulas/template-formula/commit/2f0e20f>`_\ )
+
+`1.1.0 <https://github.com/saltstack-formulas/template-formula/compare/v1.0.1...v1.1.0>`_ (2019-03-01)
+----------------------------------------------------------------------------------------------------------
+
+Documentation
+^^^^^^^^^^^^^
+
+
+* **rtd:** add basic ``docs/conf.py`` to allow additional customisation (\ `18d3924 <https://github.com/saltstack-formulas/template-formula/commit/18d3924>`_\ )
+
+Features
+^^^^^^^^
+
+
+* **rtd:** provide custom CSS file for overriding in-use Sphinx theme (\ `24bd338 <https://github.com/saltstack-formulas/template-formula/commit/24bd338>`_\ )
+
+`1.0.1 <https://github.com/saltstack-formulas/template-formula/compare/v1.0.0...v1.0.1>`_ (2019-03-01)
+----------------------------------------------------------------------------------------------------------
+
+Continuous Integration
+^^^^^^^^^^^^^^^^^^^^^^
+
+
+* **travis:** remove unavailable files from ``markdown-toc`` process (\ `3148f0d <https://github.com/saltstack-formulas/template-formula/commit/3148f0d>`_\ )
+
+Documentation
+^^^^^^^^^^^^^
+
+
+* **contributing:** convert to ``.rst`` and move to ``docs`` subdir (\ `474f318 <https://github.com/saltstack-formulas/template-formula/commit/474f318>`_\ )
+* **index:** add ``CONTRIBUTING`` to the ``toctree`` (\ `0c98e67 <https://github.com/saltstack-formulas/template-formula/commit/0c98e67>`_\ )
+* **readme:** move under ``docs`` subdir to access in both GitHub and RTD (\ `c92f674 <https://github.com/saltstack-formulas/template-formula/commit/c92f674>`_\ )
+* **readme:** update heading markers for consistency (\ `5a2bea8 <https://github.com/saltstack-formulas/template-formula/commit/5a2bea8>`_\ )
+* **rtd:** add basic ``index.rst`` to allow RTD to produce docs (\ `f02139f <https://github.com/saltstack-formulas/template-formula/commit/f02139f>`_\ )
+* **rtd:** use internal link targets at the top of each ``.rst`` file (\ `da09528 <https://github.com/saltstack-formulas/template-formula/commit/da09528>`_\ )
+
+`1.0.0 <https://github.com/saltstack-formulas/template-formula/compare/v0.7.6...v1.0.0>`_ (2019-02-28)
+----------------------------------------------------------------------------------------------------------
+
+Code Refactoring
+^^^^^^^^^^^^^^^^
+
+
+* **components:** split components into separate subdirs (\ `d957055 <https://github.com/saltstack-formulas/template-formula/commit/d957055>`_\ ), closes `/github.com/saltstack-formulas/template-formula/pull/48#pullrequestreview-207182085 <https://github.com//github.com/saltstack-formulas/template-formula/pull/48/issues/pullrequestreview-207182085>`_ `/github.com/saltstack-formulas/template-formula/pull/48#discussion_r259805312 <https://github.com//github.com/saltstack-formulas/template-formula/pull/48/issues/discussion_r259805312>`_
+* **include+require:** use variable for duplicate values (\ `4443518 <https://github.com/saltstack-formulas/template-formula/commit/4443518>`_\ )
+* **pkg:** change to ``package`` instead (\ `2cd82e5 <https://github.com/saltstack-formulas/template-formula/commit/2cd82e5>`_\ ), closes `/github.com/saltstack-formulas/template-formula/pull/48#discussion_r259951123 <https://github.com//github.com/saltstack-formulas/template-formula/pull/48/issues/discussion_r259951123>`_
+* **pkg:** move ``pkg`` related components into separate directory (\ `c21f82b <https://github.com/saltstack-formulas/template-formula/commit/c21f82b>`_\ )
+* **states:** set state IDs based on a dependable structure (\ `6690ee6 <https://github.com/saltstack-formulas/template-formula/commit/6690ee6>`_\ ), closes `/github.com/saltstack-formulas/template-formula/pull/48#discussion_r259953473 <https://github.com//github.com/saltstack-formulas/template-formula/pull/48/issues/discussion_r259953473>`_ `/github.com/saltstack-formulas/template-formula/pull/48#discussion_r259956996 <https://github.com//github.com/saltstack-formulas/template-formula/pull/48/issues/discussion_r259956996>`_
+* **topdir:** use for ``include`` and ``require`` except ``init.sls`` (\ `a218e91 <https://github.com/saltstack-formulas/template-formula/commit/a218e91>`_\ )
+* **tpldir:** use ``topdir`` globally in place of ``tpldir`` (\ `2838bc9 <https://github.com/saltstack-formulas/template-formula/commit/2838bc9>`_\ )
+* **tplroot:** use ``tplroot`` instead of ``topdir`` to match ``tpldata`` (\ `b7356b0 <https://github.com/saltstack-formulas/template-formula/commit/b7356b0>`_\ )
+
+Continuous Integration
+^^^^^^^^^^^^^^^^^^^^^^
+
+
+* **kitchen:** specify ``image`` explicitly for each platform (\ `b25fbdc <https://github.com/saltstack-formulas/template-formula/commit/b25fbdc>`_\ )
+* **kitchen+travis:** use ``debian:jessie-backports`` as ``debian-8`` (\ `1b9d249 <https://github.com/saltstack-formulas/template-formula/commit/1b9d249>`_\ ), closes `#50 <https://github.com/saltstack-formulas/template-formula/issues/50>`_ `/github.com/saltstack/salt-pack/issues/657#issuecomment-467932962 <https://github.com//github.com/saltstack/salt-pack/issues/657/issues/issuecomment-467932962>`_
+
+Documentation
+^^^^^^^^^^^^^
+
+
+* **components:** update for separation of ``pkg``\ , ``config`` & ``service`` (\ `726fcab <https://github.com/saltstack-formulas/template-formula/commit/726fcab>`_\ )
+* **readme:** add suggested improvement to ``template.service.clean`` (\ `bf1039c <https://github.com/saltstack-formulas/template-formula/commit/bf1039c>`_\ )
+* **readme:** fix typos (\ `007159a <https://github.com/saltstack-formulas/template-formula/commit/007159a>`_\ )
+
+Features
+^^^^^^^^
+
+
+* **pkg:** add ``clean`` states (\ `422c7ac <https://github.com/saltstack-formulas/template-formula/commit/422c7ac>`_\ )
+* **pkg:** use ``require`` requisite between ``pkg`` states (\ `6e7141b <https://github.com/saltstack-formulas/template-formula/commit/6e7141b>`_\ ), closes `/github.com/saltstack/salt/blob/0c78d7dc894058988d171a28a11bd4a9dbf60266/salt/utils/jinja.py#L120 <https://github.com//github.com/saltstack/salt/blob/0c78d7dc894058988d171a28a11bd4a9dbf60266/salt/utils/jinja.py/issues/L120>`_ `/github.com/saltstack/salt/blob/0c78d7dc894058988d171a28a11bd4a9dbf60266/salt/utils/templates.py#L145 <https://github.com//github.com/saltstack/salt/blob/0c78d7dc894058988d171a28a11bd4a9dbf60266/salt/utils/templates.py/issues/L145>`_ `/github.com/saltstack/salt/issues/10838#issuecomment-391718086 <https://github.com//github.com/saltstack/salt/issues/10838/issues/issuecomment-391718086>`_
+
+Reverts
+^^^^^^^
+
+
+* **kitchen+travis:** disable ``debian-8`` due to ``2019.2`` bug (\ `e8f0f7e <https://github.com/saltstack-formulas/template-formula/commit/e8f0f7e>`_\ )
+
+BREAKING CHANGES
+^^^^^^^^^^^^^^^^
+
+
+* **states:** Wholesale state ID changes will break implementations
+  that are relying on the previous state IDs for requisite purposes.
+* **pkg:** Changing the ``pkg`` directory to ``package`` will break
+  implementations that are depending on ``pkg`` for ``include`` or ``sls``\ -based
+  requisite purposes.
+
+`0.7.6 <https://github.com/saltstack-formulas/template-formula/compare/v0.7.5...v0.7.6>`_ (2019-02-27)
+----------------------------------------------------------------------------------------------------------
+
+Documentation
+^^^^^^^^^^^^^
+
+
+* **yaml:** os*.yaml map files needs at least an empty dict (\ `dd99750 <https://github.com/saltstack-formulas/template-formula/commit/dd99750>`_\ )
+
+`0.7.5 <https://github.com/saltstack-formulas/template-formula/compare/v0.7.4...v0.7.5>`_ (2019-02-27)
+----------------------------------------------------------------------------------------------------------
+
+Bug Fixes
+^^^^^^^^^
+
+
+* **pillar:** fix ``os_family`` typo (\ `3f89c12 <https://github.com/saltstack-formulas/template-formula/commit/3f89c12>`_\ )
+* **tofs:** update comments in ``files_switch`` macro for new method (\ `3fa3640 <https://github.com/saltstack-formulas/template-formula/commit/3fa3640>`_\ )
+
+Code Refactoring
+^^^^^^^^^^^^^^^^
+
+
+* **macros:** use ``tplroot`` instead of ``topdir`` to match ``tpldata`` (\ `923b459 <https://github.com/saltstack-formulas/template-formula/commit/923b459>`_\ )
+
+Documentation
+^^^^^^^^^^^^^
+
+
+* **tofs:** add more sub-headings to ease document navigation (\ `2c5dc21 <https://github.com/saltstack-formulas/template-formula/commit/2c5dc21>`_\ )
+* **tofs:** apply language formatting to source code blocks (\ `0638413 <https://github.com/saltstack-formulas/template-formula/commit/0638413>`_\ )
+* **tofs:** explain how all parts of the ``source`` can be customised (\ `2f82eb5 <https://github.com/saltstack-formulas/template-formula/commit/2f82eb5>`_\ ), closes `#44 <https://github.com/saltstack-formulas/template-formula/issues/44>`_
+* **tofs:** improve general use of language (\ `5105d29 <https://github.com/saltstack-formulas/template-formula/commit/5105d29>`_\ )
+* **tofs:** update the ``files_switch`` section for the updated macro (\ `788f732 <https://github.com/saltstack-formulas/template-formula/commit/788f732>`_\ )
+* **tofs:** use ``{%-`` for all Jinja statements (\ `4348df8 <https://github.com/saltstack-formulas/template-formula/commit/4348df8>`_\ )
+
+`0.7.4 <https://github.com/saltstack-formulas/template-formula/compare/v0.7.3...v0.7.4>`_ (2019-02-27)
+----------------------------------------------------------------------------------------------------------
+
+Continuous Integration
+^^^^^^^^^^^^^^^^^^^^^^
+
+
+* **kitchen:** check for repos updates before trying package installation (\ `b632383 <https://github.com/saltstack-formulas/template-formula/commit/b632383>`_\ )
+* **kitchen+travis:** disable ``debian-8`` due to ``2019.2`` installation bug (\ `178c710 <https://github.com/saltstack-formulas/template-formula/commit/178c710>`_\ )
+
+Documentation
+^^^^^^^^^^^^^
+
+
+* **contributing:** separate ``BREAKING CHANGE`` under its own heading (\ `ee053d7 <https://github.com/saltstack-formulas/template-formula/commit/ee053d7>`_\ )
+
+`0.7.3 <https://github.com/saltstack-formulas/template-formula/compare/v0.7.2...v0.7.3>`_ (2019-02-25)
+----------------------------------------------------------------------------------------------------------
+
+Bug Fixes
+^^^^^^^^^
+
+
+* **tofs:** use ``tpldir`` derivative ``topdir`` for pillar (config) paths (\ `5e9df00 <https://github.com/saltstack-formulas/template-formula/commit/5e9df00>`_\ )
+
+`0.7.2 <https://github.com/saltstack-formulas/template-formula/compare/v0.7.1...v0.7.2>`_ (2019-02-24)
+----------------------------------------------------------------------------------------------------------
+
+Code Refactoring
+^^^^^^^^^^^^^^^^
+
+
+* **tpldir:** use ``tpldir`` or derivatives to make formula portable (\ `52d03d8 <https://github.com/saltstack-formulas/template-formula/commit/52d03d8>`_\ ), closes `#22 <https://github.com/saltstack-formulas/template-formula/issues/22>`_
+
+Continuous Integration
+^^^^^^^^^^^^^^^^^^^^^^
+
+
+* **kitchen:** improve comments about ``opensuse`` problems encountered (\ `c246939 <https://github.com/saltstack-formulas/template-formula/commit/c246939>`_\ )
+* **travis:** prevent ``release`` stage running for PRs (\ `3a072c7 <https://github.com/saltstack-formulas/template-formula/commit/3a072c7>`_\ ), closes `/travis-ci.com/saltstack-formulas/template-formula/jobs/180068519#L466 <https://github.com//travis-ci.com/saltstack-formulas/template-formula/jobs/180068519/issues/L466>`_ `/github.com/saltstack-formulas/template-formula/pull/42#issuecomment-466446324 <https://github.com//github.com/saltstack-formulas/template-formula/pull/42/issues/issuecomment-466446324>`_
+
+`0.7.1 <https://github.com/saltstack-formulas/template-formula/compare/v0.7.0...v0.7.1>`_ (2019-02-24)
+----------------------------------------------------------------------------------------------------------
+
+Continuous Integration
+^^^^^^^^^^^^^^^^^^^^^^
+
+
+* **kitchen:** use ``salt-minion`` version of ``opensuse`` to ensure tests run (\ `99b073a <https://github.com/saltstack-formulas/template-formula/commit/99b073a>`_\ )
+
+Documentation
+^^^^^^^^^^^^^
+
+
+* **changelog:** remove erroneous "closes" used by ``semantic-release`` (\ `be4571d <https://github.com/saltstack-formulas/template-formula/commit/be4571d>`_\ )
+
+`0.7.0 <https://github.com/saltstack-formulas/template-formula/compare/v0.6.0...v0.7.0>`_ (2019-02-23)
+----------------------------------------------------------------------------------------------------------
+
+Features
+^^^^^^^^
+
+
+* **tofs:** implement backwards-compatible TOFSv2 for configurability (\ `068a94d <https://github.com/saltstack-formulas/template-formula/commit/068a94d>`_\ )
+
+`0.6.0 <https://github.com/saltstack-formulas/template-formula/compare/v0.5.0...v0.6.0>`_ (2019-02-23)
+----------------------------------------------------------------------------------------------------------
+
+Documentation
+^^^^^^^^^^^^^
+
+
+* **contributing:** add basic introductory text before the TOC (\ `45ccaf6 <https://github.com/saltstack-formulas/template-formula/commit/45ccaf6>`_\ )
+* **contributing:** modify quoted heading to prevent TOC inclusion (\ `abcb6ef <https://github.com/saltstack-formulas/template-formula/commit/abcb6ef>`_\ )
+* **readme:** convert note into a heading (\ `5f2d789 <https://github.com/saltstack-formulas/template-formula/commit/5f2d789>`_\ )
+
+Features
+^^^^^^^^
+
+
+* **toc:** use ``markdown-toc`` directly to update inline (\ `a5bae1e <https://github.com/saltstack-formulas/template-formula/commit/a5bae1e>`_\ )
+
+`0.5.0 <https://github.com/saltstack-formulas/template-formula/compare/v0.4.0...v0.5.0>`_ (2019-02-23)
+----------------------------------------------------------------------------------------------------------
+
+Features
+^^^^^^^^
+
+
+* **kitchen+travis:** add ``opensuse-leap`` after resolving issues (\ `7614a3c <https://github.com/saltstack-formulas/template-formula/commit/7614a3c>`_\ )
+* **kitchen+travis:** conduct tests on a wider range of platforms (\ `1348078 <https://github.com/saltstack-formulas/template-formula/commit/1348078>`_\ )
+
+Tests
+^^^^^
+
+
+* **inspec:** update ``supports`` for all platforms added (\ `42f93b3 <https://github.com/saltstack-formulas/template-formula/commit/42f93b3>`_\ )
+
+`0.4.0 <https://github.com/saltstack-formulas/template-formula/compare/v0.3.6...v0.4.0>`_ (2019-02-23)
+----------------------------------------------------------------------------------------------------------
+
+Documentation
+^^^^^^^^^^^^^
+
+
+* **contributing:** centre-align version bump columns in table (\ `a238cae <https://github.com/saltstack-formulas/template-formula/commit/a238cae>`_\ )
+
+Features
+^^^^^^^^
+
+
+* **authors:** update automatically alongside ``semantic-release`` (\ `8000098 <https://github.com/saltstack-formulas/template-formula/commit/8000098>`_\ )
+
+`0.3.6 <https://github.com/saltstack-formulas/template-formula/compare/v0.3.5...v0.3.6>`_ (2019-02-22)
+----------------------------------------------------------------------------------------------------------
+
+Continuous Integration
+^^^^^^^^^^^^^^^^^^^^^^
+
+
+* **travis:** include ``commitlint`` stage (\ `6659a69 <https://github.com/saltstack-formulas/template-formula/commit/6659a69>`_\ )
+* **travis:** remove obsolete check based on ``$TRAVIS_TEST_RESULT`` (\ `6df9c95 <https://github.com/saltstack-formulas/template-formula/commit/6df9c95>`_\ )
+
+Documentation
+^^^^^^^^^^^^^
+
+
+* **contributing:** update with sub-headings and ``commitlint`` details (\ `ea2c9a4 <https://github.com/saltstack-formulas/template-formula/commit/ea2c9a4>`_\ )
+
+`0.3.5 <https://github.com/saltstack-formulas/template-formula/compare/v0.3.4...v0.3.5>`_ (2019-02-21)
+----------------------------------------------------------------------------------------------------------
+
+Code Refactoring
+^^^^^^^^^^^^^^^^
+
+
+* **kitchen:** prefer ``kitchen.yml`` to ``.kitchen.yml`` (\ `3860bf9 <https://github.com/saltstack-formulas/template-formula/commit/3860bf9>`_\ )
+
+`0.3.4 <https://github.com/saltstack-formulas/template-formula/compare/v0.3.3...v0.3.4>`_ (2019-02-21)
+----------------------------------------------------------------------------------------------------------
+
+Documentation
+^^^^^^^^^^^^^
+
+
+* **contributing:** add commit message formatting instructions (\ `fb3d173 <https://github.com/saltstack-formulas/template-formula/commit/fb3d173>`_\ )
+
+`0.3.3 <https://github.com/saltstack-formulas/template-formula/compare/v0.3.2...v0.3.3>`_ (2019-02-20)
+----------------------------------------------------------------------------------------------------------
+
+Documentation
+^^^^^^^^^^^^^
+
+
+* **changelog:** add missing entry under ``v0.3.2`` (\ `50352b5 <https://github.com/saltstack-formulas/template-formula/commit/50352b5>`_\ )
+
+`0.3.2 <https://github.com/saltstack-formulas/template-formula/compare/v0.3.1...v0.3.2>`_ (2019-02-20)
+----------------------------------------------------------------------------------------------------------
+
+Documentation
+^^^^^^^^^^^^^
+
+
+* **README:** remove gitchangelog (\ `2fc85fc <https://github.com/saltstack-formulas/template-formula/commit/2fc85fc>`_\ )
+* **contributing:** create blank template (\ `3633e8f <https://github.com/saltstack-formulas/template-formula/commit/3633e8f>`_\ )
+
+`0.3.1 <https://github.com/saltstack-formulas/template-formula/compare/v0.3.0...v0.3.1>`_ (2019-02-20)
+----------------------------------------------------------------------------------------------------------
+
+Documentation
+^^^^^^^^^^^^^
+
+
+* **changelog:** merge previous ``rst`` into new ``md`` format (\ `2b4e485 <https://github.com/saltstack-formulas/template-formula/commit/2b4e485>`_\ )
+
+`0.3.0 <https://github.com/saltstack-formulas/template-formula/compare/v0.2.0...v0.3.0>`_ (2019-02-20)
+----------------------------------------------------------------------------------------------------------
+
+Features
+^^^^^^^^
+
+
+* **semantic-release:** configure for this formula (\ `cbcfd75 <https://github.com/saltstack-formulas/template-formula/commit/cbcfd75>`_\ )
+
+`0.2.0 <https://github.com/saltstack-formulas/template-formula/compare/v0.1.7...v0.2.0>`_ (2019-02-17)
+----------------------------------------------------------------------------------------------------------
+
+
+* Added a working testing scaffold and travis support. [Javier Bértoli]
+
+`0.1.7 <https://github.com/saltstack-formulas/template-formula/compare/v0.1.6...v0.1.7>`_ (2019-02-16)
+----------------------------------------------------------------------------------------------------------
+
+Fix
+^^^
+
+
+* Typo in the installation instructions. [Niels Abspoel]
+
+Other
+^^^^^
+
+
+* Update the changelog. [Niels Abspoel]
+* Update README with link to install gitchangelog [Imran Iqbal]
+
+`0.1.6 <https://github.com/saltstack-formulas/template-formula/compare/v0.1.5...v0.1.6>`_ (2019-02-16)
+----------------------------------------------------------------------------------------------------------
+
+
+* Add changelog generator. [Niels Abspoel]
+
+`0.1.5 <https://github.com/saltstack-formulas/template-formula/compare/v0.1.4...v0.1.5>`_ (2019-02-15)
+----------------------------------------------------------------------------------------------------------
+
+
+* Prepare v0.1.5 [Imran Iqbal]
+* Fix missing ')' [gmazrael]
+
+`0.1.4 <https://github.com/saltstack-formulas/template-formula/compare/v0.1.3...v0.1.4>`_ (2019-02-15)
+----------------------------------------------------------------------------------------------------------
+
+
+* Replace obsolete VERSION file and replace with FORMULA file. [Imran Iqbal]
+
+`0.1.3 <https://github.com/saltstack-formulas/template-formula/compare/v0.1.2...v0.1.3>`_ (2019-02-12)
+----------------------------------------------------------------------------------------------------------
+
+
+* Updated changelog and version. [Alexander Weidinger]
+* 
+  Map.jinja: use grains.filter_by instead of defaults.merge. [Alexander Weidinger]
+
+    because defaults.merge does not work with salt-ssh. https://github.com/saltstack/salt/issues/51605
+
+    Added osfingermap.yaml.
+
+`0.1.2 <https://github.com/saltstack-formulas/template-formula/compare/v0.1.1...v0.1.2>`_ (2019-02-12)
+----------------------------------------------------------------------------------------------------------
+
+
+* Improve comments and examples in osfamilymap & osmap [Imran Iqbal]
+* Fix map.jinja and add more OSes. [Imran Iqbal]
+
+`0.1.1 <https://github.com/saltstack-formulas/template-formula/compare/v0.1.0...v0.1.1>`_ (2019-02-10)
+----------------------------------------------------------------------------------------------------------
+
+
+* Update. [Niels Abspoel]
+* Update formula with map.jinja and style guide references, improve README and VERSION. [Niels Abspoel]
+
+`0.1.0 <https://github.com/saltstack-formulas/template-formula/compare/v0.0.9...v0.1.0>`_ (2019-02-10)
+----------------------------------------------------------------------------------------------------------
+
+
+* 
+  Examples must be consistent. [Daniel Dehennin]
+
+    The “template” is kept during rendering.
+
+
+  * TOFS_pattern.md: add “template” to rendered state.
+  * template/macros.jinja: ditoo.
+
+* 
+  Remove double slash in generated salt URL. [Daniel Dehennin]
+
+    When the files are “full path” with leading slash “/”, the generated URL contain a double slash because of the join.
+
+
+  * template/macros.jinja: remove leading slash before joining parts.
+  * TOFS_pattern.md: mirror changes of “macros.jinja”.
+
+* 
+  Add an example for “ntp” of the use of “files_switch” [Daniel Dehennin]
+
+* 
+  Accept pillar separator in “files_switch” prefix. [Daniel Dehennin]
+
+    The prefix was used for 2 purposes:
+
+
+  * define the pillar prefix where to lookup “:files_switch”. It supports the colon “:” separator to lookup in pillar subtree like “foo:bar”
+  * 
+    define the path prefix where to look for “files/”, It did not support separator to lookup inside directory tree.
+
+    This patch only replace any colon “:” with “/” when looking up “files/” directory, with the “foo:bar” prefix:
+
+  * 
+    lookup “foo:bar:files_switch” pillar to get list of grains to match
+
+  * lookup files under “salt://foo/bar/files/”
+  * TOFS_pattern.md: document the new use of “prefix” supporting colon “:”.
+  * template/macros.jinja: transform any colon “:” in “prefix” by slash
+    “/” to lookup files.
+
+* 
+  Make TOFS pattern example usable. [Daniel Dehennin]
+
+    The example could not be used as-is. This commit improve conformity to formula conventions.
+
+
+  * TOFS_pattern.md: add missing commas “,” in “map.jinja” and extra one
+    to ease the addition of new entries. Import “map.jinja” in “init.sls” and “conf.sls”. Declare descriptive state IDs. Use the “module.function” notation. Use the “name” parameter.
+
+* 
+  Cosmetics modification of TOFS pattern documentation. [Daniel Dehennin]
+
+
+  * TOFS_pattern.md: add myself as modifier.
+    Trim trailing whitespaces. Separate titles from first paragraph.
+
+* 
+  Switch template.config to TOFS pattern. [Daniel Dehennin]
+
+* Import TOFS pattern from Zabbix formula. [Daniel Dehennin]
+
+`0.0.9 <https://github.com/saltstack-formulas/template-formula/compare/v0.0.8...v0.0.9>`_ (2019-02-10)
+----------------------------------------------------------------------------------------------------------
+
+
+* Add VERSION file. [Karim Hamza]
+* Add note about formula versioning. [Karim Hamza]
+
+`0.0.8 <https://github.com/saltstack-formulas/template-formula/compare/v0.0.7...v0.0.8>`_ (2019-02-10)
+----------------------------------------------------------------------------------------------------------
+
+
+* Align with SaltStack official formulas doc page. [Denys Havrysh]
+* Use https in the link to SaltStack documentation. [Denys Havrysh]
+
+`0.0.7 <https://github.com/saltstack-formulas/template-formula/compare/v0.0.6...v0.0.7>`_ (2019-02-10)
+----------------------------------------------------------------------------------------------------------
+
+
+* Map.ninja: fix typos and leftover comments. [Marco Molteni]
+* Remove whitespace in map.jinja comment. [Andrew Gabbitas]
+
+`0.0.6 <https://github.com/saltstack-formulas/template-formula/compare/v0.0.5...v0.0.6>`_ (2019-02-10)
+----------------------------------------------------------------------------------------------------------
+
+
+* Improve style and jinja too match salt-formula. [Niels Abspoel]
+* Propose new-ish formula style - defaults live in defaults.yml - map jinja overrides by grain + merges pillar:lookup - split all contextually similar states in their own files. [puneet kandhari]
+
+`0.0.5 <https://github.com/saltstack-formulas/template-formula/compare/v0.0.4...v0.0.5>`_ (2019-02-10)
+----------------------------------------------------------------------------------------------------------
+
+
+* Change states to use short-dec style. [Seth House]
+* Update CHANGELOG.rst. [Nitin Madhok]
+* 
+  Update README.rst. [Nitin Madhok]
+
+    Fix broken link
+
+* 
+  Fixing pillar to match the map file. [Forrest]
+
+    Map file and pillar didn't match.
+
+`0.0.4 <https://github.com/saltstack-formulas/template-formula/compare/v0.0.3...v0.0.4>`_ (2019-02-10)
+----------------------------------------------------------------------------------------------------------
+
+
+* Add change log. [Antti Jokipii]
+
+`0.0.3 <https://github.com/saltstack-formulas/template-formula/compare/v0.0.2...v0.0.3>`_ (2019-02-10)
+----------------------------------------------------------------------------------------------------------
+
+
+* Updated the license and readme to match our standards. [Forrest Alvarez]
+* Use map.jinja content in init.sls. [Eugene Vereschagin]
+* Add map.jinja. [Eugene Vereschagin]
+
+`0.0.2 <https://github.com/saltstack-formulas/template-formula/compare/v0.0.1...v0.0.2>`_ (2019-02-10)
+----------------------------------------------------------------------------------------------------------
+
+
+* Add link to Salt Formula documentation. [Eugene Vereschagin]
+* Change extension from .md to .rst. [Eugene Vereschagin]
+
+`0.0.1 <https://github.com/saltstack-formulas/template-formula/releases/tag/v0.0.1>`_ (2019-02-10)
+------------------------------------------------------------------------------------------------------
+
+
+* Initial commit. [Lukas Erlacher]
diff --git a/docs/CONTRIBUTING_DOCS.rst b/docs/CONTRIBUTING_DOCS.rst
new file mode 100644 (file)
index 0000000..55673df
--- /dev/null
@@ -0,0 +1,96 @@
+.. _contributing_docs:
+
+Contributing documentation
+==========================
+
+|docs|
+
+.. |docs| image:: https://readthedocs.org/projects/docs/badge/?version=latest
+   :alt: Documentation Status
+   :scale: 100%
+   :target: https://TEMPLATE-formula.readthedocs.io/en/latest/?badge=latest
+
+Toolchain
+^^^^^^^^^
+
+The documentation for this formula is written in
+`reStructuredText <https://en.wikipedia.org/wiki/ReStructuredText>`_
+(also known as RST, ReST, or reST).
+It is built by
+`Sphinx <https://en.wikipedia.org/wiki/Sphinx_(documentation_generator)>`_
+and hosted on
+`Read the Docs <https://en.wikipedia.org/wiki/Read_the_Docs>`_.
+
+Adding a new page
+^^^^^^^^^^^^^^^^^
+
+Adding a new page involves two steps:
+
+#. Use the
+   :ref:`provided page template <saltstack_formulas_rst_page_template>`
+   to create a new page.
+#. Add the page name under the ``toctree`` list in ``index.rst``.
+
+   a. Do not just append it to the list.
+   #. Select the best place where it fits within the overall documentation.
+
+SaltStack-Formulas' RST page template
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+.. _saltstack_formulas_rst_page_template
+
+Use the following template when creating a new page.
+This ensures consistency across the documentation for this formula.
+The heading symbols have been selected in accordance to the output rendered by the
+`Markdown to reStructuredText converter <https://github.com/miyakogi/m2r#restrictions>`_
+we are using for some of the pages of this documentation.
+
+.. code-block:: rst
+
+   .. _template:
+
+   [Page title]
+   ============
+
+   [Introductory paragraph]
+
+   .. contents:: **Table of Contents**
+
+   [Heading 2]
+   -----------
+
+   [Heading 3]
+   ^^^^^^^^^^^
+
+   [Heading 4]
+   ~~~~~~~~~~~
+
+   [Heading 5]
+   """""""""""
+
+   [Heading 6]
+   ###########
+
+#. The first line is an anchor that can be used to link back to (the top of)
+   this file.
+
+   a. Change this to be the lowercase version of the file name.
+   #. Do not include the ``.rst`` file extension.
+   #. Use hyphens (``-``) instead of spaces or non-letter characters.
+
+#. Change the ``[Page title]`` accordingly, matching the same number of equals
+   signs (``=``) underneath.
+#. Change the ``[Introductory paragraph]`` to be a short summary of the page
+   content.
+   Use no more than three paragraphs for this.
+#. Leave the ``..contents:: **Table of Contents**`` line as it is.
+#. Use the remaining headings as required to break up the page content.
+
+   a. You will rarely need to use beyond ``[Heading 4]``.
+   #. Again, no single heading should have more than about three paragraphs of
+      content before the next heading or sub-heading is used.
+
+Obviously, it is not necessary to follow the steps in the order above.
+For example, it is usually easier to write the ``[Introductory paragraph]``
+at the end.
+
diff --git a/docs/README.rst b/docs/README.rst
new file mode 100644 (file)
index 0000000..7e252f8
--- /dev/null
@@ -0,0 +1,201 @@
+.. _readme:
+
+TEMPLATE-formula
+================
+
+|img_travis| |img_sr|
+
+.. |img_travis| image:: https://travis-ci.com/saltstack-formulas/TEMPLATE-formula.svg?branch=master
+   :alt: Travis CI Build Status
+   :scale: 100%
+   :target: https://travis-ci.com/saltstack-formulas/TEMPLATE-formula
+.. |img_sr| image:: https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg
+   :alt: Semantic Release
+   :scale: 100%
+   :target: https://github.com/semantic-release/semantic-release
+
+A SaltStack formula that is empty. It has dummy content to help with a quick
+start on a new formula and it serves as a style guide.
+
+.. contents:: **Table of Contents**
+
+General notes
+-------------
+
+See the full `SaltStack Formulas installation and usage instructions
+<https://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html>`_.
+
+If you are interested in writing or contributing to formulas, please pay attention to the `Writing Formula Section
+<https://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html#writing-formulas>`_.
+
+If you want to use this formula, please pay attention to the ``FORMULA`` file and/or ``git tag``,
+which contains the currently released version. This formula is versioned according to `Semantic Versioning <http://semver.org/>`_.
+
+See `Formula Versioning Section <https://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html#versioning>`_ for more details.
+
+If you need (non-default) configuration, please pay attention to the ``pillar.example`` file and/or `Special notes`_ section.
+
+Contributing to this repo
+-------------------------
+
+**Commit message formatting is significant!!**
+
+Please see `How to contribute <https://github.com/saltstack-formulas/.github/blob/master/CONTRIBUTING.rst>`_ for more details.
+
+Special notes
+-------------
+
+.. <REMOVEME
+
+Using this template
+^^^^^^^^^^^^^^^^^^^
+
+The easiest way to use this template formula as a base for a new formula is to use GitHub's **Use this template** button to create a new repository. For consistency with the rest of the formula ecosystem, name your formula repository following the pattern ``<formula theme>-formula``, where ``<formula theme>`` consists of lower-case alphabetic characters and numbers.
+
+In the rest of this example we'll use ``example`` as the ``<formula theme>``.
+
+Follow these steps to complete the conversion from ``template-formula`` to ``example-formula``. ::
+
+  $ git clone git@github.com:YOUR-USERNAME/example-formula.git
+  $ cd example-formula/
+  $ bin/convert-formula.sh example
+  $ git push --force
+
+Alternatively, it's possible to clone ``template-formula`` into a new repository and perform the conversion there. For example::
+
+  $ git clone https://github.com/saltstack-formulas/template-formula example-formula
+  $ cd example-formula/
+  $ bin/convert-formula.sh example
+
+To take advantage of `semantic-release <https://github.com/semantic-release/semantic-release>`_ for automated changelog generation and release tagging, you will need a GitHub `Personal Access Token <https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line>`_ with at least the **public_repo** scope.
+
+In the Travis repository settings for your new repository, create an `environment variable <https://docs.travis-ci.com/user/environment-variables/#defining-variables-in-repository-settings>`_ named ``GH_TOKEN`` with the personal access token as value, restricted to the ``master`` branch for security.
+
+.. REMOVEME>
+
+Available states
+----------------
+
+.. contents::
+   :local:
+
+``TEMPLATE``
+^^^^^^^^^^^^
+
+*Meta-state (This is a state that includes other states)*.
+
+This installs the TEMPLATE package,
+manages the TEMPLATE configuration file and then
+starts the associated TEMPLATE service.
+
+``TEMPLATE.package``
+^^^^^^^^^^^^^^^^^^^^
+
+This state will install the TEMPLATE package only.
+
+``TEMPLATE.config``
+^^^^^^^^^^^^^^^^^^^
+
+This state will configure the TEMPLATE service and has a dependency on ``TEMPLATE.install``
+via include list.
+
+``TEMPLATE.service``
+^^^^^^^^^^^^^^^^^^^^
+
+This state will start the TEMPLATE service and has a dependency on ``TEMPLATE.config``
+via include list.
+
+``TEMPLATE.clean``
+^^^^^^^^^^^^^^^^^^
+
+*Meta-state (This is a state that includes other states)*.
+
+this state will undo everything performed in the ``TEMPLATE`` meta-state in reverse order, i.e.
+stops the service,
+removes the configuration file and
+then uninstalls the package.
+
+``TEMPLATE.service.clean``
+^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+This state will stop the TEMPLATE service and disable it at boot time.
+
+``TEMPLATE.config.clean``
+^^^^^^^^^^^^^^^^^^^^^^^^^
+
+This state will remove the configuration of the TEMPLATE service and has a
+dependency on ``TEMPLATE.service.clean`` via include list.
+
+``TEMPLATE.package.clean``
+^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+This state will remove the TEMPLATE package and has a depency on
+``TEMPLATE.config.clean`` via include list.
+
+``TEMPLATE.subcomponent``
+^^^^^^^^^^^^^^^^^^^^^^^^^
+
+*Meta-state (This is a state that includes other states)*.
+
+This state installs a subcomponent configuration file before
+configuring and starting the TEMPLATE service.
+
+``TEMPLATE.subcomponent.config``
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+This state will configure the TEMPLATE subcomponent and has a
+dependency on ``TEMPLATE.config`` via include list.
+
+``TEMPLATE.subcomponent.config.clean``
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+This state will remove the configuration of the TEMPLATE subcomponent
+and reload the TEMPLATE service by a dependency on
+``TEMPLATE.service.running`` via include list and ``watch_in``
+requisite.
+
+Testing
+-------
+
+Linux testing is done with ``kitchen-salt``.
+
+Requirements
+^^^^^^^^^^^^
+
+* Ruby
+* Docker
+
+.. code-block:: bash
+
+   $ gem install bundler
+   $ bundle install
+   $ bin/kitchen test [platform]
+
+Where ``[platform]`` is the platform name defined in ``kitchen.yml``,
+e.g. ``debian-9-2019-2-py3``.
+
+``bin/kitchen converge``
+^^^^^^^^^^^^^^^^^^^^^^^^
+
+Creates the docker instance and runs the ``TEMPLATE`` main state, ready for testing.
+
+``bin/kitchen verify``
+^^^^^^^^^^^^^^^^^^^^^^
+
+Runs the ``inspec`` tests on the actual instance.
+
+``bin/kitchen destroy``
+^^^^^^^^^^^^^^^^^^^^^^^
+
+Removes the docker instance.
+
+``bin/kitchen test``
+^^^^^^^^^^^^^^^^^^^^
+
+Runs all of the stages above in one go: i.e. ``destroy`` + ``converge`` + ``verify`` + ``destroy``.
+
+``bin/kitchen login``
+^^^^^^^^^^^^^^^^^^^^^
+
+Gives you SSH access to the instance for manual testing.
+
diff --git a/docs/TOFS_pattern.rst b/docs/TOFS_pattern.rst
new file mode 100644 (file)
index 0000000..4fea5dd
--- /dev/null
@@ -0,0 +1,518 @@
+.. _tofs_pattern:
+
+TOFS: A pattern for using SaltStack
+===================================
+
+.. list-table::
+   :name: tofs-authors
+   :header-rows: 1
+   :stub-columns: 1
+   :widths: 2,2,3,2
+
+   * -
+     - Person
+     - Contact
+     - Date
+   * - Authored by
+     - Roberto Moreda
+     - moreda@allenta.com
+     - 29/12/2014
+   * - Modified by
+     - Daniel Dehennin
+     - daniel.dehennin@baby-gnu.org
+     - 07/02/2019
+   * - Modified by
+     - Imran Iqbal
+     - https://github.com/myii
+     - 23/02/2019
+
+All that follows is a proposal based on my experience with `SaltStack <http://www.saltstack.com/>`_. The good thing of a piece of software like this is that you can "bend it" to suit your needs in many possible ways, and this is one of them. All the recommendations and thoughts are given "as it is" with no warranty of any type.
+
+.. contents:: **Table of Contents**
+
+Usage of values in pillar vs templates in ``file_roots``
+--------------------------------------------------------
+
+Among other functions, the *master* (or *salt-master*) serves files to the *minions* (or *salt-minions*). The `file_roots <http://docs.saltstack.com/en/latest/ref/file_server/file_roots.html>`_ is the list of directories used in sequence to find a file when a minion requires it: the first match is served to the minion. Those files could be `state files <http://docs.saltstack.com/en/latest/topics/tutorials/starting_states.html>`_ or configuration templates, among others.
+
+Using SaltStack is a simple and effective way to implement configuration management, but even in a `non-multitenant <http://en.wikipedia.org/wiki/Multitenancy>`_ scenario, it is not a good idea to generally access some data (e.g. the database password in our `Zabbix <http://www.zabbix.com/>`_ server configuration file or the private key of our `Nginx <http://nginx.org/en/>`_ TLS certificate).
+
+To avoid this situation we can use the `pillar mechanism <http://docs.saltstack.com/en/latest/topics/pillar/>`_, which is designed to provide controlled access to data from the minions based on some selection rules. As pillar data could be easily integrated in the `Jinja <http://docs.saltstack.com/en/latest/topics/tutorials/pillar.html>`_ templates, it is a good mechanism to store values to be used in the final rendering of state files and templates.
+
+There are a variety of approaches on the usage of pillar and templates as seen in the `saltstack-formulas <https://github.com/saltstack-formulas>`_' repositories. `Some <https://github.com/saltstack-formulas/nginx-formula/pull/18>`_ `developments <https://github.com/saltstack-formulas/php-formula/pull/14>`_ stress the initial purpose of pillar data into a storage for most of the possible variables for a determined system configuration. This, in my opinion, is shifting too much load from the original template files approach. Adding up some `non-trivial Jinja <https://github.com/saltstack-formulas/nginx-formula/blob/f74254c07e188bd448eaf1c5f9c802d78c4c005e/nginx/files/default/nginx.conf>`_ code as essential part of composing the state file definitely makes SaltStack state files (hence formulas) more difficult to read. The extreme of this approach is that we could end up with a new render mechanism, implemented in Jinja, storing everything needed in pillar data to compose configurations. Additionally, we are establishing a strong dependency with the Jinja renderer.
+
+In opposition to the *put the code in file_roots and the data in pillars* approach, there is the *pillar as a store for a set of key-values* approach. A full-blown configuration file abstracted in pillar and jinja is complicated to develop, understand and maintain. I think a better and simpler approach is to keep a configuration file templated using just a basic (non-extensive but extensible) set of pillar values.
+
+On the reusability of SaltStack state files
+-------------------------------------------
+
+There is a brilliant initiative of the SaltStack community called `salt-formulas <https://github.com/saltstack-formulas>`_. Their goal is to provide state files, pillar examples and configuration templates ready to be used for provisioning. I am a contributor for two small ones: `zabbix-formula <https://github.com/saltstack-formulas/zabbix-formula>`_ and `varnish-formula <https://github.com/saltstack-formulas/varnish-formula>`_.
+
+The `design guidelines <http://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html>`_ for formulas are clear in many aspects and it is a recommended reading for anyone willing to write state files, even non-formulaic ones.
+
+In the next section, I am going to describe my proposal to extend further the reusability of formulas, suggesting some patterns of usage.
+
+The Template Override and Files Switch (TOFS) pattern
+-----------------------------------------------------
+
+I understand a formula as a **complete, independent set of SaltStack state and configuration template files sufficient to configure a system**. A system could be something as simple as an NTP server or some other much more complex service that requires many state and configuration template files.
+
+The customization of a formula should be done mainly by providing pillar data used later to render either the state or the configuration template files.
+
+Example: NTP before applying TOFS
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Let's work with the NTP example. A basic formula that follows the `design guidelines <http://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html>`_ has the following files and directories tree:
+
+.. code-block::
+
+   /srv/saltstack/salt-formulas/ntp-saltstack-formula/
+     ntp/
+       map.jinja
+       init.sls
+       conf.sls
+       files/
+         default/
+           etc/
+             ntp.conf.jinja
+
+In order to use it, let's assume a `masterless configuration <http://docs.saltstack.com/en/latest/topics/tutorials/quickstart.html>`_ and this relevant section of ``/etc/salt/minion``:
+
+.. code-block:: yaml
+
+   pillar_roots:
+     base:
+       - /srv/saltstack/pillar
+   file_client: local
+   file_roots:
+     base:
+       - /srv/saltstack/salt
+       - /srv/saltstack/salt-formulas/ntp-saltstack-formula
+
+.. code-block:: jinja
+
+   {#- /srv/saltstack/salt-formulas/ntp-saltstack-formula/ntp/map.jinja #}
+   {%- set ntp = salt['grains.filter_by']({
+     'default': {
+       'pkg': 'ntp',
+       'service': 'ntp',
+       'config': '/etc/ntp.conf',
+     },
+   }, merge=salt['pillar.get']('ntp:lookup')) %}
+
+In ``init.sls`` we have the minimal states required to have NTP configured. In many cases ``init.sls`` is almost equivalent to an ``apt-get install`` or a ``yum install`` of the package.
+
+.. code-block:: sls
+
+   ## /srv/saltstack/salt-formulas/ntp-saltstack-formula/ntp/init.sls
+   {%- from 'ntp/map.jinja' import ntp with context %}
+
+   Install NTP:
+     pkg.installed:
+       - name: {{ ntp.pkg }}
+
+   Enable and start NTP:
+     service.running:
+       - name: {{ ntp.service }}
+       - enabled: True
+       - require:
+         - pkg: Install NTP package
+
+In ``conf.sls`` we have the configuration states. In most cases, that is just managing configuration file templates and making them to be watched by the service.
+
+.. code-block:: sls
+
+   ## /srv/saltstack/salt-formulas/ntp-saltstack-formula/ntp/conf.sls
+   include:
+     - ntp
+
+   {%- from 'ntp/map.jinja' import ntp with context %}
+
+   Configure NTP:
+     file.managed:
+       - name: {{ ntp.config }}
+       - template: jinja
+       - source: salt://ntp/files/default/etc/ntp.conf.jinja
+       - watch_in:
+         - service: Enable and start NTP service
+       - require:
+         - pkg: Install NTP package
+
+Under ``files/default``, there is a structure that mimics the one in the minion in order to avoid clashes and confusion on where to put the needed templates. There you can find a mostly standard template for the configuration file.
+
+.. code-block:: jinja
+
+   {#- /srv/saltstack/salt-formulas/ntp-saltstack-formula/ntp/files/default/etc/ntp.conf.jinja #}
+   {#- Managed by saltstack #}
+   {#- Edit pillars or override this template in saltstack if you need customization #}
+   {%- set settings = salt['pillar.get']('ntp', {}) %}
+   {%- set default_servers = ['0.ubuntu.pool.ntp.org',
+                             '1.ubuntu.pool.ntp.org',
+                             '2.ubuntu.pool.ntp.org',
+                             '3.ubuntu.pool.ntp.org'] %}
+
+   driftfile /var/lib/ntp/ntp.drift
+   statistics loopstats peerstats clockstats
+   filegen loopstats file loopstats type day enable
+   filegen peerstats file peerstats type day enable
+   filegen clockstats file clockstats type day enable
+
+   {%- for server in settings.get('servers', default_servers) %}
+   server {{ server }}
+   {%- endfor %}
+
+   restrict -4 default kod notrap nomodify nopeer noquery
+   restrict -6 default kod notrap nomodify nopeer noquery
+
+   restrict 127.0.0.1
+   restrict ::1
+
+With all this, it is easy to install and configure a simple NTP server by just running ``salt-call state.sls ntp.conf``: the package will be installed, the service will be running and the configuration should be correct for most of cases, even without pillar data.
+
+Alternatively, you can define a highstate in ``/srv/saltstack/salt/top.sls`` and run ``salt-call state.highstate``.
+
+.. code-block:: sls
+
+   ## /srv/saltstack/salt/top.sls
+   base:
+     '*':
+       - ntp.conf
+
+**Customizing the formula just with pillar data**, we have the option to define the NTP servers.
+
+.. code-block:: sls
+
+   ## /srv/saltstack/pillar/top.sls
+   base:
+     '*':
+       - ntp
+
+.. code-block:: sls
+
+   ## /srv/saltstack/pillar/ntp.sls
+   ntp:
+     servers:
+       - 0.ch.pool.ntp.org
+       - 1.ch.pool.ntp.org
+       - 2.ch.pool.ntp.org
+       - 3.ch.pool.ntp.org
+
+Template Override
+^^^^^^^^^^^^^^^^^
+
+If the customization based on pillar data is not enough, we can override the template by creating a new one in ``/srv/saltstack/salt/ntp/files/default/etc/ntp.conf.jinja``
+
+.. code-block:: jinja
+
+   {#- /srv/saltstack/salt/ntp/files/default/etc/ntp.conf.jinja #}
+   {#- Managed by saltstack #}
+   {#- Edit pillars or override this template in saltstack if you need customization #}
+
+   {#- Some bizarre configurations here #}
+   {#- ... #}
+
+   {%- for server in settings.get('servers', default_servers) %}
+   server {{ server }}
+   {%- endfor %}
+
+This way we are locally **overriding the template files** offered by the formula in order to make a more complex adaptation. Of course, this could be applied as well to any of the files, including the state files.
+
+Files Switch
+^^^^^^^^^^^^
+
+To bring some order into the set of template files included in a formula, as we commented, we suggest having a similar structure to a normal final file system under ``files/default``.
+
+We can make different templates coexist for different minions, classified by any `grain <http://docs.saltstack.com/en/latest/topics/targeting/grains.html>`_ value, by simply creating new directories under ``files``. This mechanism is based on **using values of some grains as a switch for the directories under** ``files/``.
+
+If we decide that we want ``os_family`` as switch, then we could provide the formula template variants for both the ``RedHat`` and ``Debian`` families.
+
+.. code-block::
+
+   /srv/saltstack/salt-formulas/ntp-saltstack-formula/ntp/files/
+     default/
+       etc/
+         ntp.conf.jinja
+     RedHat/
+       etc/
+         ntp.conf.jinja
+     Debian/
+       etc/
+         ntp.conf.jinja
+
+To make this work we need a ``conf.sls`` state file that takes a list of possible files as the configuration template.
+
+.. code-block:: sls
+
+   ## /srv/saltstack/salt-formulas/ntp-saltstack-formula/ntp/conf.sls
+   include:
+     - ntp
+
+   {%- from 'ntp/map.jinja' import ntp with context %}
+
+   Configure NTP:
+     file.managed:
+       - name: {{ ntp.config }}
+       - template: jinja
+       - source:
+         - salt://ntp/files/{{ grains.get('os_family', 'default') }}/etc/ntp.conf.jinja
+         - salt://ntp/files/default/etc/ntp.conf.jinja
+       - watch_in:
+         - service: Enable and start NTP service
+       - require:
+         - pkg: Install NTP package
+
+If we want to cover the possibility of a special template for a minion identified by ``node01`` then we could have a specific template in ``/srv/saltstack/salt/ntp/files/node01/etc/ntp.conf.jinja``.
+
+.. code-block:: jinja
+
+   {#- /srv/saltstack/salt/ntp/files/node01/etc/ntp.conf.jinja #}
+   {#- Managed by saltstack #}
+   {#- Edit pillars or override this template in saltstack if you need customization #}
+
+   {#- Some crazy configurations here for node01 #}
+   {#- ... #}
+
+To make this work we could write a specially crafted ``conf.sls``.
+
+.. code-block:: sls
+
+   ## /srv/saltstack/salt-formulas/ntp-saltstack-formula/ntp/conf.sls
+   include:
+     - ntp
+
+   {%- from 'ntp/map.jinja' import ntp with context %}
+
+   Configure NTP:
+     file.managed:
+       - name: {{ ntp.config }}
+       - template: jinja
+       - source:
+         - salt://ntp/files/{{ grains.get('id') }}/etc/ntp.conf.jinja
+         - salt://ntp/files/{{ grains.get('os_family') }}/etc/ntp.conf.jinja
+         - salt://ntp/files/default/etc/ntp.conf.jinja
+       - watch_in:
+         - service: Enable and start NTP service
+       - require:
+         - pkg: Install NTP package
+
+Using the ``files_switch`` macro
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+We can simplify the ``conf.sls`` with the new ``files_switch`` macro to use in the ``source`` parameter for the ``file.managed`` state.
+
+.. code-block:: sls
+
+   ## /srv/saltstack/salt-formulas/ntp-saltstack-formula/ntp/conf.sls
+   include:
+     - ntp
+
+   {%- set tplroot = tpldir.split('/')[0] %}
+   {%- from 'ntp/map.jinja' import ntp with context %}
+   {%- from 'ntp/libtofs.jinja' import files_switch %}
+
+   Configure NTP:
+     file.managed:
+       - name: {{ ntp.config }}
+       - template: jinja
+       - source: {{ files_switch(['/etc/ntp.conf.jinja'],
+                                 lookup='Configure NTP'
+                    )
+                 }}
+       - watch_in:
+         - service: Enable and start NTP service
+       - require:
+         - pkg: Install NTP package
+
+
+* This uses ``config.get``, searching for ``ntp:tofs:source_files:Configure NTP`` to determine the list of template files to use.
+* If this returns a result, the default of ``['/etc/ntp.conf.jinja']`` will be appended to it.
+* If this does not yield any results, the default of ``['/etc/ntp.conf.jinja']`` will be used.
+
+In ``libtofs.jinja``, we define this new macro ``files_switch``.
+
+.. literalinclude:: ../template/libtofs.jinja
+   :caption: /srv/saltstack/salt-formulas/ntp-saltstack-formula/ntp/libtofs.jinja
+   :language: jinja
+
+How to customise the ``source`` further
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+The examples below are based on an ``Ubuntu`` minion called ``theminion`` being configured via. pillar.
+
+Using the default settings of the ``files_switch`` macro above,
+the ``source`` will be:
+
+.. code-block:: sls
+
+         - source:
+           - salt://ntp/files/theminion/etc/ntp.conf.jinja
+           - salt://ntp/files/Debian/etc/ntp.conf.jinja
+           - salt://ntp/files/default/etc/ntp.conf.jinja
+
+Customise ``files``
+~~~~~~~~~~~~~~~~~~~
+
+The ``files`` portion can be customised:
+
+.. code-block:: sls
+
+   ntp:
+     tofs:
+       dirs:
+         files: files_alt
+
+Resulting in:
+
+.. code-block:: sls
+
+         - source:
+           - salt://ntp/files_alt/theminion/etc/ntp.conf.jinja
+           - salt://ntp/files_alt/Debian/etc/ntp.conf.jinja
+           - salt://ntp/files_alt/default/etc/ntp.conf.jinja
+
+Customise the use of grains
+~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Grains can be customised and even arbitrary paths can be supplied:
+
+.. code-block:: sls
+
+   ntp:
+     tofs:
+       files_switch:
+         - any/path/can/be/used/here
+         - id
+         - os
+         - os_family
+
+Resulting in:
+
+.. code-block:: sls
+
+         - source:
+           - salt://ntp/files/any/path/can/be/used/here/etc/ntp.conf.jinja
+           - salt://ntp/files/theminion/etc/ntp.conf.jinja
+           - salt://ntp/files/Ubuntu/etc/ntp.conf.jinja
+           - salt://ntp/files/Debian/etc/ntp.conf.jinja
+           - salt://ntp/files/default/etc/ntp.conf.jinja
+
+Customise the ``default`` path
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The ``default`` portion of the path can be customised:
+
+.. code-block:: sls
+
+   ntp:
+     tofs:
+       dirs:
+         default: default_alt
+
+Resulting in:
+
+.. code-block:: sls
+
+         - source:
+           ...
+           - salt://ntp/files/default_alt/etc/ntp.conf.jinja
+
+Customise the list of ``source_files``
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The list of ``source_files`` can be given:
+
+.. code-block:: sls
+
+   ntp:
+     tofs:
+       source_files:
+         Configure NTP:
+           - '/etc/ntp.conf_alt.jinja'
+
+Resulting in:
+
+.. code-block:: sls
+
+         - source:
+           - salt://ntp/files/theminion/etc/ntp.conf_alt.jinja
+           - salt://ntp/files/theminion/etc/ntp.conf.jinja
+           - salt://ntp/files/Debian/etc/ntp.conf_alt.jinja
+           - salt://ntp/files/Debian/etc/ntp.conf.jinja
+           - salt://ntp/files/default/etc/ntp.conf_alt.jinja
+           - salt://ntp/files/default/etc/ntp.conf.jinja
+
+Note: This does *not* override the default value.
+Rather, the value from the pillar/config is prepended to the default.
+
+Using sub-directories for ``components``
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+If your formula is composed of several components, you may prefer to provides files under sub-directories, like in the `systemd-formula <https://github.com/saltstack-formulas/systemd-formula>`_.
+
+.. code-block::
+
+   /srv/saltstack/systemd-formula/
+     systemd/
+       init.sls
+       libtofs.jinja
+       map.jinja
+       networkd/
+         init.sls
+         files/
+           default/
+             network/
+               99-default.link
+       resolved/
+         init.sls
+         files/
+           default/
+             resolved.conf
+       timesyncd/
+         init.sls
+         files/
+           Arch/
+             resolved.conf
+           Debian/
+             resolved.conf
+           default/
+             resolved.conf
+           Ubuntu/
+             resolved.conf
+
+For example, the following ``formula.component.config`` SLS:
+
+.. code-block:: sls
+
+   {%- from "formula/libtofs.jinja" import files_switch with context %}
+
+   formula configuration file:
+     file.managed:
+       - name: /etc/formula.conf
+       - user: root
+       - group: root
+       - mode: 644
+       - template: jinja
+       - source: {{ files_switch(['formula.conf'],
+                                 lookup='formula',
+                                 use_subpath=True
+                    )
+                 }}
+
+will be rendered on a ``Debian`` minion named ``salt-formula.ci.local`` as:
+
+.. code-block:: sls
+
+   formula configuration file:
+     file.managed:
+       - name: /etc/formula.conf
+       - user: root
+       - group: root
+       - mode: 644
+       - template: jinja
+       - source:
+         - salt://formula/component/files/salt-formula.ci.local/formula.conf
+         - salt://formula/component/files/Debian/formula.conf
+         - salt://formula/component/files/default/formula.conf
+         - salt://formula/files/salt-formula.ci.local/formula.conf
+         - salt://formula/files/Debian/formula.conf
+         - salt://formula/files/default/formula.conf
diff --git a/docs/_static/css/custom.css b/docs/_static/css/custom.css
new file mode 100644 (file)
index 0000000..4617efc
--- /dev/null
@@ -0,0 +1,21 @@
+/*
+    Override styles for in-use Sphinx theme
+*/
+
+/* The next two `.wy`-based rules are specifically needed for the dealing with */
+/* the `sphinx_rtd_theme` bug where long lines do not wrap in tables */
+
+/* override table width restrictions */
+.wy-table-responsive table th
+, .wy-table-responsive table td
+{
+    /* !important prevents the common CSS stylesheets from
+       overriding this as on RTD they are loaded after this stylesheet */
+    white-space: normal !important;
+}
+
+.wy-table-responsive
+{
+    overflow: visible !important;
+}
+
diff --git a/docs/conf.py b/docs/conf.py
new file mode 100644 (file)
index 0000000..afc8bd3
--- /dev/null
@@ -0,0 +1,173 @@
+# -*- coding: utf-8 -*-
+"""Configuration file for the Sphinx documentation builder.
+
+This file does only contain a selection of the most common options. For a
+full list see the documentation:
+
+* http://www.sphinx-doc.org/en/stable/config
+
+"""
+
+from __future__ import division, print_function, unicode_literals
+
+# from datetime import datetime
+
+from recommonmark.parser import CommonMarkParser
+
+# You should have received a copy of the GNU Affero General Public License
+# along with this program.  If not, see <https://www.gnu.org/licenses/>.
+__author__     = 'Imran Iqbal'                                     # noqa: E221
+__copyright__  = 'Copyright (C) 2019, MYII'                        # noqa: E221
+__license__    = 'Apache-2.0'                                      # noqa: E221
+__version__    = 'latest'                                          # noqa: E221
+__maintainer__ = 'Imran Iqbal'                                     # noqa: E221
+
+
+# -- Project information -----------------------------------------------------
+
+project = 'template-formula'
+copyright = __copyright__.replace('Copyright (C) ', '')  # noqa: A001
+author = __author__
+version = __version__
+release = __version__
+
+
+# -- General configuration ---------------------------------------------------
+
+# If your documentation needs a minimal Sphinx version, state it here.
+#
+# needs_sphinx = '1.0'
+
+# Add any Sphinx extension module names here, as strings. They can be
+# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
+# ones.
+extensions = []
+
+# Add any paths that contain templates here, relative to this directory.
+templates_path = ['templates', '_templates', '.templates']
+
+# The suffix(es) of source filenames.
+# You can specify multiple suffix as a list of string:
+#
+source_suffix = ['.rst', '.md']
+
+# The master toctree document.
+master_doc = 'index'
+
+# The language for content autogenerated by Sphinx. Refer to documentation
+# for a list of supported languages.
+#
+# This is also used if you do content translation via gettext catalogs.
+# Usually you set "language" from the command line for these cases.
+language = None
+
+# List of patterns, relative to source directory, that match files and
+# directories to ignore when looking for source files.
+# This pattern also affects html_static_path and html_extra_path .
+exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
+
+# The name of the Pygments (syntax highlighting) style to use.
+pygments_style = 'sphinx'
+
+
+# -- Options for the reStructuredText parser ---------------------------------
+
+file_insertion_enabled = False
+
+
+# -- Options for HTML output -------------------------------------------------
+
+# The theme to use for HTML and HTML Help pages.  See the documentation for
+# a list of builtin themes.
+#
+html_theme = 'sphinx_rtd_theme'
+
+# Theme options are theme-specific and customize the look and feel of a theme
+# further.  For a list of options available for each theme, see the
+# documentation.
+#
+# html_theme_options = {}
+
+# Add any paths that contain custom static files (such as style sheets) here,
+# relative to this directory. They are copied after the builtin static files,
+# so a file named "default.css" will overwrite the builtin "default.css".
+html_static_path = ['_static']
+
+# Custom sidebar templates, must be a dictionary that maps document names
+# to template names.
+#
+# The default sidebars (for documents that don't match any pattern) are
+# defined by theme itself.  Builtin themes are using these templates by
+# default: ``['localtoc.html', 'relations.html', 'sourcelink.html',
+# 'searchbox.html']``.
+#
+# html_sidebars = {}
+
+
+# -- Options for HTMLHelp output ---------------------------------------------
+
+# Output file base name for HTML help builder.
+htmlhelp_basename = 'template-formula'
+
+
+# -- Options for Markdown output ---------------------------------------------
+
+source_parsers = {
+    '.md': CommonMarkParser,
+}
+
+
+# -- Options for LaTeX output ------------------------------------------------
+
+latex_elements = {
+    # The paper size ('letterpaper' or 'a4paper').
+    #
+    # 'papersize': 'letterpaper',
+
+    # The font size ('10pt', '11pt' or '12pt').
+    #
+    # 'pointsize': '10pt',
+
+    # Additional stuff for the LaTeX preamble.
+    #
+    # 'preamble': '',
+
+    # Latex figure (float) alignment
+    #
+    # 'figure_align': 'htbp',
+}
+
+# Grouping the document tree into LaTeX files. List of tuples
+# (source start file, target name, title,
+#  author, documentclass [howto, manual, or own class]).
+latex_documents = [
+    (
+        'index',
+        'template-formula.tex',
+        u'template-formula Documentation',
+        u'',
+        'manual',
+    ),
+]
+
+
+# -- Functions: `setup`, docstring preprocessing, etc. -----------------------
+
+def setup(app):
+    """Prepare the Sphinx application object.
+
+    Used for providing a custom CSS file for override styles.
+
+    Parameters
+    ----------
+    app : object
+        The Sphinx application object.
+
+    Returns
+    -------
+    app : object
+        The Sphinx application object.
+
+    """
+    app.add_stylesheet('css/custom.css')
+    return app
diff --git a/docs/index.rst b/docs/index.rst
new file mode 100644 (file)
index 0000000..a49c0c3
--- /dev/null
@@ -0,0 +1,20 @@
+.. _index:
+
+.. ``template-formula`` documentation master file.
+   You can adapt this file completely to your liking, but it should at least
+   contain the root `toctree` directive.
+
+Welcome to template-formula's documentation!
+============================================
+
+.. toctree::
+   :maxdepth: 2
+   :caption: Contents
+   :numbered:
+   :glob:
+
+   README <README>
+   CONTRIBUTING
+   TOFS_pattern
+   AUTHORS
+   CHANGELOG
diff --git a/kitchen.yml b/kitchen.yml
new file mode 100644 (file)
index 0000000..08950d5
--- /dev/null
@@ -0,0 +1,215 @@
+# -*- coding: utf-8 -*-
+# vim: ft=yaml
+---
+# For help on this file's format, see https://kitchen.ci/
+driver:
+  name: docker
+  use_sudo: false
+  privileged: true
+  run_command: /lib/systemd/systemd
+
+# Make sure the platforms listed below match up with
+# the `env.matrix` instances defined in `.travis.yml`
+platforms:
+  ## SALT `master`
+  - name: debian-10-master-py3
+    driver:
+      image: netmanagers/salt-master-py3:debian-10
+  - name: ubuntu-1804-master-py3
+    driver:
+      image: netmanagers/salt-master-py3:ubuntu-18.04
+  - name: centos-8-master-py3
+    driver:
+      image: netmanagers/salt-master-py3:centos-8
+  - name: fedora-31-master-py3
+    driver:
+      image: netmanagers/salt-master-py3:fedora-31
+  - name: opensuse-leap-151-master-py3
+    driver:
+      image: netmanagers/salt-master-py3:opensuse-leap-15.1
+      run_command: /usr/lib/systemd/systemd
+    # Workaround to avoid intermittent failures on `opensuse-leap-15.1`:
+    # => SCP did not finish successfully (255):  (Net::SCP::Error)
+    transport:
+      max_ssh_sessions: 1
+  - name: amazonlinux-2-master-py3
+    driver:
+      image: netmanagers/salt-master-py3:amazonlinux-2
+  - name: arch-base-latest-master-py2
+    driver:
+      image: netmanagers/salt-master-py2:arch-base-latest
+      run_command: /usr/lib/systemd/systemd
+
+  ## SALT `3000.1`
+  - name: debian-10-3000-1-py3
+    driver:
+      image: netmanagers/salt-3000.1-py3:debian-10
+  - name: ubuntu-1804-3000-1-py3
+    driver:
+      image: netmanagers/salt-3000.1-py3:ubuntu-18.04
+  - name: centos-8-3000-1-py3
+    driver:
+      image: netmanagers/salt-3000.1-py3:centos-8
+  - name: fedora-31-3000-1-py3
+    driver:
+      image: netmanagers/salt-3000.1-py3:fedora-31
+  - name: opensuse-leap-151-3000-1-py3
+    driver:
+      image: netmanagers/salt-3000.1-py3:opensuse-leap-15.1
+      run_command: /usr/lib/systemd/systemd
+    # Workaround to avoid intermittent failures on `opensuse-leap-15.1`:
+    # => SCP did not finish successfully (255):  (Net::SCP::Error)
+    transport:
+      max_ssh_sessions: 1
+  - name: amazonlinux-2-3000-1-py3
+    driver:
+      image: netmanagers/salt-3000.1-py3:amazonlinux-2
+  - name: arch-base-latest-3000-1-py2
+    driver:
+      image: netmanagers/salt-3000.1-py2:arch-base-latest
+      run_command: /usr/lib/systemd/systemd
+
+  ## SALT `2019.2`
+  - 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: ubuntu-1604-2019-2-py3
+    driver:
+      image: netmanagers/salt-2019.2-py3:ubuntu-16.04
+  - name: centos-8-2019-2-py3
+    driver:
+      image: netmanagers/salt-2019.2-py3:centos-8
+  - name: centos-7-2019-2-py3
+    driver:
+      image: netmanagers/salt-2019.2-py3:centos-7
+  - name: fedora-31-2019-2-py3
+    driver:
+      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.1
+      run_command: /usr/lib/systemd/systemd
+    # Workaround to avoid intermittent failures on `opensuse-leap-15.1`:
+    # => SCP did not finish successfully (255):  (Net::SCP::Error)
+    transport:
+      max_ssh_sessions: 1
+  - name: amazonlinux-2-2019-2-py3
+    driver:
+      image: netmanagers/salt-2019.2-py3:amazonlinux-2
+  - name: ubuntu-1804-2019-2-py2
+    driver:
+      image: netmanagers/salt-2019.2-py2:ubuntu-18.04
+  - name: amazonlinux-1-2019-2-py2
+    driver:
+      image: netmanagers/salt-2019.2-py2:amazonlinux-1
+      run_command: /sbin/init
+  - name: arch-base-latest-2019-2-py2
+    driver:
+      image: netmanagers/salt-2019.2-py2:arch-base-latest
+      run_command: /usr/lib/systemd/systemd
+
+  ## SALT `2018.3`
+  - name: centos-7-2018-3-py3
+    driver:
+      image: netmanagers/salt-2018.3-py3:centos-7
+  - name: fedora-30-2018-3-py3
+    driver:
+      image: netmanagers/salt-2018.3-py3:fedora-30
+  - name: debian-9-2018-3-py2
+    driver:
+      image: netmanagers/salt-2018.3-py2:debian-9
+  - name: debian-8-2018-3-py2
+    driver:
+      image: netmanagers/salt-2018.3-py2:debian-8
+  - name: ubuntu-1804-2018-3-py2
+    driver:
+      image: netmanagers/salt-2018.3-py2:ubuntu-18.04
+  - name: ubuntu-1604-2018-3-py2
+    driver:
+      image: netmanagers/salt-2018.3-py2:ubuntu-16.04
+  - name: centos-6-2018-3-py2
+    driver:
+      image: netmanagers/salt-2018.3-py2:centos-6
+      run_command: /sbin/init
+  - name: opensuse-leap-151-2018-3-py2
+    driver:
+      image: netmanagers/salt-2018.3-py2:opensuse-leap-15.1
+      run_command: /usr/lib/systemd/systemd
+    # Workaround to avoid intermittent failures on `opensuse-leap-15.1`:
+    # => SCP did not finish successfully (255):  (Net::SCP::Error)
+    transport:
+      max_ssh_sessions: 1
+  - name: amazonlinux-1-2018-3-py2
+    driver:
+      image: netmanagers/salt-2018.3-py2:amazonlinux-1
+      run_command: /sbin/init
+  - name: arch-base-latest-2018-3-py2
+    driver:
+      image: netmanagers/salt-2018.3-py2:arch-base-latest
+      run_command: /usr/lib/systemd/systemd
+
+provisioner:
+  name: salt_solo
+  log_level: debug
+  salt_install: none
+  require_chef: false
+  formula: TEMPLATE
+  salt_copy_filter:
+    - .kitchen
+    - .git
+
+verifier:
+  # https://www.inspec.io/
+  name: inspec
+  sudo: true
+  # cli, documentation, html, progress, json, json-min, json-rspec, junit
+  reporter:
+    - cli
+
+suites:
+  - name: default
+    excludes:
+      - centos-6-2018-3-py2
+    provisioner:
+      state_top:
+        base:
+          '*':
+            - TEMPLATE
+      pillars:
+        top.sls:
+          base:
+            '*':
+              - TEMPLATE
+              - define_roles
+      pillars_from_files:
+        TEMPLATE.sls: pillar.example
+        define_roles.sls: test/salt/pillar/define_roles.sls
+    verifier:
+      inspec_tests:
+        - path: test/integration/default
+  - name: centos6
+    includes:
+      - centos-6-2018-3-py2
+    provisioner:
+      state_top:
+        base:
+          '*':
+            - TEMPLATE
+      pillars:
+        top.sls:
+          base:
+            '*':
+              - TEMPLATE
+              - define_roles
+      pillars_from_files:
+        TEMPLATE.sls: test/salt/pillar/centos6.sls
+        define_roles.sls: test/salt/pillar/define_roles.sls
+    verifier:
+      inspec_tests:
+        - path: test/integration/default
diff --git a/pillar.example b/pillar.example
new file mode 100644 (file)
index 0000000..995d8f7
--- /dev/null
@@ -0,0 +1,57 @@
+# -*- coding: utf-8 -*-
+# vim: ft=yaml
+---
+TEMPLATE:
+  lookup:
+    master: template-master
+    # Just for testing purposes
+    winner: lookup
+    added_in_lookup: lookup_value
+
+  # Using bash package and udev service as an example. This allows us to
+  # test the template formula itself. You should set these parameters to
+  # examples that make sense in the contexto of the formula you're writing.
+  pkg:
+    name: bash
+  service:
+    name: systemd-journald
+  config: /etc/template-formula.conf
+
+  tofs:
+    # The files_switch key serves as a selector for alternative
+    # directories under the formula files directory. See TOFS pattern
+    # doc for more info.
+    # Note: Any value not evaluated by `config.get` will be used literally.
+    # This can be used to set custom paths, as many levels deep as required.
+    files_switch:
+      - any/path/can/be/used/here
+      - id
+      - roles
+      - osfinger
+      - os
+      - os_family
+    # All aspects of path/file resolution are customisable using the options below.
+    # This is unnecessary in most cases; there are sensible defaults.
+    # Default path: salt://< path_prefix >/< dirs.files >/< dirs.default >
+    #         I.e.: salt://TEMPLATE/files/default
+    # path_prefix: template_alt
+    # dirs:
+    #   files: files_alt
+    #   default: default_alt
+    # The entries under `source_files` are prepended to the default source files
+    # given for the state
+    # source_files:
+    #   TEMPLATE-config-file-file-managed:
+    #     - 'example_alt.tmpl'
+    #     - 'example_alt.tmpl.jinja'
+
+    # For testing purposes
+    source_files:
+      TEMPLATE-config-file-file-managed:
+        - 'example.tmpl.jinja'
+      TEMPLATE-subcomponent-config-file-file-managed:
+        - 'subcomponent-example.tmpl.jinja'
+
+  # Just for testing purposes
+  winner: pillar
+  added_in_pillar: pillar_value
diff --git a/pre-commit_semantic-release.sh b/pre-commit_semantic-release.sh
new file mode 100755 (executable)
index 0000000..ba80535
--- /dev/null
@@ -0,0 +1,30 @@
+#!/bin/sh
+
+###############################################################################
+# (A) Update `FORMULA` with `${nextRelease.version}`
+###############################################################################
+sed -i -e "s_^\(version:\).*_\1 ${1}_" FORMULA
+
+
+###############################################################################
+# (B) Use `m2r` to convert automatically produced `.md` docs to `.rst`
+###############################################################################
+
+# Install `m2r`
+sudo -H pip install m2r
+
+# Copy and then convert the `.md` docs
+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
+sed -i -e '1,4s/-/=/g' CHANGELOG.rst
+
+# Use for debugging output, when required
+# cat AUTHORS.rst
+# cat CHANGELOG.rst
+
+# Return back to the main directory
+cd ..
diff --git a/release-rules.js b/release-rules.js
new file mode 100644 (file)
index 0000000..c63c850
--- /dev/null
@@ -0,0 +1,18 @@
+// No release is triggered for the types commented out below.
+// Commits using these types will be incorporated into the next release.
+//
+// NOTE: Any changes here must be reflected in `CONTRIBUTING.md`.
+module.exports = [
+  {breaking: true, release: 'major'},
+  // {type: 'build', release: 'patch'},
+  // {type: 'chore', release: 'patch'},
+  // {type: 'ci', release: 'patch'},
+  {type: 'docs', release: 'patch'},
+  {type: 'feat', release: 'minor'},
+  {type: 'fix', release: 'patch'},
+  {type: 'perf', release: 'patch'},
+  {type: 'refactor', release: 'patch'},
+  {type: 'revert', release: 'patch'},
+  {type: 'style', release: 'patch'},
+  {type: 'test', release: 'patch'},
+];
diff --git a/release.config.js b/release.config.js
new file mode 100644 (file)
index 0000000..6af7aa8
--- /dev/null
@@ -0,0 +1,106 @@
+module.exports = {
+  branch: 'master',
+  plugins: [
+      ['@semantic-release/commit-analyzer', {
+        preset: 'angular',
+        releaseRules: './release-rules.js',
+      }],
+      '@semantic-release/release-notes-generator',
+      ['@semantic-release/changelog', {
+        changelogFile: 'CHANGELOG.md',
+        changelogTitle: '# Changelog',
+      }],
+      ['@semantic-release/exec', {
+        prepareCmd: 'sh ./pre-commit_semantic-release.sh ${nextRelease.version}',
+      }],
+      ['@semantic-release/git', {
+        assets: ['*.md', 'docs/*.rst', 'FORMULA'],
+      }],
+      '@semantic-release/github',
+  ],
+  generateNotes: {
+    preset: 'angular',
+    writerOpts: {
+      // Required due to upstream bug preventing all types being displayed.
+      // Bug: https://github.com/conventional-changelog/conventional-changelog/issues/317
+      // Fix: https://github.com/conventional-changelog/conventional-changelog/pull/410
+      transform: (commit, context) => {
+          const issues = []
+
+          commit.notes.forEach(note => {
+              note.title = `BREAKING CHANGES`
+          })
+
+          // NOTE: Any changes here must be reflected in `CONTRIBUTING.md`.
+          if (commit.type === `feat`) {
+              commit.type = `Features`
+          } else if (commit.type === `fix`) {
+              commit.type = `Bug Fixes`
+          } else if (commit.type === `perf`) {
+              commit.type = `Performance Improvements`
+          } else if (commit.type === `revert`) {
+              commit.type = `Reverts`
+          } else if (commit.type === `docs`) {
+              commit.type = `Documentation`
+          } else if (commit.type === `style`) {
+              commit.type = `Styles`
+          } else if (commit.type === `refactor`) {
+              commit.type = `Code Refactoring`
+          } else if (commit.type === `test`) {
+              commit.type = `Tests`
+          } else if (commit.type === `build`) {
+              commit.type = `Build System`
+          // } else if (commit.type === `chore`) {
+          //     commit.type = `Maintenance`
+          } else if (commit.type === `ci`) {
+              commit.type = `Continuous Integration`
+          } else {
+              return
+          }
+
+          if (commit.scope === `*`) {
+              commit.scope = ``
+          }
+
+          if (typeof commit.hash === `string`) {
+              commit.shortHash = commit.hash.substring(0, 7)
+          }
+
+          if (typeof commit.subject === `string`) {
+              let url = context.repository
+                  ? `${context.host}/${context.owner}/${context.repository}`
+                  : context.repoUrl
+              if (url) {
+                  url = `${url}/issues/`
+                  // Issue URLs.
+                  commit.subject = commit.subject.replace(/#([0-9]+)/g, (_, issue) => {
+                      issues.push(issue)
+                      return `[#${issue}](${url}${issue})`
+                  })
+              }
+              if (context.host) {
+                  // User URLs.
+                  commit.subject = commit.subject.replace(/\B@([a-z0-9](?:-?[a-z0-9/]){0,38})/g, (_, username) => {
+                  if (username.includes('/')) {
+                      return `@${username}`
+                  }
+
+                  return `[@${username}](${context.host}/${username})`
+                  })
+              }
+          }
+
+          // remove references that already appear in the subject
+          commit.references = commit.references.filter(reference => {
+              if (issues.indexOf(reference.issue) === -1) {
+                  return true
+              }
+
+              return false
+          })
+
+          return commit
+      },
+    },
+  },
+};
diff --git a/test/integration/default/README.md b/test/integration/default/README.md
new file mode 100644 (file)
index 0000000..37cf963
--- /dev/null
@@ -0,0 +1,50 @@
+# 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).
diff --git a/test/integration/default/controls/config_spec.rb b/test/integration/default/controls/config_spec.rb
new file mode 100644 (file)
index 0000000..68b5b4b
--- /dev/null
@@ -0,0 +1,36 @@
+# frozen_string_literal: true
+
+control 'TEMPLATE configuration' do
+  title 'should match desired lines'
+
+  describe file('/etc/template-formula.conf') do
+    it { should be_file }
+    it { should be_owned_by 'root' }
+    it { should be_grouped_into 'root' }
+    its('mode') { should cmp '0644' }
+    its('content') do
+      should include(
+        'This is another example file from SaltStack template-formula.'
+      )
+    end
+    its('content') { should include '"added_in_pillar": "pillar_value"' }
+    its('content') { should include '"added_in_defaults": "defaults_value"' }
+    its('content') { should include '"added_in_lookup": "lookup_value"' }
+    its('content') { should include '"config": "/etc/template-formula.conf"' }
+    its('content') { should include '"lookup": {"added_in_lookup": "lookup_value",' }
+    its('content') { should include '"pkg": {"name": "' }
+    its('content') { should include '"service": {"name": "' }
+    its('content') do
+      should include(
+        '"tofs": {"files_switch": ["any/path/can/be/used/here", "id", '\
+        '"roles", "osfinger", "os", "os_family"], "source_files": '\
+        '{"TEMPLATE-config-file-file-managed": ["example.tmpl.jinja"], '\
+        '"TEMPLATE-subcomponent-config-file-file-managed": '\
+        '["subcomponent-example.tmpl.jinja"]}'
+      )
+    end
+    its('content') { should include '"arch": "amd64"' }
+    its('content') { should include '"winner": "pillar"}' }
+    its('content') { should include 'winner of the merge: pillar' }
+  end
+end
diff --git a/test/integration/default/controls/packages_spec.rb b/test/integration/default/controls/packages_spec.rb
new file mode 100644 (file)
index 0000000..cc06d4e
--- /dev/null
@@ -0,0 +1,13 @@
+# frozen_string_literal: true
+
+# Overide by OS
+package_name = 'bash'
+package_name = 'cronie' if (os[:name] == 'centos') && os[:release].start_with?('6')
+
+control 'TEMPLATE package' do
+  title 'should be installed'
+
+  describe package(package_name) do
+    it { should be_installed }
+  end
+end
diff --git a/test/integration/default/controls/services_spec.rb b/test/integration/default/controls/services_spec.rb
new file mode 100644 (file)
index 0000000..5d11276
--- /dev/null
@@ -0,0 +1,15 @@
+# frozen_string_literal: true
+
+# Overide by OS
+service_name = 'systemd-journald'
+service_name = 'crond' if (os[:name] == 'centos') && os[:release].start_with?('6')
+
+control 'TEMPLATE service' do
+  impact 0.5
+  title 'should be running and enabled'
+
+  describe service(service_name) do
+    it { should be_enabled }
+    it { should be_running }
+  end
+end
diff --git a/test/integration/default/controls/subcomponent_config_spec.rb b/test/integration/default/controls/subcomponent_config_spec.rb
new file mode 100644 (file)
index 0000000..f9c9108
--- /dev/null
@@ -0,0 +1,25 @@
+# frozen_string_literal: true
+
+control 'TEMPLATE subcomponent configuration' do
+  title 'should match desired lines'
+
+  describe file('/etc/TEMPLATE-subcomponent-formula.conf') do
+    it { should be_file }
+    it { should be_owned_by 'root' }
+    it { should be_grouped_into 'root' }
+    its('mode') { should cmp '0644' }
+    its('content') do
+      should include(
+        '# File managed by Salt at '\
+        '<salt://TEMPLATE/subcomponent/config/files/default/'\
+        'subcomponent-example.tmpl.jinja>.'
+      )
+    end
+    its('content') do
+      should include(
+        'This is another subcomponent example file from SaltStack '\
+        'template-formula.'
+      )
+    end
+  end
+end
diff --git a/test/integration/default/inspec.yml b/test/integration/default/inspec.yml
new file mode 100644 (file)
index 0000000..bf5b021
--- /dev/null
@@ -0,0 +1,18 @@
+# -*- coding: utf-8 -*-
+# vim: ft=yaml
+---
+name: default
+title: TEMPLATE formula
+maintainer: SaltStack Formulas
+license: Apache-2.0
+summary: Verify that the TEMPLATE formula is setup and configured correctly
+supports:
+  - platform-name: debian
+  - platform-name: ubuntu
+  - platform-name: centos
+  - platform-name: fedora
+  - platform-name: opensuse
+  - platform-name: suse
+  - platform-name: freebsd
+  - platform-name: amazon
+  - platform-name: arch
diff --git a/test/salt/pillar/centos6.sls b/test/salt/pillar/centos6.sls
new file mode 100644 (file)
index 0000000..7c5a4cf
--- /dev/null
@@ -0,0 +1,55 @@
+# -*- coding: utf-8 -*-
+# vim: ft=yaml
+---
+TEMPLATE:
+  lookup:
+    master: template-master
+    # Just for testing purposes
+    winner: lookup
+    added_in_lookup: lookup_value
+
+  # Using bash package and udev service as an example. This allows us to
+  # test the template formula itself. You should set these parameters to
+  # examples that make sense in the contexto of the formula you're writing.
+  pkg:
+    name: cronie
+  service:
+    name: crond
+  config: /etc/template-formula.conf
+
+  tofs:
+    # The files_switch key serves as a selector for alternative
+    # directories under the formula files directory. See TOFS pattern
+    # doc for more info.
+    # Note: Any value not evaluated by `config.get` will be used literally.
+    # This can be used to set custom paths, as many levels deep as required.
+    files_switch:
+      - any/path/can/be/used/here
+      - id
+      - roles
+      - osfinger
+      - os
+      - os_family
+    # All aspects of path/file resolution are customisable using the options below.
+    # This is unnecessary in most cases; there are sensible defaults.
+    # path_prefix: template_alt
+    # dirs:
+    #   files: files_alt
+    #   default: default_alt
+    # The entries under `source_files` are prepended to the default source files
+    # given for the state
+    # source_files:
+    #   template-config-file-file-managed:
+    #     - 'example_alt.tmpl'
+    #     - 'example_alt.tmpl.jinja'
+
+    # For testing purposes
+    source_files:
+      TEMPLATE-config-file-file-managed:
+        - 'example.tmpl.jinja'
+      TEMPLATE-subcomponent-config-file-file-managed:
+        - 'subcomponent-example.tmpl.jinja'
+
+  # Just for testing purposes
+  winner: pillar
+  added_in_pillar: pillar_value
diff --git a/test/salt/pillar/define_roles.sls b/test/salt/pillar/define_roles.sls
new file mode 100644 (file)
index 0000000..bfd8b69
--- /dev/null
@@ -0,0 +1,7 @@
+# -*- coding: utf-8 -*-
+# vim: ft=yaml
+---
+# libtofs.jinja must work with tofs.files_switch looked up list
+roles:
+  - foo
+  - bar