Skip to content

Commit

Permalink
refactor(states+config): to conform to “template-formula” standard
Browse files Browse the repository at this point in the history
Improved configuration management

Added TOFS support

Added "upssched" config management

Added tests

Updated documentation

BREAKING CHANGE: the templates are now under "nut/files/default".
BREAKING CHANGE: "pkg" and "extra_pkgs" are now merged under a "pkgs" list.
BREAKING CHANGE: config file names are now under "<server|client>.<component>.config.file"
  • Loading branch information
javierbertoli committed May 31, 2020
1 parent c1ea282 commit ae33686
Show file tree
Hide file tree
Showing 72 changed files with 3,435 additions and 555 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/commitlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# -*- coding: utf-8 -*-
# vim: ft=yaml
---
name: Commitlint
'on': [pull_request]

jobs:
lint:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: wagoid/commitlint-github-action@v1
187 changes: 114 additions & 73 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,81 +1,122 @@
*~
*#
.bak
/bin/
build
/build
.cache
*,cover
# 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
dist
doc/_build
.doctrees
*.DS_Store
*.egg-info
/etc/
*_flymake.py
Gemfile.lock
htmlcov/
*.cover
.hypothesis/
.idea
*.idea
*.iml
/include/
junit*.xml
.kitchen
.kitchen.local.yml
/lib/
/lib64/
/local/
/logs
MANIFEST
metadata.json
kitchen.local.yml
junit-*.xml

# Translations
*.mo
nosetests.xml
.orig
/pip/
pkg/
/.project
*.pyc
__pycache__/
*$py.class
*.py[co]
*.py[cod]
/.pydevproject
/root/**
/.ropeproject
*.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
.ruby-version
/salt/_syspaths.py
/.settings
/share/
/src
*.sublime-project
*.sublime-workspace
.*.sw?
*.swo
*.swp
_syspaths.py
tags
tests/build/
/tests/cachedir/
tests/integration/cloud/providers/logs
tests/integration/cloud/providers/pki/minions
tests/integration/files/conf/grains
/tests/integration/tmp/
/tests/unit/templates/roots/
tests/unit/templates/roots
*.tmp
top.sls
.tox/
.vagrant/
**/.vagrant
**/Vagrantfile
/var/
varstack.egg-info
vendor
_version.py
*.wpr
*.wpu

# mkdocs documentation
/site

# mypy
.mypy_cache/

# Bundler
.bundle/

# 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/
40 changes: 0 additions & 40 deletions .kitchen.yml

This file was deleted.

16 changes: 16 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# -*- 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
Metrics/BlockLength:
ExcludedMethods:
- control
- describe
# Increase from default of `25`
Max: 30

# Any offenses that should be fixed, e.g. collected via. `rubocop --auto-gen-config`
14 changes: 14 additions & 0 deletions .salt-lint
Original file line number Diff line number Diff line change
@@ -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
Loading

0 comments on commit ae33686

Please # to comment.