1
0
Fork 0
mirror of synced 2024-06-02 15:21:10 -04:00

Compare commits

..

No commits in common. "master" and "v0.9.0" have entirely different histories.

48 changed files with 244 additions and 3181 deletions

View file

@ -1,16 +0,0 @@
# -*- 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

31
.gitignore vendored
View file

@ -47,8 +47,6 @@ coverage.xml
.hypothesis/
.kitchen
.kitchen.local.yml
kitchen.local.yml
junit-*.xml
# Translations
*.mo
@ -91,9 +89,6 @@ celerybeat-schedule
venv/
ENV/
# visual studio
.vs/
# Spyder project settings
.spyderproject
.spyproject
@ -106,29 +101,3 @@ ENV/
# 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/
# `salt-formula` -- Vagrant Specific files
.vagrant
top.sls
!test/salt/pillar/top.sls
# `suricata-formula` -- Platform binaries
*.rpm
*.deb

View file

@ -1,212 +0,0 @@
# -*- coding: utf-8 -*-
# vim: ft=yaml
---
###############################################################################
# Define all YAML node anchors
###############################################################################
.node_anchors:
# `only` (also used for `except` where applicable)
only_branch_master_parent_repo: &only_branch_master_parent_repo
- 'master@saltstack-formulas/logrotate-formula'
# `stage`
stage_lint: &stage_lint 'lint'
stage_release: &stage_release 'release'
stage_test: &stage_test 'test'
# `image`
image_commitlint: &image_commitlint 'myii/ssf-commitlint:11'
image_dindruby: &image_dindruby 'myii/ssf-dind-ruby:2.7.1-r3'
image_precommit: &image_precommit
name: 'myii/ssf-pre-commit:2.9.2'
entrypoint: ['/bin/bash', '-c']
image_rubocop: &image_rubocop 'pipelinecomponents/rubocop:latest'
image_semantic-release: &image_semanticrelease 'myii/ssf-semantic-release:15.14'
# `services`
services_docker_dind: &services_docker_dind
- 'docker:dind'
# `variables`
# https://forum.gitlab.com/t/gitlab-com-ci-caching-rubygems/5627/3
# https://bundler.io/v1.16/bundle_config.html
variables_bundler: &variables_bundler
BUNDLE_CACHE_PATH: '${CI_PROJECT_DIR}/.cache/bundler'
BUNDLE_WITHOUT: 'production'
# `cache`
cache_bundler: &cache_bundler
key: '${CI_JOB_STAGE}'
paths:
- '${BUNDLE_CACHE_PATH}'
###############################################################################
# Define stages and global variables
###############################################################################
stages:
- *stage_lint
- *stage_test
- *stage_release
variables:
DOCKER_DRIVER: 'overlay2'
###############################################################################
# `lint` stage: `commitlint`, `pre-commit` & `rubocop` (latest, failure allowed)
###############################################################################
commitlint:
stage: *stage_lint
image: *image_commitlint
script:
# Add `upstream` remote to get access to `upstream/master`
- 'git remote add upstream
https://gitlab.com/saltstack-formulas/logrotate-formula.git'
- 'git fetch --all'
# Set default commit hashes for `--from` and `--to`
- 'export COMMITLINT_FROM="$(git merge-base upstream/master HEAD)"'
- 'export COMMITLINT_TO="${CI_COMMIT_SHA}"'
# `coqbot` adds a merge commit to test PRs on top of the latest commit in
# the repo; amend this merge commit message to avoid failure
- |
if [ "${GITLAB_USER_LOGIN}" = "coqbot" ] \
&& [ "${CI_COMMIT_BRANCH}" != "master" ]; then
git commit --amend -m \
'chore: reword coqbot merge commit message for commitlint'
export COMMITLINT_TO=HEAD
fi
# Run `commitlint`
- 'commitlint --from "${COMMITLINT_FROM}"
--to "${COMMITLINT_TO}"
--verbose'
pre-commit:
stage: *stage_lint
image: *image_precommit
# https://pre-commit.com/#gitlab-ci-example
variables:
PRE_COMMIT_HOME: '${CI_PROJECT_DIR}/.cache/pre-commit'
cache:
key: '${CI_JOB_NAME}'
paths:
- '${PRE_COMMIT_HOME}'
script:
- 'pre-commit run --all-files --color always --verbose'
# Use a separate job for `rubocop` other than the one potentially run by `pre-commit`
# - The `pre-commit` check will only be available for formulas that pass the default
# `rubocop` check -- and must continue to do so
# - This job is allowed to fail, so can be used for all formulas
# - Furthermore, this job uses all of the latest `rubocop` features & cops,
# which will help when upgrading the `rubocop` linter used in `pre-commit`
rubocop:
allow_failure: true
stage: *stage_lint
image: *image_rubocop
script:
- 'rubocop -d -P -S --enable-pending-cops'
###############################################################################
# Define `test` template
###############################################################################
.test_instance: &test_instance
stage: *stage_test
image: *image_dindruby
services: *services_docker_dind
variables: *variables_bundler
cache: *cache_bundler
before_script:
# TODO: This should work from the env vars above automatically
- 'bundle config set path "${BUNDLE_CACHE_PATH}"'
- 'bundle config set without "${BUNDLE_WITHOUT}"'
- 'bundle install'
script:
# Alternative value to consider: `${CI_JOB_NAME}`
- 'bin/kitchen verify "${DOCKER_ENV_CI_JOB_NAME}"'
###############################################################################
# Define `test` template (`allow_failure: true`)
###############################################################################
.test_instance_failure_permitted:
<<: *test_instance
allow_failure: true
###############################################################################
# `test` stage: each instance below uses the `test` template above
###############################################################################
## 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`
# yamllint disable rule:line-length
# default-debian-11-tiamat-py3: {extends: '.test_instance'}
# default-debian-10-tiamat-py3: {extends: '.test_instance'}
# default-debian-9-tiamat-py3: {extends: '.test_instance'}
# default-ubuntu-2204-tiamat-py3: {extends: '.test_instance_failure_permitted'}
# default-ubuntu-2004-tiamat-py3: {extends: '.test_instance'}
# default-ubuntu-1804-tiamat-py3: {extends: '.test_instance'}
# default-centos-stream8-tiamat-py3: {extends: '.test_instance_failure_permitted'}
# default-centos-7-tiamat-py3: {extends: '.test_instance'}
# default-amazonlinux-2-tiamat-py3: {extends: '.test_instance'}
# default-oraclelinux-8-tiamat-py3: {extends: '.test_instance'}
# default-oraclelinux-7-tiamat-py3: {extends: '.test_instance'}
# default-almalinux-8-tiamat-py3: {extends: '.test_instance'}
# default-rockylinux-8-tiamat-py3: {extends: '.test_instance'}
default-debian-11-master-py3: {extends: '.test_instance'}
default-debian-10-master-py3: {extends: '.test_instance'}
default-debian-9-master-py3: {extends: '.test_instance'}
default-ubuntu-2204-master-py3: {extends: '.test_instance_failure_permitted'}
default-ubuntu-2004-master-py3: {extends: '.test_instance'}
default-ubuntu-1804-master-py3: {extends: '.test_instance'}
default-centos-stream8-master-py3: {extends: '.test_instance_failure_permitted'}
default-centos-7-master-py3: {extends: '.test_instance'}
default-fedora-36-master-py3: {extends: '.test_instance_failure_permitted'}
default-fedora-35-master-py3: {extends: '.test_instance'}
default-opensuse-leap-153-master-py3: {extends: '.test_instance'}
default-opensuse-tmbl-latest-master-py3: {extends: '.test_instance_failure_permitted'}
default-amazonlinux-2-master-py3: {extends: '.test_instance'}
default-oraclelinux-8-master-py3: {extends: '.test_instance'}
default-oraclelinux-7-master-py3: {extends: '.test_instance'}
default-arch-base-latest-master-py3: {extends: '.test_instance'}
default-gentoo-stage3-latest-master-py3: {extends: '.test_instance'}
default-gentoo-stage3-systemd-master-py3: {extends: '.test_instance'}
default-almalinux-8-master-py3: {extends: '.test_instance'}
default-rockylinux-8-master-py3: {extends: '.test_instance'}
# default-debian-11-3004-1-py3: {extends: '.test_instance'}
# default-debian-10-3004-1-py3: {extends: '.test_instance'}
# default-debian-9-3004-1-py3: {extends: '.test_instance'}
# default-ubuntu-2204-3004-1-py3: {extends: '.test_instance_failure_permitted'}
# default-ubuntu-2004-3004-1-py3: {extends: '.test_instance'}
# default-ubuntu-1804-3004-1-py3: {extends: '.test_instance'}
# default-centos-stream8-3004-1-py3: {extends: '.test_instance_failure_permitted'}
# default-centos-7-3004-1-py3: {extends: '.test_instance'}
# default-fedora-36-3004-1-py3: {extends: '.test_instance_failure_permitted'}
# default-fedora-35-3004-1-py3: {extends: '.test_instance'}
# default-amazonlinux-2-3004-1-py3: {extends: '.test_instance'}
# default-oraclelinux-8-3004-1-py3: {extends: '.test_instance'}
# default-oraclelinux-7-3004-1-py3: {extends: '.test_instance'}
# default-arch-base-latest-3004-1-py3: {extends: '.test_instance'}
# default-gentoo-stage3-latest-3004-1-py3: {extends: '.test_instance'}
# default-gentoo-stage3-systemd-3004-1-py3: {extends: '.test_instance'}
# default-almalinux-8-3004-1-py3: {extends: '.test_instance'}
# default-rockylinux-8-3004-1-py3: {extends: '.test_instance'}
# default-opensuse-leap-153-3004-0-py3: {extends: '.test_instance'}
# default-opensuse-tmbl-latest-3004-0-py3: {extends: '.test_instance_failure_permitted'}
# default-debian-10-3003-4-py3: {extends: '.test_instance'}
# default-debian-9-3003-4-py3: {extends: '.test_instance'}
# default-ubuntu-2004-3003-4-py3: {extends: '.test_instance'}
# default-ubuntu-1804-3003-4-py3: {extends: '.test_instance'}
# default-centos-stream8-3003-4-py3: {extends: '.test_instance_failure_permitted'}
# default-centos-7-3003-4-py3: {extends: '.test_instance'}
# default-amazonlinux-2-3003-4-py3: {extends: '.test_instance'}
# default-oraclelinux-8-3003-4-py3: {extends: '.test_instance'}
# default-oraclelinux-7-3003-4-py3: {extends: '.test_instance'}
# default-almalinux-8-3003-4-py3: {extends: '.test_instance'}
# yamllint enable rule:line-length
###############################################################################
# `release` stage: `semantic-release`
###############################################################################
semantic-release:
only: *only_branch_master_parent_repo
stage: *stage_release
image: *image_semanticrelease
variables:
MAINTAINER_TOKEN: '${GH_TOKEN}'
script:
# Update `AUTHORS.md`
- '${HOME}/go/bin/maintainer contributor'
# Run `semantic-release`
- 'semantic-release'

44
.kitchen.docker.yml Normal file
View file

@ -0,0 +1,44 @@
driver:
name: docker
use_sudo: false
privileged: true
synced_folders:
- ['.kitchen/cache', '/tmp/omnibus', disabled: true]
provisioner:
name: salt_solo
salt_install: bootstrap
salt_version: latest
salt_bootstrap_url: https://bootstrap.saltstack.com
salt_bootstrap_options: -X -p git -p curl -p sudo
is_file_root: true
formula: logrotate
require_chef: false
require_chef: false
salt_pillar_root: pillar.example
pillars-from-files:
logrotate.sls: pillar.example
pillars:
top.sls:
base:
"*":
- logrotate
state_top:
base:
'*':
- logrotate
- logrotate.jobs
platforms:
- name: centos
- name: opensuse
- name: ubuntu
- name: debian
suites:
- name: default
verifier:
name: inspec

50
.kitchen.yml Normal file
View file

@ -0,0 +1,50 @@
---
driver:
name: docker
driver_config:
use_sudo: false
privileged: true
provision_command: mkdir -p /run/sshd
run_command: /lib/systemd/systemd
platforms:
- name: debian-9
- name: ubuntu-18.04
- name: fedora-27
- name: centos-7
provisioner:
name: salt_solo
log_level: info
require_chef: false
salt_install: bootstrap
salt_version: latest
salt_bootstrap_url: https://bootstrap.saltstack.com
salt_bootstrap_options: -X -p git -p curl -p sudo
formula: logrotate
salt_pillar_root: pillar.example
pillars-from-files:
logrotate.sls: pillar.example
pillars:
top.sls:
base:
"*":
- logrotate
state_top:
base:
'*':
- logrotate
- logrotate.jobs
verifier:
name: inspec
reporter:
- cli
inspec_tests:
- path: test/integration/default
suites:
- name: default

View file

@ -1,77 +0,0 @@
# -*- coding: utf-8 -*-
# vim: ft=yaml
---
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
ci:
autofix_commit_msg: |
ci(pre-commit.ci): apply auto fixes from pre-commit.com hooks
For more information, see https://pre-commit.ci
autofix_prs: true
autoupdate_branch: ''
autoupdate_commit_msg: |
ci(pre-commit.ci): perform `pre-commit` autoupdate
autoupdate_schedule: quarterly
skip: []
submodules: false
default_stages: [commit]
repos:
- repo: https://github.com/dafyddj/commitlint-pre-commit-hook
rev: v2.3.0
hooks:
- id: commitlint
name: Check commit message using commitlint
description: Lint commit message against @commitlint/config-conventional rules
stages: [commit-msg]
additional_dependencies: ['@commitlint/config-conventional@8.3.4']
- id: commitlint-travis
stages: [manual]
additional_dependencies: ['@commitlint/config-conventional@8.3.4']
always_run: true
- repo: https://github.com/rubocop-hq/rubocop
rev: v1.30.1
hooks:
- id: rubocop
name: Check Ruby files with rubocop
args: [--debug]
always_run: true
pass_filenames: false
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.8.0.4
hooks:
- id: shellcheck
name: Check shell scripts with shellcheck
files: ^.*\.(sh|bash|ksh)$
types: []
- repo: https://github.com/adrienverge/yamllint
rev: v1.26.3
hooks:
- id: yamllint
name: Check YAML syntax with yamllint
args: [--strict, '.']
always_run: true
pass_filenames: false
- repo: https://github.com/warpnet/salt-lint
rev: v0.8.0
hooks:
- id: salt-lint
name: Check Salt files using salt-lint
files: ^.*\.(sls|jinja|j2|tmpl|tst)$
- repo: https://github.com/myint/rstcheck
rev: 3f929574
hooks:
- id: rstcheck
name: Check reST files using rstcheck
exclude: 'docs/CHANGELOG.rst'
- repo: https://github.com/saltstack-formulas/mirrors-rst-lint
rev: v1.3.2
hooks:
- id: rst-lint
name: Check reST files using rst-lint
exclude: |
(?x)^(
docs/CHANGELOG.rst|
docs/TOFS_pattern.rst|
)$
additional_dependencies: [pygments==2.9.0]

View file

@ -1,4 +0,0 @@
[rstcheck]
report=info
ignore_language=rst
ignore_messages=(Duplicate (ex|im)plicit target.*|Hyperlink target ".*" is not referenced\.$)

View file

@ -1,23 +0,0 @@
# -*- 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:
IgnoredMethods:
- control
- describe
# Increase from default of `25`
Max: 30
Security/YAMLLoad:
Exclude:
- test/integration/**/_mapdata.rb
# General settings across all cops in this formula
AllCops:
NewCops: enable
# Any offenses that should be fixed, e.g. collected via. `rubocop --auto-gen-config`

View file

@ -1,14 +0,0 @@
# -*- 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

View file

@ -1,186 +1,20 @@
# -*- coding: utf-8 -*-
# vim: ft=yaml
---
################################################################################
# NOTE: This file is UNMAINTAINED; it is provided for references purposes only.
# No guarantees are tendered that this structure will work after 2020.
################################################################################
# * https://en.wikipedia.org/wiki/Travis_CI:
# - "... free open-source plans were removed in [sic] the end of 2020"
# - https://blog.travis-ci.com/2020-11-02-travis-ci-new-billing
# - https://ropensci.org/technotes/2020/11/19/moving-away-travis/
################################################################################
## Machine config
os: 'linux'
arch: 'amd64'
dist: 'bionic'
version: '~> 1.0'
sudo: required
cache: bundler
language: ruby
## Language and cache config
language: 'ruby'
cache: 'bundler'
## Services config
services:
- docker
## Script to run for the test stage
before_install:
- bundle install
env:
matrix:
- INSTANCE: default-debian-9
- INSTANCE: default-ubuntu-1804
- INSTANCE: default-fedora-27
- INSTANCE: default-centos-7
script:
- bin/kitchen verify "${INSTANCE}"
- bundle exec kitchen verify ${INSTANCE}
## Stages and jobs matrix
stages:
- test
# # As part of the switch away from Travis CI, ensure that the `release` stage
# # is not run inadvertently
# - 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
# Run `pre-commit` linters in a single job
- language: 'python'
env: 'Lint_pre-commit'
name: 'Lint: pre-commit'
before_install: 'skip'
cache:
directories:
- $HOME/.cache/pre-commit
script:
# Install and run `pre-commit`
- pip install pre-commit==2.7.1
- pre-commit run --all-files --color always --verbose
- pre-commit run --color always --hook-stage manual --verbose 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`
# - env: INSTANCE=default-debian-11-tiamat-py3
# - env: INSTANCE=default-debian-10-tiamat-py3
# - env: INSTANCE=default-debian-9-tiamat-py3
# - env: INSTANCE=default-ubuntu-2204-tiamat-py3
# - env: INSTANCE=default-ubuntu-2004-tiamat-py3
# - env: INSTANCE=default-ubuntu-1804-tiamat-py3
# - env: INSTANCE=default-centos-stream8-tiamat-py3
# - env: INSTANCE=default-centos-7-tiamat-py3
# - env: INSTANCE=default-amazonlinux-2-tiamat-py3
# - env: INSTANCE=default-oraclelinux-8-tiamat-py3
# - env: INSTANCE=default-oraclelinux-7-tiamat-py3
# - env: INSTANCE=default-almalinux-8-tiamat-py3
# - env: INSTANCE=default-rockylinux-8-tiamat-py3
- env: INSTANCE=default-debian-11-master-py3
- env: INSTANCE=default-debian-10-master-py3
- env: INSTANCE=default-debian-9-master-py3
- env: INSTANCE=default-ubuntu-2204-master-py3
- env: INSTANCE=default-ubuntu-2004-master-py3
- env: INSTANCE=default-ubuntu-1804-master-py3
- env: INSTANCE=default-centos-stream8-master-py3
- env: INSTANCE=default-centos-7-master-py3
- env: INSTANCE=default-fedora-36-master-py3
- env: INSTANCE=default-fedora-35-master-py3
- env: INSTANCE=default-opensuse-leap-153-master-py3
- env: INSTANCE=default-opensuse-tmbl-latest-master-py3
- env: INSTANCE=default-amazonlinux-2-master-py3
- env: INSTANCE=default-oraclelinux-8-master-py3
- env: INSTANCE=default-oraclelinux-7-master-py3
- env: INSTANCE=default-arch-base-latest-master-py3
- env: INSTANCE=default-gentoo-stage3-latest-master-py3
- env: INSTANCE=default-gentoo-stage3-systemd-master-py3
- env: INSTANCE=default-almalinux-8-master-py3
- env: INSTANCE=default-rockylinux-8-master-py3
# - env: INSTANCE=default-debian-11-3004-1-py3
# - env: INSTANCE=default-debian-10-3004-1-py3
# - env: INSTANCE=default-debian-9-3004-1-py3
# - env: INSTANCE=default-ubuntu-2204-3004-1-py3
# - env: INSTANCE=default-ubuntu-2004-3004-1-py3
# - env: INSTANCE=default-ubuntu-1804-3004-1-py3
# - env: INSTANCE=default-centos-stream8-3004-1-py3
# - env: INSTANCE=default-centos-7-3004-1-py3
# - env: INSTANCE=default-fedora-36-3004-1-py3
# - env: INSTANCE=default-fedora-35-3004-1-py3
# - env: INSTANCE=default-amazonlinux-2-3004-1-py3
# - env: INSTANCE=default-oraclelinux-8-3004-1-py3
# - env: INSTANCE=default-oraclelinux-7-3004-1-py3
# - env: INSTANCE=default-arch-base-latest-3004-1-py3
# - env: INSTANCE=default-gentoo-stage3-latest-3004-1-py3
# - env: INSTANCE=default-gentoo-stage3-systemd-3004-1-py3
# - env: INSTANCE=default-almalinux-8-3004-1-py3
# - env: INSTANCE=default-rockylinux-8-3004-1-py3
# - env: INSTANCE=default-opensuse-leap-153-3004-0-py3
# - env: INSTANCE=default-opensuse-tmbl-latest-3004-0-py3
# - env: INSTANCE=default-debian-10-3003-4-py3
# - env: INSTANCE=default-debian-9-3003-4-py3
# - env: INSTANCE=default-ubuntu-2004-3003-4-py3
# - env: INSTANCE=default-ubuntu-1804-3003-4-py3
# - env: INSTANCE=default-centos-stream8-3003-4-py3
# - env: INSTANCE=default-centos-7-3003-4-py3
# - env: INSTANCE=default-amazonlinux-2-3003-4-py3
# - env: INSTANCE=default-oraclelinux-8-3003-4-py3
# - env: INSTANCE=default-oraclelinux-7-3003-4-py3
# - env: INSTANCE=default-almalinux-8-3003-4-py3
## Define the release stage that runs `semantic-release`
- stage: 'release'
language: 'node_js'
node_js: 'lts/*'
env: 'Release'
name: 'Run semantic-release inc. file updates to AUTHORS, CHANGELOG & FORMULA'
before_install: 'skip'
script:
# Update `AUTHORS.md`
- export MAINTAINER_TOKEN=${GH_TOKEN}
- 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'
# Notification options: `always`, `never` or `change`
notifications:
webhooks:
if: 'repo = saltstack-formulas/logrotate-formula'
urls:
- https://saltstack-formulas.zulipchat.com/api/v1/external/travis?api_key=HsIq3o5QmLxdnVCKF9is0FUIpkpAY79P&stream=CI&topic=saltstack-formulas%2Flogrotate-formula&ignore_pull_requests=true
on_success: always # default: always
on_failure: always # default: always
on_start: always # default: never
on_cancel: always # default: always
on_error: always # default: always

View file

@ -1,44 +0,0 @@
# -*- 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 `.bundle/`, introduced if gems are installed locally
# 2. All YAML files under directory `.cache/`, introduced during the CI run
# 3. All YAML files under directory `.git/`
# 4. All YAML files under directory `node_modules/`, introduced during the CI run
# 5. Any SLS files under directory `test/`, which are actually state files
# 6. Any YAML files under directory `.kitchen/`, introduced during local testing
# 7. `kitchen.vagrant.yml`, which contains Embedded Ruby (ERB) template syntax
ignore: |
.bundle/
.cache/
.git/
node_modules/
test/**/states/**/*.sls
.kitchen/
kitchen.vagrant.yml
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

View file

@ -1,36 +0,0 @@
# 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://avatars.githubusercontent.com/u/10231489?v=4' width='36' height='36' alt='@myii'>|[@myii](https://github.com/myii)|150
<img class='float-left rounded-1' src='https://avatars.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://avatars.githubusercontent.com/u/242396?v=4' width='36' height='36' alt='@javierbertoli'>|[@javierbertoli](https://github.com/javierbertoli)|11
<img class='float-left rounded-1' src='https://avatars.githubusercontent.com/u/52996?v=4' width='36' height='36' alt='@daks'>|[@daks](https://github.com/daks)|11
<img class='float-left rounded-1' src='https://avatars.githubusercontent.com/u/745513?v=4' width='36' height='36' alt='@EvaSDK'>|[@EvaSDK](https://github.com/EvaSDK)|8
<img class='float-left rounded-1' src='https://avatars.githubusercontent.com/u/3374962?v=4' width='36' height='36' alt='@nmadhok'>|[@nmadhok](https://github.com/nmadhok)|8
<img class='float-left rounded-1' src='https://avatars.githubusercontent.com/u/3700416?v=4' width='36' height='36' alt='@fessoga5'>|[@fessoga5](https://github.com/fessoga5)|5
<img class='float-left rounded-1' src='https://avatars.githubusercontent.com/u/714914?v=4' width='36' height='36' alt='@waynegemmell'>|[@waynegemmell](https://github.com/waynegemmell)|5
<img class='float-left rounded-1' src='https://avatars.githubusercontent.com/u/117961?v=4' width='36' height='36' alt='@wwentland'>|[@wwentland](https://github.com/wwentland)|4
<img class='float-left rounded-1' src='https://avatars.githubusercontent.com/u/4195158?v=4' width='36' height='36' alt='@dafyddj'>|[@dafyddj](https://github.com/dafyddj)|3
<img class='float-left rounded-1' src='https://avatars.githubusercontent.com/u/762280?v=4' width='36' height='36' alt='@asenci'>|[@asenci](https://github.com/asenci)|2
<img class='float-left rounded-1' src='https://avatars.githubusercontent.com/u/2984201?v=4' width='36' height='36' alt='@egarbi'>|[@egarbi](https://github.com/egarbi)|2
<img class='float-left rounded-1' src='https://avatars.githubusercontent.com/u/83996323?v=4' width='36' height='36' alt='@mdschmitt'>|[@mdschmitt](https://github.com/mdschmitt)|2
<img class='float-left rounded-1' src='https://avatars.githubusercontent.com/u/3433835?v=4' width='36' height='36' alt='@n-rodriguez'>|[@n-rodriguez](https://github.com/n-rodriguez)|2
<img class='float-left rounded-1' src='https://avatars.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://avatars.githubusercontent.com/u/228723?v=4' width='36' height='36' alt='@abednarik'>|[@abednarik](https://github.com/abednarik)|1
<img class='float-left rounded-1' src='https://avatars.githubusercontent.com/u/470626?v=4' width='36' height='36' alt='@Bilge'>|[@Bilge](https://github.com/Bilge)|1
<img class='float-left rounded-1' src='https://avatars.githubusercontent.com/u/1233212?v=4' width='36' height='36' alt='@baby-gnu'>|[@baby-gnu](https://github.com/baby-gnu)|1
<img class='float-left rounded-1' src='https://avatars.githubusercontent.com/u/732321?v=4' width='36' height='36' alt='@gtmanfred'>|[@gtmanfred](https://github.com/gtmanfred)|1
<img class='float-left rounded-1' src='https://avatars.githubusercontent.com/u/378158?v=4' width='36' height='36' alt='@dseira'>|[@dseira](https://github.com/dseira)|1
<img class='float-left rounded-1' src='https://avatars.githubusercontent.com/u/1396878?v=4' width='36' height='36' alt='@gravyboat'>|[@gravyboat](https://github.com/gravyboat)|1
<img class='float-left rounded-1' src='https://avatars.githubusercontent.com/u/6086064?v=4' width='36' height='36' alt='@mgomersbach'>|[@mgomersbach](https://github.com/mgomersbach)|1
<img class='float-left rounded-1' src='https://avatars.githubusercontent.com/u/20769322?v=4' width='36' height='36' alt='@mlg-lebo'>|[@mlg-lebo](https://github.com/mlg-lebo)|1
<img class='float-left rounded-1' src='https://avatars.githubusercontent.com/u/8266370?v=4' width='36' height='36' alt='@edwin--zhao'>|[@edwin--zhao](https://github.com/edwin--zhao)|1
<img class='float-left rounded-1' src='https://avatars.githubusercontent.com/u/111994776?v=4' width='36' height='36' alt='@mdubois83'>|[@mdubois83](https://github.com/mdubois83)|1
<img class='float-left rounded-1' src='https://avatars.githubusercontent.com/u/13322818?v=4' width='36' height='36' alt='@noelmcloughlin'>|[@noelmcloughlin](https://github.com/noelmcloughlin)|1
---
Auto-generated by a [forked version](https://github.com/myii/maintainer) of [gaocegege/maintainer](https://github.com/gaocegege/maintainer) on 2022-08-29.

View file

@ -1,225 +0,0 @@
# Changelog
# [0.14.0](https://github.com/saltstack-formulas/logrotate-formula/compare/v0.13.2...v0.14.0) (2022-08-29)
### Continuous Integration
* update `pre-commit` configuration inc. for pre-commit.ci [skip ci] ([df61825](https://github.com/saltstack-formulas/logrotate-formula/commit/df618259eb5b6111138638bef00b07d9383e9570))
* **kitchen+gitlab:** update for new pre-salted images [skip ci] ([af19654](https://github.com/saltstack-formulas/logrotate-formula/commit/af196541ad64be2e85c9eb8204f8ce08fcd321dd))
### Features
* **osfingermap:** add Debian-11 entry to osfingermap.yaml ([756769a](https://github.com/saltstack-formulas/logrotate-formula/commit/756769aeca802cd8586f780b4b0eaeaa22a07fed))
### Tests
* **system.rb:** add support for `mac_os_x` [skip ci] ([e8d4e7e](https://github.com/saltstack-formulas/logrotate-formula/commit/e8d4e7eb9e54e6cd510461afc76ed82522346891))
## [0.13.2](https://github.com/saltstack-formulas/logrotate-formula/compare/v0.13.1...v0.13.2) (2022-03-28)
### Bug Fixes
* **conf:** add 'monthly' interval ([b6cc8a9](https://github.com/saltstack-formulas/logrotate-formula/commit/b6cc8a908482997ecd84ac6bbce0607bd759df47))
### Tests
* **jobs:** add a monthly job test ([957e689](https://github.com/saltstack-formulas/logrotate-formula/commit/957e6897c052840a16bdd281b3e96132c4f37c01))
* **jobs:** reorder parameters to match pillar ([3bdc11b](https://github.com/saltstack-formulas/logrotate-formula/commit/3bdc11b5c2b2f2b60d8dfe7b3a493fce532b0c6e))
## [0.13.1](https://github.com/saltstack-formulas/logrotate-formula/compare/v0.13.0...v0.13.1) (2022-02-22)
### Bug Fixes
* **ubuntu:** removed breaking wtmp btmp ([012bfef](https://github.com/saltstack-formulas/logrotate-formula/commit/012bfef7d7733300059375edaf9b93aca343cd4d))
### Continuous Integration
* update linters to latest versions [skip ci] ([eb6d2ea](https://github.com/saltstack-formulas/logrotate-formula/commit/eb6d2ea9be3f8203e5e48c3c579614f6761b4e8d))
* **gemfile:** allow rubygems proxy to be provided as an env var [skip ci] ([d545fb2](https://github.com/saltstack-formulas/logrotate-formula/commit/d545fb2278b0b1c702f39d59228d0a74406aa3d2))
* **kitchen+gitlab:** update for new pre-salted images [skip ci] ([d71215b](https://github.com/saltstack-formulas/logrotate-formula/commit/d71215bd8174decbec56fa9a5b098564ab7b3584))
### Tests
* **system:** add `build_platform_codename` [skip ci] ([4722110](https://github.com/saltstack-formulas/logrotate-formula/commit/4722110f28e5a286f23292084026cd3c521bb38f))
# [0.13.0](https://github.com/saltstack-formulas/logrotate-formula/compare/v0.12.0...v0.13.0) (2022-01-14)
### Continuous Integration
* **gemfile+lock:** use `ssf` customised `inspec` repo [skip ci] ([27829b8](https://github.com/saltstack-formulas/logrotate-formula/commit/27829b8969162dcf2deb27b4135ac1dec651348d))
* **kitchen:** move `provisioner` block & update `run_command` [skip ci] ([42bde9c](https://github.com/saltstack-formulas/logrotate-formula/commit/42bde9c5f53bc9c897b9fa6ccb0fd50c251b2fe8))
* **kitchen:** use `cron-formula` dependency instead of `cron` state ([4cf2808](https://github.com/saltstack-formulas/logrotate-formula/commit/4cf2808840cc8701347b81018ad41603c534cc0b))
* **kitchen+ci:** update with `3004` pre-salted images/boxes [skip ci] ([bacce6e](https://github.com/saltstack-formulas/logrotate-formula/commit/bacce6ea8935bfafb56b16aaa217b5b03a8b9168))
* **kitchen+ci:** update with latest `3003.2` pre-salted images [skip ci] ([e6ee323](https://github.com/saltstack-formulas/logrotate-formula/commit/e6ee323f87819acce9b54f36fb8cfa9ca55c6241))
* **kitchen+ci:** update with latest CVE pre-salted images [skip ci] ([a1dd441](https://github.com/saltstack-formulas/logrotate-formula/commit/a1dd4415e54651bb021a068fe0cd8cd0e883a827))
* add Debian 11 Bullseye & update `yamllint` configuration [skip ci] ([0e63e18](https://github.com/saltstack-formulas/logrotate-formula/commit/0e63e188eff36282a5c5a3525afb3c7a6cfc7676))
### Features
* **hourly:** add configuration to enable hourly jobs ([7b5676b](https://github.com/saltstack-formulas/logrotate-formula/commit/7b5676b9e267fb9bc7b610040a113fa870ee3d23))
* **hourly:** add hourly job def to pillar.example ([cd4cd1d](https://github.com/saltstack-formulas/logrotate-formula/commit/cd4cd1d670b1a83b6a58dcaa96bd0db6ce380a2e))
### Tests
* **alma+rocky:** add platforms (finalise dc63042) [skip ci] ([e4ad016](https://github.com/saltstack-formulas/logrotate-formula/commit/e4ad016b97293e8e4d74864c6afbfdeb308b38bf))
* **base:** re-enable Arch Linux test (possible due to `cron-formula`) ([2136711](https://github.com/saltstack-formulas/logrotate-formula/commit/2136711a12ba4e1989afa160808d5a2851f25793))
* **jobs:** add `hourly` test ([69677b0](https://github.com/saltstack-formulas/logrotate-formula/commit/69677b0c02623d4c4c7954e39c7225864abf9d87))
# [0.12.0](https://github.com/saltstack-formulas/logrotate-formula/compare/v0.11.5...v0.12.0) (2021-07-07)
### Continuous Integration
* **3003.1:** update inc. AlmaLinux, Rocky & `rst-lint` [skip ci] ([bb6bfac](https://github.com/saltstack-formulas/logrotate-formula/commit/bb6bfac80eade092222776d63040248ddd6bce6e))
* **commitlint:** ensure `upstream/master` uses main repo URL [skip ci] ([ac5a57c](https://github.com/saltstack-formulas/logrotate-formula/commit/ac5a57c76d171492bb87be9476514e26d32016d2))
* **gemfile+lock:** use `ssf` customised `kitchen-docker` repo [skip ci] ([7368305](https://github.com/saltstack-formulas/logrotate-formula/commit/7368305919c2ac67e94e5c1f017e909957733659))
* **kitchen+gitlab:** remove Ubuntu 16.04 & Fedora 32 (EOL) [skip ci] ([1f55b57](https://github.com/saltstack-formulas/logrotate-formula/commit/1f55b57a61278f96926566aa48c25026e5740e24))
* add `arch-master` to matrix and update `.travis.yml` [skip ci] ([84b2f6a](https://github.com/saltstack-formulas/logrotate-formula/commit/84b2f6aa991da969a28c455e6b7f8b4ed69d8ce9))
* **gitlab-ci:** add `rubocop` linter (with `allow_failure`) [skip ci] ([1fc52cd](https://github.com/saltstack-formulas/logrotate-formula/commit/1fc52cd2339c8ecef93de9fca4b9edcfd16464c3))
* **gitlab-ci:** use GitLab CI as Travis CI replacement ([94c2cf7](https://github.com/saltstack-formulas/logrotate-formula/commit/94c2cf7d2cc49802fda5baee93efcc1509227ffe))
* **kitchen+ci:** use latest pre-salted images (after CVE) [skip ci] ([406dbbb](https://github.com/saltstack-formulas/logrotate-formula/commit/406dbbb4e594bc9ff14267f39d3acaca77510860))
* **kitchen+gitlab:** adjust matrix to add `3003` [skip ci] ([b198955](https://github.com/saltstack-formulas/logrotate-formula/commit/b198955b5f324323c51dbdac13ea5825f424656f))
* **kitchen+gitlab-ci:** use latest pre-salted images [skip ci] ([ea66a0d](https://github.com/saltstack-formulas/logrotate-formula/commit/ea66a0d2b85635dc66088caac94614191a772a9d))
* **pre-commit:** add to formula [skip ci] ([e506d69](https://github.com/saltstack-formulas/logrotate-formula/commit/e506d6954ddba83146afc98e9338e68a8ffbfcb6))
* **pre-commit:** enable/disable `rstcheck` as relevant [skip ci] ([267bb94](https://github.com/saltstack-formulas/logrotate-formula/commit/267bb944a4b889234b438b46bf03e7b8d13482b4))
* **pre-commit:** finalise `rstcheck` configuration [skip ci] ([bd1dc81](https://github.com/saltstack-formulas/logrotate-formula/commit/bd1dc81dcbf7f031cb58ce74cb43443194a24b1d))
* **pre-commit:** update hook for `rubocop` [skip ci] ([2c964b0](https://github.com/saltstack-formulas/logrotate-formula/commit/2c964b09e4b3450356e5bc1bac7a880fc2cbed18))
### Features
* **jobs:** add `jobs: {}` to defaults and state to init ([c3b64d3](https://github.com/saltstack-formulas/logrotate-formula/commit/c3b64d37a7c06d143df3a474d9129cb860fe17c7)), closes [#57](https://github.com/saltstack-formulas/logrotate-formula/issues/57)
### Tests
* **alma+rocky:** add platforms (based on CentOS 8) [skip ci] ([dc63042](https://github.com/saltstack-formulas/logrotate-formula/commit/dc630420a5715f26276707adf00866ef882d4cb4))
* standardise use of `share` suite & `_mapdata` state [skip ci] ([650cfad](https://github.com/saltstack-formulas/logrotate-formula/commit/650cfaddf026badfb926bb39643021d9d4918880))
* **base:** update from `template-formula` and Arch Linux exclusion ([09d4f5a](https://github.com/saltstack-formulas/logrotate-formula/commit/09d4f5a0341f1f4c5644742631c749f1cb78409d))
* **rubocop:** fix violation [skip ci] ([3f5edef](https://github.com/saltstack-formulas/logrotate-formula/commit/3f5edefc18b606fbb205de22d0286393714750e6))
## [0.11.5](https://github.com/saltstack-formulas/logrotate-formula/compare/v0.11.4...v0.11.5) (2020-06-29)
### Bug Fixes
* **debian-10:** disable login_records, they're managed by the package ([335c9e6](https://github.com/saltstack-formulas/logrotate-formula/commit/335c9e63087a4d6b93d1283547cc4094bcf5d581))
### Continuous Integration
* **kitchen:** use `saltimages` Docker Hub where available [skip ci] ([8f32221](https://github.com/saltstack-formulas/logrotate-formula/commit/8f32221ba450b14db5227f4a579cdcfd1876a67d))
* **kitchen+travis:** use latest pre-salted images [skip ci] ([e18246d](https://github.com/saltstack-formulas/logrotate-formula/commit/e18246d89bc83097ae1ee1ab887b884b7a2ad84d))
* **travis:** add notifications => zulip [skip ci] ([d1c1a81](https://github.com/saltstack-formulas/logrotate-formula/commit/d1c1a81aa2a6ff62796dfa04aba6e093a2129a5e))
## [0.11.4](https://github.com/saltstack-formulas/logrotate-formula/compare/v0.11.3...v0.11.4) (2020-05-07)
### Bug Fixes
* make necessary modifications to get working on `salt-ssh` ([57c88a8](https://github.com/saltstack-formulas/logrotate-formula/commit/57c88a81403726431377acf3e87fec6abae34b1f)), closes [/freenode.logbot.info/saltstack-formulas/20200506#c3811885-c3812572](https://github.com//freenode.logbot.info/saltstack-formulas/20200506/issues/c3811885-c3812572)
### Continuous Integration
* **gemfile.lock:** add to repo with updated `Gemfile` [skip ci] ([a5cf505](https://github.com/saltstack-formulas/logrotate-formula/commit/a5cf505cc018180361a6f2c9d9c21b4595f2632a))
* **kitchen+travis:** remove `master-py2-arch-base-latest` [skip ci] ([bf6f940](https://github.com/saltstack-formulas/logrotate-formula/commit/bf6f9406daad33586aef93a864564206642ffeac))
* **workflows/commitlint:** add to repo [skip ci] ([4c2a90b](https://github.com/saltstack-formulas/logrotate-formula/commit/4c2a90bccd53a6079aac13cacafc396ad28660c3))
## [0.11.3](https://github.com/saltstack-formulas/logrotate-formula/compare/v0.11.2...v0.11.3) (2020-03-22)
### Bug Fixes
* **release.config.js:** use full commit hash in commit link [skip ci] ([c79d42e](https://github.com/saltstack-formulas/logrotate-formula/commit/c79d42e0e0d9ef87aa697969ee5027a16d143595))
### Continuous Integration
* **gemfile:** restrict `train` gem version until upstream fix [skip ci] ([e6a2d52](https://github.com/saltstack-formulas/logrotate-formula/commit/e6a2d52a4c6b448e136618cbf493a360ed18a6c7))
* **kitchen:** avoid using bootstrap for `master` instances [skip ci] ([6200869](https://github.com/saltstack-formulas/logrotate-formula/commit/6200869f7a04a4b2f69d763744e65047f879f2dd))
* **kitchen:** ensure `cron` installed on `Debian` ([4401a20](https://github.com/saltstack-formulas/logrotate-formula/commit/4401a206710af159c04c95ea31d2a36585233c46))
* **kitchen:** use `debian-10-master-py3` instead of `develop` [skip ci] ([7ba188f](https://github.com/saltstack-formulas/logrotate-formula/commit/7ba188f535502e641a0a429a65fa0e0f788ef7b9))
* **kitchen:** use `develop` image until `master` is ready (`amazonlinux`) [skip ci] ([c4a1fa9](https://github.com/saltstack-formulas/logrotate-formula/commit/c4a1fa9f6ffc6ef5b8b93d0d71719184294b3217))
* **kitchen+travis:** upgrade matrix after `2019.2.2` release [skip ci] ([74ab7a1](https://github.com/saltstack-formulas/logrotate-formula/commit/74ab7a144d73c9159e078a8711edfe1df2dc191e))
* **travis:** apply changes from build config validation [skip ci] ([4e65a71](https://github.com/saltstack-formulas/logrotate-formula/commit/4e65a7197b637e9f243a01be52f9b67e148c708e))
* **travis:** opt-in to `dpl v2` to complete build config validation [skip ci] ([05f9738](https://github.com/saltstack-formulas/logrotate-formula/commit/05f973872e814545dadb991eedbd93333330db48))
* **travis:** quote pathspecs used with `git ls-files` [skip ci] ([b7ff28d](https://github.com/saltstack-formulas/logrotate-formula/commit/b7ff28d630908a0962b50a4934bec42fd062b304))
* **travis:** run `shellcheck` during lint job [skip ci] ([b60e2ab](https://github.com/saltstack-formulas/logrotate-formula/commit/b60e2abf734bbd6ea0c11559fc6f965b28a9ced9))
* **travis:** update `salt-lint` config for `v0.0.10` [skip ci] ([a75723c](https://github.com/saltstack-formulas/logrotate-formula/commit/a75723cbe59b1a4c55c809bde580f6b302447d76))
* **travis:** use `major.minor` for `semantic-release` version [skip ci] ([d08d9bf](https://github.com/saltstack-formulas/logrotate-formula/commit/d08d9bfa06300073e768d7a7b1471af3cc89a203))
* **travis:** use build config validation (beta) [skip ci] ([ef455ff](https://github.com/saltstack-formulas/logrotate-formula/commit/ef455fffae2dce9c11fdfaa877fb0003a402890d))
### Documentation
* **contributing:** remove to use org-level file instead [skip ci] ([01493e9](https://github.com/saltstack-formulas/logrotate-formula/commit/01493e95a947306bd0c2c43c5f076c18cb60843b))
* **readme:** update link to `CONTRIBUTING` [skip ci] ([d2ee252](https://github.com/saltstack-formulas/logrotate-formula/commit/d2ee2524cdc8ae37e44ea2d002ebf7b0de6ff466))
### Performance Improvements
* **travis:** improve `salt-lint` invocation [skip ci] ([ebd94f0](https://github.com/saltstack-formulas/logrotate-formula/commit/ebd94f078e2418ebd9f738150da223e4bef9b807))
## [0.11.2](https://github.com/saltstack-formulas/logrotate-formula/compare/v0.11.1...v0.11.2) (2019-10-11)
### Bug Fixes
* **rubocop:** add fixes using `rubocop --safe-auto-correct` ([](https://github.com/saltstack-formulas/logrotate-formula/commit/de80802))
* **rubocop:** fix remaining errors manually ([](https://github.com/saltstack-formulas/logrotate-formula/commit/401493b))
### Continuous Integration
* **kitchen:** change `log_level` to `debug` instead of `info` ([](https://github.com/saltstack-formulas/logrotate-formula/commit/e98975f))
* **kitchen:** install required packages to bootstrapped `opensuse` [skip ci] ([](https://github.com/saltstack-formulas/logrotate-formula/commit/4e76aa3))
* **kitchen:** use bootstrapped `opensuse` images until `2019.2.2` [skip ci] ([](https://github.com/saltstack-formulas/logrotate-formula/commit/26582d7))
* **platform:** add `arch-base-latest` (commented out for now) [skip ci] ([](https://github.com/saltstack-formulas/logrotate-formula/commit/7e0f2b4))
* merge travis matrix, add `salt-lint` & `rubocop` to `lint` job ([](https://github.com/saltstack-formulas/logrotate-formula/commit/a66f4fe))
* merge travis matrix, add `salt-lint` & `rubocop` to `lint` job ([](https://github.com/saltstack-formulas/logrotate-formula/commit/f31e348))
* use `dist: bionic` & apply `opensuse-leap-15` SCP error workaround ([](https://github.com/saltstack-formulas/logrotate-formula/commit/b836a66))
* **travis:** merge `rubocop` linter into main `lint` job ([](https://github.com/saltstack-formulas/logrotate-formula/commit/b8d7987))
* **yamllint:** add rule `empty-values` & use new `yaml-files` setting ([](https://github.com/saltstack-formulas/logrotate-formula/commit/7544833))
## [0.11.1](https://github.com/saltstack-formulas/logrotate-formula/compare/v0.11.0...v0.11.1) (2019-09-01)
### Continuous Integration
* **kitchen+travis:** replace EOL pre-salted images ([cc3fa62](https://github.com/saltstack-formulas/logrotate-formula/commit/cc3fa62))
### Tests
* **inspec:** improve to work on `amazon` as well ([be09e0d](https://github.com/saltstack-formulas/logrotate-formula/commit/be09e0d))
# [0.11.0](https://github.com/saltstack-formulas/logrotate-formula/compare/v0.10.0...v0.11.0) (2019-08-10)
### Features
* **yamllint:** include for this repo and apply rules throughout ([86aed1e](https://github.com/saltstack-formulas/logrotate-formula/commit/86aed1e))
# [0.10.0](https://github.com/saltstack-formulas/logrotate-formula/compare/v0.9.0...v0.10.0) (2019-06-25)
### Bug Fixes
* **test:** on suse using and additional kitchen state ([21a1866](https://github.com/saltstack-formulas/logrotate-formula/commit/21a1866))
### Features
* implement semantic release ([ef086b2](https://github.com/saltstack-formulas/logrotate-formula/commit/ef086b2))

View file

@ -1,54 +0,0 @@
# https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners
# SECTION: Owner(s) for everything in the repo, unless a later match takes precedence
# **************************************************************************
# *** NO GLOBAL OWNER(S) SPECIFIED ***
# *** Ideally this will be defined for a healthy, well-maintained repo ***
# **************************************************************************
# FILE PATTERN OWNER(S)
* @NONE
# SECTION: Owner(s) for specific directories
# FILE PATTERN OWNER(S)
# SECTION: Owner(s) for files/directories related to `semantic-release`
# FILE PATTERN OWNER(S)
/.github/workflows/ @saltstack-formulas/ssf
/bin/install-hooks @saltstack-formulas/ssf
/bin/kitchen @saltstack-formulas/ssf
/docs/AUTHORS.rst @saltstack-formulas/ssf
/docs/CHANGELOG.rst @saltstack-formulas/ssf
/docs/TOFS_pattern.rst @saltstack-formulas/ssf
/*/_mapdata/ @saltstack-formulas/ssf
/*/libsaltcli.jinja @saltstack-formulas/ssf
/*/libtofs.jinja @saltstack-formulas/ssf
/test/integration/**/_mapdata.rb @saltstack-formulas/ssf
/test/integration/**/libraries/system.rb @saltstack-formulas/ssf
/test/integration/**/inspec.yml @saltstack-formulas/ssf
/test/integration/**/README.md @saltstack-formulas/ssf
/test/salt/pillar/top.sls @saltstack-formulas/ssf
/.gitignore @saltstack-formulas/ssf
/.cirrus.yml @saltstack-formulas/ssf
/.gitlab-ci.yml @saltstack-formulas/ssf
/.pre-commit-config.yaml @saltstack-formulas/ssf
/.rstcheck.cfg @saltstack-formulas/ssf
/.rubocop.yml @saltstack-formulas/ssf
/.salt-lint @saltstack-formulas/ssf
/.travis.yml @saltstack-formulas/ssf
/.yamllint @saltstack-formulas/ssf
/AUTHORS.md @saltstack-formulas/ssf
/CHANGELOG.md @saltstack-formulas/ssf
/CODEOWNERS @saltstack-formulas/ssf
/commitlint.config.js @saltstack-formulas/ssf
/FORMULA @saltstack-formulas/ssf
/Gemfile @saltstack-formulas/ssf
/Gemfile.lock @saltstack-formulas/ssf
/kitchen.yml @saltstack-formulas/ssf
/kitchen.vagrant.yml @saltstack-formulas/ssf
/kitchen.windows.yml @saltstack-formulas/ssf
/pre-commit_semantic-release.sh @saltstack-formulas/ssf
/release-rules.js @saltstack-formulas/ssf
/release.config.js @saltstack-formulas/ssf
# SECTION: Owner(s) for specific files
# FILE PATTERN OWNER(S)

View file

@ -1,9 +0,0 @@
name: logrotate
os: Debian, Ubuntu, Raspbian, RedHat, Fedora, CentOS, Suse, openSUSE
os_family: Debian, RedHat, Suse
version: 0.14.0
release: 1
minimum_version: 2016.11
summary: logrotate formula
description: Formula to setup logrotate
top_level_dir: logrotate

20
Gemfile
View file

@ -1,19 +1,9 @@
# frozen_string_literal: true
source ENV.fetch('PROXY_RUBYGEMSORG', 'https://rubygems.org')
source "https://rubygems.org"
# Install the `inspec` gem using `git` because versions after `4.22.22`
# suppress diff output; this version fixes this for our uses.
# rubocop:disable Layout/LineLength
gem 'inspec', git: 'https://gitlab.com/saltstack-formulas/infrastructure/inspec', branch: 'ssf'
# rubocop:enable Layout/LineLength
gem 'test-kitchen'
gem 'kitchen-docker'
gem 'kitchen-salt'
gem 'kitchen-inspec'
# Install the `kitchen-docker` gem using `git` in order to gain a performance
# improvement: avoid package installations which are already covered by the
# `salt-image-builder` (i.e. the pre-salted images that we're using)
# rubocop:disable Layout/LineLength
gem 'kitchen-docker', git: 'https://gitlab.com/saltstack-formulas/infrastructure/kitchen-docker', branch: 'ssf'
# rubocop:enable Layout/LineLength
gem 'kitchen-inspec', '>= 2.5.0'
gem 'kitchen-salt', '>= 0.7.2'

View file

@ -1,675 +0,0 @@
GIT
remote: https://gitlab.com/saltstack-formulas/infrastructure/inspec
revision: aaef842906a5666f0fc0b4f186b4dd3498f5b28c
branch: ssf
specs:
inspec (5.18.15)
cookstyle
faraday_middleware (>= 0.12.2, < 1.1)
inspec-core (= 5.18.15)
mongo (= 2.13.2)
progress_bar (~> 1.3.3)
rake
train (~> 3.10)
train-aws (~> 0.2)
train-habitat (~> 0.1)
train-winrm (~> 0.2)
inspec-core (5.18.15)
addressable (~> 2.4)
chef-telemetry (~> 1.0, >= 1.0.8)
faraday (>= 0.9.0, < 1.5)
faraday_middleware (~> 1.0)
hashie (>= 3.4, < 5.0)
license-acceptance (>= 0.2.13, < 3.0)
method_source (>= 0.8, < 2.0)
mixlib-log (~> 3.0)
multipart-post (~> 2.0)
parallel (~> 1.9)
parslet (>= 1.5, < 2.0)
pry (~> 0.13)
rspec (>= 3.9, <= 3.11)
rspec-its (~> 1.2)
rubyzip (>= 1.2.2, < 3.0)
semverse (~> 3.0)
sslshake (~> 1.2)
thor (>= 0.20, < 2.0)
tomlrb (>= 1.2, < 2.1)
train-core (~> 3.10)
tty-prompt (~> 0.17)
tty-table (~> 0.10)
GIT
remote: https://gitlab.com/saltstack-formulas/infrastructure/kitchen-docker
revision: 9a09bc1e571e25f3ccabf4725ca2048d970fff82
branch: ssf
specs:
kitchen-docker (2.12.0)
test-kitchen (>= 1.0.0)
GEM
remote: https://rubygems.org/
specs:
activesupport (7.0.3.1)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
addressable (2.8.0)
public_suffix (>= 2.0.2, < 5.0)
ast (2.4.2)
aws-eventstream (1.2.0)
aws-partitions (1.607.0)
aws-sdk-alexaforbusiness (1.56.0)
aws-sdk-core (~> 3, >= 3.127.0)
aws-sigv4 (~> 1.1)
aws-sdk-amplify (1.32.0)
aws-sdk-core (~> 3, >= 3.120.0)
aws-sigv4 (~> 1.1)
aws-sdk-apigateway (1.78.0)
aws-sdk-core (~> 3, >= 3.127.0)
aws-sigv4 (~> 1.1)
aws-sdk-apigatewayv2 (1.42.0)
aws-sdk-core (~> 3, >= 3.127.0)
aws-sigv4 (~> 1.1)
aws-sdk-applicationautoscaling (1.51.0)
aws-sdk-core (~> 3, >= 3.112.0)
aws-sigv4 (~> 1.1)
aws-sdk-athena (1.55.0)
aws-sdk-core (~> 3, >= 3.127.0)
aws-sigv4 (~> 1.1)
aws-sdk-autoscaling (1.63.0)
aws-sdk-core (~> 3, >= 3.112.0)
aws-sigv4 (~> 1.1)
aws-sdk-batch (1.47.0)
aws-sdk-core (~> 3, >= 3.112.0)
aws-sigv4 (~> 1.1)
aws-sdk-budgets (1.50.0)
aws-sdk-core (~> 3, >= 3.127.0)
aws-sigv4 (~> 1.1)
aws-sdk-cloudformation (1.70.0)
aws-sdk-core (~> 3, >= 3.127.0)
aws-sigv4 (~> 1.1)
aws-sdk-cloudfront (1.65.0)
aws-sdk-core (~> 3, >= 3.127.0)
aws-sigv4 (~> 1.1)
aws-sdk-cloudhsm (1.39.0)
aws-sdk-core (~> 3, >= 3.127.0)
aws-sigv4 (~> 1.1)
aws-sdk-cloudhsmv2 (1.42.0)
aws-sdk-core (~> 3, >= 3.127.0)
aws-sigv4 (~> 1.1)
aws-sdk-cloudtrail (1.49.0)
aws-sdk-core (~> 3, >= 3.127.0)
aws-sigv4 (~> 1.1)
aws-sdk-cloudwatch (1.64.0)
aws-sdk-core (~> 3, >= 3.127.0)
aws-sigv4 (~> 1.1)
aws-sdk-cloudwatchevents (1.46.0)
aws-sdk-core (~> 3, >= 3.112.0)
aws-sigv4 (~> 1.1)
aws-sdk-cloudwatchlogs (1.53.0)
aws-sdk-core (~> 3, >= 3.127.0)
aws-sigv4 (~> 1.1)
aws-sdk-codecommit (1.51.0)
aws-sdk-core (~> 3, >= 3.127.0)
aws-sigv4 (~> 1.1)
aws-sdk-codedeploy (1.49.0)
aws-sdk-core (~> 3, >= 3.127.0)
aws-sigv4 (~> 1.1)
aws-sdk-codepipeline (1.53.0)
aws-sdk-core (~> 3, >= 3.127.0)
aws-sigv4 (~> 1.1)
aws-sdk-cognitoidentity (1.31.0)
aws-sdk-core (~> 3, >= 3.112.0)
aws-sigv4 (~> 1.1)
aws-sdk-cognitoidentityprovider (1.53.0)
aws-sdk-core (~> 3, >= 3.112.0)
aws-sigv4 (~> 1.1)
aws-sdk-configservice (1.79.0)
aws-sdk-core (~> 3, >= 3.127.0)
aws-sigv4 (~> 1.1)
aws-sdk-core (3.131.2)
aws-eventstream (~> 1, >= 1.0.2)
aws-partitions (~> 1, >= 1.525.0)
aws-sigv4 (~> 1.1)
jmespath (~> 1, >= 1.6.1)
aws-sdk-costandusagereportservice (1.40.0)
aws-sdk-core (~> 3, >= 3.127.0)
aws-sigv4 (~> 1.1)
aws-sdk-databasemigrationservice (1.53.0)
aws-sdk-core (~> 3, >= 3.112.0)
aws-sigv4 (~> 1.1)
aws-sdk-dynamodb (1.75.0)
aws-sdk-core (~> 3, >= 3.127.0)
aws-sigv4 (~> 1.1)
aws-sdk-ec2 (1.322.0)
aws-sdk-core (~> 3, >= 3.127.0)
aws-sigv4 (~> 1.1)
aws-sdk-ecr (1.56.0)
aws-sdk-core (~> 3, >= 3.127.0)
aws-sigv4 (~> 1.1)
aws-sdk-ecrpublic (1.12.0)
aws-sdk-core (~> 3, >= 3.127.0)
aws-sigv4 (~> 1.1)
aws-sdk-ecs (1.100.0)
aws-sdk-core (~> 3, >= 3.127.0)
aws-sigv4 (~> 1.1)
aws-sdk-efs (1.54.0)
aws-sdk-core (~> 3, >= 3.127.0)
aws-sigv4 (~> 1.1)
aws-sdk-eks (1.75.0)
aws-sdk-core (~> 3, >= 3.127.0)
aws-sigv4 (~> 1.1)
aws-sdk-elasticache (1.78.0)
aws-sdk-core (~> 3, >= 3.127.0)
aws-sigv4 (~> 1.1)
aws-sdk-elasticbeanstalk (1.51.0)
aws-sdk-core (~> 3, >= 3.127.0)
aws-sigv4 (~> 1.1)
aws-sdk-elasticloadbalancing (1.40.0)
aws-sdk-core (~> 3, >= 3.127.0)
aws-sigv4 (~> 1.1)
aws-sdk-elasticloadbalancingv2 (1.78.0)
aws-sdk-core (~> 3, >= 3.127.0)
aws-sigv4 (~> 1.1)
aws-sdk-elasticsearchservice (1.65.0)
aws-sdk-core (~> 3, >= 3.127.0)
aws-sigv4 (~> 1.1)
aws-sdk-emr (1.53.0)
aws-sdk-core (~> 3, >= 3.121.2)
aws-sigv4 (~> 1.1)
aws-sdk-eventbridge (1.24.0)
aws-sdk-core (~> 3, >= 3.112.0)
aws-sigv4 (~> 1.1)
aws-sdk-firehose (1.48.0)
aws-sdk-core (~> 3, >= 3.127.0)
aws-sigv4 (~> 1.1)
aws-sdk-glue (1.88.0)
aws-sdk-core (~> 3, >= 3.112.0)
aws-sigv4 (~> 1.1)
aws-sdk-guardduty (1.58.0)
aws-sdk-core (~> 3, >= 3.127.0)
aws-sigv4 (~> 1.1)
aws-sdk-iam (1.69.0)
aws-sdk-core (~> 3, >= 3.127.0)
aws-sigv4 (~> 1.1)
aws-sdk-kafka (1.50.0)
aws-sdk-core (~> 3, >= 3.127.0)
aws-sigv4 (~> 1.1)
aws-sdk-kinesis (1.41.0)
aws-sdk-core (~> 3, >= 3.127.0)
aws-sigv4 (~> 1.1)
aws-sdk-kms (1.57.0)
aws-sdk-core (~> 3, >= 3.127.0)
aws-sigv4 (~> 1.1)
aws-sdk-lambda (1.84.0)
aws-sdk-core (~> 3, >= 3.127.0)
aws-sigv4 (~> 1.1)
aws-sdk-mq (1.40.0)
aws-sdk-core (~> 3, >= 3.120.0)
aws-sigv4 (~> 1.1)
aws-sdk-networkfirewall (1.17.0)
aws-sdk-core (~> 3, >= 3.127.0)
aws-sigv4 (~> 1.1)
aws-sdk-networkmanager (1.24.0)
aws-sdk-core (~> 3, >= 3.127.0)
aws-sigv4 (~> 1.1)
aws-sdk-organizations (1.59.0)
aws-sdk-core (~> 3, >= 3.112.0)
aws-sigv4 (~> 1.1)
aws-sdk-ram (1.26.0)
aws-sdk-core (~> 3, >= 3.112.0)
aws-sigv4 (~> 1.1)
aws-sdk-rds (1.148.0)
aws-sdk-core (~> 3, >= 3.127.0)
aws-sigv4 (~> 1.1)
aws-sdk-redshift (1.84.0)
aws-sdk-core (~> 3, >= 3.127.0)
aws-sigv4 (~> 1.1)
aws-sdk-route53 (1.63.0)
aws-sdk-core (~> 3, >= 3.127.0)
aws-sigv4 (~> 1.1)
aws-sdk-route53domains (1.40.0)
aws-sdk-core (~> 3, >= 3.127.0)
aws-sigv4 (~> 1.1)
aws-sdk-route53resolver (1.37.0)
aws-sdk-core (~> 3, >= 3.127.0)
aws-sigv4 (~> 1.1)
aws-sdk-s3 (1.114.0)
aws-sdk-core (~> 3, >= 3.127.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.4)
aws-sdk-s3control (1.43.0)
aws-sdk-core (~> 3, >= 3.122.0)
aws-sigv4 (~> 1.1)
aws-sdk-secretsmanager (1.46.0)
aws-sdk-core (~> 3, >= 3.112.0)
aws-sigv4 (~> 1.1)
aws-sdk-securityhub (1.67.0)
aws-sdk-core (~> 3, >= 3.127.0)
aws-sigv4 (~> 1.1)
aws-sdk-servicecatalog (1.60.0)
aws-sdk-core (~> 3, >= 3.112.0)
aws-sigv4 (~> 1.1)
aws-sdk-ses (1.41.0)
aws-sdk-core (~> 3, >= 3.120.0)
aws-sigv4 (~> 1.1)
aws-sdk-shield (1.48.0)
aws-sdk-core (~> 3, >= 3.127.0)
aws-sigv4 (~> 1.1)
aws-sdk-signer (1.32.0)
aws-sdk-core (~> 3, >= 3.120.0)
aws-sigv4 (~> 1.1)
aws-sdk-simpledb (1.29.0)
aws-sdk-core (~> 3, >= 3.120.0)
aws-sigv2 (~> 1.0)
aws-sdk-sms (1.40.0)
aws-sdk-core (~> 3, >= 3.127.0)
aws-sigv4 (~> 1.1)
aws-sdk-sns (1.53.0)
aws-sdk-core (~> 3, >= 3.127.0)
aws-sigv4 (~> 1.1)
aws-sdk-sqs (1.51.1)
aws-sdk-core (~> 3, >= 3.127.0)
aws-sigv4 (~> 1.1)
aws-sdk-ssm (1.137.0)
aws-sdk-core (~> 3, >= 3.127.0)
aws-sigv4 (~> 1.1)
aws-sdk-states (1.39.0)
aws-sdk-core (~> 3, >= 3.112.0)
aws-sigv4 (~> 1.1)
aws-sdk-synthetics (1.19.0)
aws-sdk-core (~> 3, >= 3.121.2)
aws-sigv4 (~> 1.1)
aws-sdk-transfer (1.34.0)
aws-sdk-core (~> 3, >= 3.112.0)
aws-sigv4 (~> 1.1)
aws-sdk-waf (1.43.0)
aws-sdk-core (~> 3, >= 3.122.0)
aws-sigv4 (~> 1.1)
aws-sigv2 (1.1.0)
aws-sigv4 (1.5.0)
aws-eventstream (~> 1, >= 1.0.2)
azure_graph_rbac (0.17.2)
ms_rest_azure (~> 0.12.0)
azure_mgmt_key_vault (0.17.7)
ms_rest_azure (~> 0.12.0)
azure_mgmt_resources (0.18.2)
ms_rest_azure (~> 0.12.0)
azure_mgmt_security (0.19.0)
ms_rest_azure (~> 0.12.0)
azure_mgmt_storage (0.23.0)
ms_rest_azure (~> 0.12.0)
bcrypt_pbkdf (1.1.0)
bson (4.15.0)
builder (3.2.4)
chef-config (17.10.0)
addressable
chef-utils (= 17.10.0)
fuzzyurl
mixlib-config (>= 2.2.12, < 4.0)
mixlib-shellout (>= 2.0, < 4.0)
tomlrb (~> 1.2)
chef-telemetry (1.1.1)
chef-config
concurrent-ruby (~> 1.0)
chef-utils (17.10.0)
concurrent-ruby
coderay (1.1.3)
concurrent-ruby (1.1.10)
cookstyle (7.32.1)
rubocop (= 1.25.1)
declarative (0.0.20)
diff-lcs (1.5.0)
docker-api (2.2.0)
excon (>= 0.47.0)
multi_json
domain_name (0.5.20190701)
unf (>= 0.0.5, < 1.0.0)
ed25519 (1.3.0)
erubi (1.10.0)
excon (0.92.3)
faraday (1.4.3)
faraday-em_http (~> 1.0)
faraday-em_synchrony (~> 1.0)
faraday-excon (~> 1.1)
faraday-net_http (~> 1.0)
faraday-net_http_persistent (~> 1.1)
multipart-post (>= 1.2, < 3)
ruby2_keywords (>= 0.0.4)
faraday-cookie_jar (0.0.7)
faraday (>= 0.8.0)
http-cookie (~> 1.0.0)
faraday-em_http (1.0.0)
faraday-em_synchrony (1.0.0)
faraday-excon (1.1.0)
faraday-net_http (1.0.1)
faraday-net_http_persistent (1.2.0)
faraday_middleware (1.0.0)
faraday (~> 1.0)
ffi (1.15.5)
fuzzyurl (0.9.0)
google-api-client (0.52.0)
addressable (~> 2.5, >= 2.5.1)
googleauth (~> 0.9)
httpclient (>= 2.8.1, < 3.0)
mini_mime (~> 1.0)
representable (~> 3.0)
retriable (>= 2.0, < 4.0)
rexml
signet (~> 0.12)
googleauth (0.14.0)
faraday (>= 0.17.3, < 2.0)
jwt (>= 1.4, < 3.0)
memoist (~> 0.16)
multi_json (~> 1.11)
os (>= 0.9, < 2.0)
signet (~> 0.14)
gssapi (1.3.1)
ffi (>= 1.0.1)
gyoku (1.4.0)
builder (>= 2.1.2)
rexml (~> 3.0)
hashie (4.1.0)
highline (2.0.3)
http-cookie (1.0.5)
domain_name (~> 0.5)
httpclient (2.8.3)
i18n (1.12.0)
concurrent-ruby (~> 1.0)
inifile (3.0.0)
jmespath (1.6.1)
json (2.6.2)
jwt (2.4.1)
kitchen-inspec (2.6.1)
hashie (>= 3.4, <= 5.0)
inspec (>= 2.2.64, < 7.0)
test-kitchen (>= 2.7, < 4)
kitchen-salt (0.7.2)
hashie (>= 3.5)
test-kitchen (>= 1.4)
license-acceptance (2.1.13)
pastel (~> 0.7)
tomlrb (>= 1.2, < 3.0)
tty-box (~> 0.6)
tty-prompt (~> 0.20)
little-plugger (1.1.4)
logging (2.3.1)
little-plugger (~> 1.1)
multi_json (~> 1.14)
memoist (0.16.2)
method_source (1.0.0)
mini_mime (1.1.2)
minitest (5.16.2)
mixlib-config (3.0.27)
tomlrb
mixlib-install (3.12.19)
mixlib-shellout
mixlib-versioning
thor
mixlib-log (3.0.9)
mixlib-shellout (3.2.7)
chef-utils
mixlib-versioning (1.2.12)
mongo (2.13.2)
bson (>= 4.8.2, < 5.0.0)
ms_rest (0.7.6)
concurrent-ruby (~> 1.0)
faraday (>= 0.9, < 2.0.0)
timeliness (~> 0.3.10)
ms_rest_azure (0.12.0)
concurrent-ruby (~> 1.0)
faraday (>= 0.9, < 2.0.0)
faraday-cookie_jar (~> 0.0.6)
ms_rest (~> 0.7.6)
multi_json (1.15.0)
multipart-post (2.2.3)
net-scp (3.0.0)
net-ssh (>= 2.6.5, < 7.0.0)
net-ssh (6.1.0)
net-ssh-gateway (2.0.0)
net-ssh (>= 4.0.0)
nori (2.6.0)
options (2.3.2)
os (1.1.4)
parallel (1.22.1)
parser (3.1.2.0)
ast (~> 2.4.1)
parslet (1.8.2)
pastel (0.8.0)
tty-color (~> 0.5)
progress_bar (1.3.3)
highline (>= 1.6, < 3)
options (~> 2.3.0)
pry (0.14.1)
coderay (~> 1.1)
method_source (~> 1.0)
public_suffix (4.0.7)
rainbow (3.1.1)
rake (13.0.6)
regexp_parser (2.5.0)
representable (3.2.0)
declarative (< 0.1.0)
trailblazer-option (>= 0.1.1, < 0.2.0)
uber (< 0.2.0)
retriable (3.1.2)
rexml (3.2.5)
rspec (3.11.0)
rspec-core (~> 3.11.0)
rspec-expectations (~> 3.11.0)
rspec-mocks (~> 3.11.0)
rspec-core (3.11.0)
rspec-support (~> 3.11.0)
rspec-expectations (3.11.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.11.0)
rspec-its (1.3.0)
rspec-core (>= 3.0.0)
rspec-expectations (>= 3.0.0)
rspec-mocks (3.11.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.11.0)
rspec-support (3.11.0)
rubocop (1.25.1)
parallel (~> 1.10)
parser (>= 3.1.0.0)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml
rubocop-ast (>= 1.15.1, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 3.0)
rubocop-ast (1.19.1)
parser (>= 3.1.1.0)
ruby-progressbar (1.11.0)
ruby2_keywords (0.0.5)
rubyntlm (0.6.3)
rubyzip (2.3.2)
semverse (3.0.2)
signet (0.17.0)
addressable (~> 2.8)
faraday (>= 0.17.5, < 3.a)
jwt (>= 1.5, < 3.0)
multi_json (~> 1.10)
sslshake (1.3.1)
strings (0.2.1)
strings-ansi (~> 0.2)
unicode-display_width (>= 1.5, < 3.0)
unicode_utils (~> 1.4)
strings-ansi (0.2.0)
test-kitchen (3.3.1)
bcrypt_pbkdf (~> 1.0)
chef-utils (>= 16.4.35)
ed25519 (~> 1.2)
license-acceptance (>= 1.0.11, < 3.0)
mixlib-install (~> 3.6)
mixlib-shellout (>= 1.2, < 4.0)
net-scp (>= 1.1, < 4.0)
net-ssh (>= 2.9, < 7.0)
net-ssh-gateway (>= 1.2, < 3.0)
thor (>= 0.19, < 2.0)
winrm (~> 2.0)
winrm-elevated (~> 1.0)
winrm-fs (~> 1.1)
thor (1.2.1)
timeliness (0.3.10)
tomlrb (1.3.0)
trailblazer-option (0.1.2)
train (3.10.1)
activesupport (>= 6.0.3.1)
azure_graph_rbac (~> 0.16)
azure_mgmt_key_vault (~> 0.17)
azure_mgmt_resources (~> 0.15)
azure_mgmt_security (~> 0.18)
azure_mgmt_storage (~> 0.18)
docker-api (>= 1.26, < 3.0)
google-api-client (>= 0.23.9, <= 0.52.0)
googleauth (>= 0.6.6, <= 0.14.0)
inifile (~> 3.0)
train-core (= 3.10.1)
train-winrm (~> 0.2)
train-aws (0.2.24)
aws-sdk-alexaforbusiness (~> 1.0)
aws-sdk-amplify (~> 1.32.0)
aws-sdk-apigateway (~> 1.0)
aws-sdk-apigatewayv2 (~> 1.0)
aws-sdk-applicationautoscaling (>= 1.46, < 1.52)
aws-sdk-athena (~> 1.0)
aws-sdk-autoscaling (>= 1.22, < 1.64)
aws-sdk-batch (>= 1.36, < 1.48)
aws-sdk-budgets (~> 1.0)
aws-sdk-cloudformation (~> 1.0)
aws-sdk-cloudfront (~> 1.0)
aws-sdk-cloudhsm (~> 1.0)
aws-sdk-cloudhsmv2 (~> 1.0)
aws-sdk-cloudtrail (~> 1.8)
aws-sdk-cloudwatch (~> 1.13)
aws-sdk-cloudwatchevents (>= 1.36, < 1.47)
aws-sdk-cloudwatchlogs (~> 1.13)
aws-sdk-codecommit (~> 1.0)
aws-sdk-codedeploy (~> 1.0)
aws-sdk-codepipeline (~> 1.0)
aws-sdk-cognitoidentity (>= 1.26, < 1.32)
aws-sdk-cognitoidentityprovider (>= 1.46, < 1.54)
aws-sdk-configservice (~> 1.21)
aws-sdk-core (~> 3.0)
aws-sdk-costandusagereportservice (~> 1.6)
aws-sdk-databasemigrationservice (>= 1.42, < 1.54)
aws-sdk-dynamodb (~> 1.31)
aws-sdk-ec2 (~> 1.70)
aws-sdk-ecr (~> 1.18)
aws-sdk-ecrpublic (~> 1.3)
aws-sdk-ecs (~> 1.30)
aws-sdk-efs (~> 1.0)
aws-sdk-eks (~> 1.9)
aws-sdk-elasticache (~> 1.0)
aws-sdk-elasticbeanstalk (~> 1.0)
aws-sdk-elasticloadbalancing (~> 1.8)
aws-sdk-elasticloadbalancingv2 (~> 1.0)
aws-sdk-elasticsearchservice (~> 1.0)
aws-sdk-emr (~> 1.53.0)
aws-sdk-eventbridge (~> 1.24.0)
aws-sdk-firehose (~> 1.0)
aws-sdk-glue (>= 1.71, < 1.89)
aws-sdk-guardduty (~> 1.31)
aws-sdk-iam (~> 1.13)
aws-sdk-kafka (~> 1.0)
aws-sdk-kinesis (~> 1.0)
aws-sdk-kms (~> 1.13)
aws-sdk-lambda (~> 1.0)
aws-sdk-mq (~> 1.40.0)
aws-sdk-networkfirewall (>= 1.6.0)
aws-sdk-networkmanager (>= 1.13.0)
aws-sdk-organizations (>= 1.17, < 1.60)
aws-sdk-ram (>= 1.21, < 1.27)
aws-sdk-rds (~> 1.43)
aws-sdk-redshift (~> 1.0)
aws-sdk-route53 (~> 1.0)
aws-sdk-route53domains (~> 1.0)
aws-sdk-route53resolver (~> 1.0)
aws-sdk-s3 (~> 1.30)
aws-sdk-s3control (~> 1.43.0)
aws-sdk-secretsmanager (>= 1.42, < 1.47)
aws-sdk-securityhub (~> 1.0)
aws-sdk-servicecatalog (>= 1.48, < 1.61)
aws-sdk-ses (~> 1.41.0)
aws-sdk-shield (~> 1.30)
aws-sdk-signer (~> 1.32.0)
aws-sdk-simpledb (~> 1.29.0)
aws-sdk-sms (~> 1.0)
aws-sdk-sns (~> 1.9)
aws-sdk-sqs (~> 1.10)
aws-sdk-ssm (~> 1.0)
aws-sdk-states (>= 1.35, < 1.40)
aws-sdk-synthetics (~> 1.19.0)
aws-sdk-transfer (>= 1.26, < 1.35)
aws-sdk-waf (~> 1.43.0)
train-core (3.10.1)
addressable (~> 2.5)
ffi (!= 1.13.0)
json (>= 1.8, < 3.0)
mixlib-shellout (>= 2.0, < 4.0)
net-scp (>= 1.2, < 4.0)
net-ssh (>= 2.9, < 7.0)
train-habitat (0.2.22)
train-winrm (0.2.13)
winrm (>= 2.3.6, < 3.0)
winrm-elevated (~> 1.2.2)
winrm-fs (~> 1.0)
tty-box (0.7.0)
pastel (~> 0.8)
strings (~> 0.2.0)
tty-cursor (~> 0.7)
tty-color (0.6.0)
tty-cursor (0.7.1)
tty-prompt (0.23.1)
pastel (~> 0.8)
tty-reader (~> 0.8)
tty-reader (0.9.0)
tty-cursor (~> 0.7)
tty-screen (~> 0.8)
wisper (~> 2.0)
tty-screen (0.8.1)
tty-table (0.12.0)
pastel (~> 0.8)
strings (~> 0.2.0)
tty-screen (~> 0.8)
tzinfo (2.0.4)
concurrent-ruby (~> 1.0)
uber (0.1.0)
unf (0.1.4)
unf_ext
unf_ext (0.0.8.2)
unicode-display_width (2.2.0)
unicode_utils (1.4.0)
winrm (2.3.6)
builder (>= 2.1.2)
erubi (~> 1.8)
gssapi (~> 1.2)
gyoku (~> 1.0)
httpclient (~> 2.2, >= 2.2.0.2)
logging (>= 1.6.1, < 3.0)
nori (~> 2.0)
rubyntlm (~> 0.6.0, >= 0.6.3)
winrm-elevated (1.2.3)
erubi (~> 1.8)
winrm (~> 2.0)
winrm-fs (~> 1.0)
winrm-fs (1.3.5)
erubi (~> 1.8)
logging (>= 1.6.1, < 3.0)
rubyzip (~> 2.0)
winrm (~> 2.0)
wisper (2.0.1)
PLATFORMS
ruby
DEPENDENCIES
inspec!
kitchen-docker!
kitchen-inspec (>= 2.5.0)
kitchen-salt (>= 0.7.2)
BUNDLED WITH
2.1.2

41
README.rst Normal file
View file

@ -0,0 +1,41 @@
logrotate
=========
Install and configure logrotate on a machine.
The config files are per OS.
At the moment only Debian, RedHat, Scientific Linux and Archlinux supported with this formula
.. note::
See the full `Salt Formulas installation and usage instructions
<http://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html>`_.
Available states
================
.. contents::
:local:
``logrotate``
-------------
Installs the ``logrotate`` package and service/timer/cron.
``logrotate.config``
--------------------
Manages logrotate config and include dir.
``logrotate.install``
---------------------
Installs the logrotate package and its dependencies.
``logrotate.jobs``
------------------
Create custom job for logrotate.
``logrotate.service``
---------------------
Manages the startup and running state of the logrotate service.

View file

@ -1,16 +0,0 @@
#!/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
if ! command -v pre-commit >/dev/null 2>&1; then
echo "pre-commit not found: please install or check your PATH" >&2
echo "See https://pre-commit.com/#installation" >&2
exit 1
fi
pre-commit install --install-hooks
pre-commit install --hook-type commit-msg --install-hooks

View file

@ -1,32 +0,0 @@
#!/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')

View file

@ -1,8 +0,0 @@
module.exports = {
extends: ['@commitlint/config-conventional'],
rules: {
'body-max-line-length': [2, 'always', 120],
'footer-max-line-length': [2, 'always', 120],
'header-max-length': [2, 'always', 72],
},
};

View file

@ -1,98 +0,0 @@
.. 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://avatars.githubusercontent.com/u/10231489?v=4' width='36' height='36' alt='@myii'>`
- `@myii <https://github.com/myii>`_
- 150
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars.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://avatars.githubusercontent.com/u/242396?v=4' width='36' height='36' alt='@javierbertoli'>`
- `@javierbertoli <https://github.com/javierbertoli>`_
- 11
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars.githubusercontent.com/u/52996?v=4' width='36' height='36' alt='@daks'>`
- `@daks <https://github.com/daks>`_
- 11
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars.githubusercontent.com/u/745513?v=4' width='36' height='36' alt='@EvaSDK'>`
- `@EvaSDK <https://github.com/EvaSDK>`_
- 8
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars.githubusercontent.com/u/3374962?v=4' width='36' height='36' alt='@nmadhok'>`
- `@nmadhok <https://github.com/nmadhok>`_
- 8
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars.githubusercontent.com/u/3700416?v=4' width='36' height='36' alt='@fessoga5'>`
- `@fessoga5 <https://github.com/fessoga5>`_
- 5
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars.githubusercontent.com/u/714914?v=4' width='36' height='36' alt='@waynegemmell'>`
- `@waynegemmell <https://github.com/waynegemmell>`_
- 5
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars.githubusercontent.com/u/117961?v=4' width='36' height='36' alt='@wwentland'>`
- `@wwentland <https://github.com/wwentland>`_
- 4
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars.githubusercontent.com/u/4195158?v=4' width='36' height='36' alt='@dafyddj'>`
- `@dafyddj <https://github.com/dafyddj>`_
- 3
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars.githubusercontent.com/u/762280?v=4' width='36' height='36' alt='@asenci'>`
- `@asenci <https://github.com/asenci>`_
- 2
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars.githubusercontent.com/u/2984201?v=4' width='36' height='36' alt='@egarbi'>`
- `@egarbi <https://github.com/egarbi>`_
- 2
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars.githubusercontent.com/u/83996323?v=4' width='36' height='36' alt='@mdschmitt'>`
- `@mdschmitt <https://github.com/mdschmitt>`_
- 2
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars.githubusercontent.com/u/3433835?v=4' width='36' height='36' alt='@n-rodriguez'>`
- `@n-rodriguez <https://github.com/n-rodriguez>`_
- 2
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars.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://avatars.githubusercontent.com/u/228723?v=4' width='36' height='36' alt='@abednarik'>`
- `@abednarik <https://github.com/abednarik>`_
- 1
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars.githubusercontent.com/u/470626?v=4' width='36' height='36' alt='@Bilge'>`
- `@Bilge <https://github.com/Bilge>`_
- 1
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars.githubusercontent.com/u/1233212?v=4' width='36' height='36' alt='@baby-gnu'>`
- `@baby-gnu <https://github.com/baby-gnu>`_
- 1
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars.githubusercontent.com/u/732321?v=4' width='36' height='36' alt='@gtmanfred'>`
- `@gtmanfred <https://github.com/gtmanfred>`_
- 1
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars.githubusercontent.com/u/378158?v=4' width='36' height='36' alt='@dseira'>`
- `@dseira <https://github.com/dseira>`_
- 1
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars.githubusercontent.com/u/1396878?v=4' width='36' height='36' alt='@gravyboat'>`
- `@gravyboat <https://github.com/gravyboat>`_
- 1
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars.githubusercontent.com/u/6086064?v=4' width='36' height='36' alt='@mgomersbach'>`
- `@mgomersbach <https://github.com/mgomersbach>`_
- 1
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars.githubusercontent.com/u/20769322?v=4' width='36' height='36' alt='@mlg-lebo'>`
- `@mlg-lebo <https://github.com/mlg-lebo>`_
- 1
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars.githubusercontent.com/u/8266370?v=4' width='36' height='36' alt='@edwin--zhao'>`
- `@edwin--zhao <https://github.com/edwin--zhao>`_
- 1
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars.githubusercontent.com/u/111994776?v=4' width='36' height='36' alt='@mdubois83'>`
- `@mdubois83 <https://github.com/mdubois83>`_
- 1
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars.githubusercontent.com/u/13322818?v=4' width='36' height='36' alt='@noelmcloughlin'>`
- `@noelmcloughlin <https://github.com/noelmcloughlin>`_
- 1
----
Auto-generated by a `forked version <https://github.com/myii/maintainer>`_ of `gaocegege/maintainer <https://github.com/gaocegege/maintainer>`_ on 2022-08-29.

View file

@ -1,268 +0,0 @@
Changelog
=========
`0.14.0 <https://github.com/saltstack-formulas/logrotate-formula/compare/v0.13.2...v0.14.0>`_ (2022-08-29)
--------------------------------------------------------------------------------------------------------------
Continuous Integration
^^^^^^^^^^^^^^^^^^^^^^
* update ``pre-commit`` configuration inc. for pre-commit.ci [skip ci] (\ `df61825 <https://github.com/saltstack-formulas/logrotate-formula/commit/df618259eb5b6111138638bef00b07d9383e9570>`_\ )
* **kitchen+gitlab:** update for new pre-salted images [skip ci] (\ `af19654 <https://github.com/saltstack-formulas/logrotate-formula/commit/af196541ad64be2e85c9eb8204f8ce08fcd321dd>`_\ )
Features
^^^^^^^^
* **osfingermap:** add Debian-11 entry to osfingermap.yaml (\ `756769a <https://github.com/saltstack-formulas/logrotate-formula/commit/756769aeca802cd8586f780b4b0eaeaa22a07fed>`_\ )
Tests
^^^^^
* **system.rb:** add support for ``mac_os_x`` [skip ci] (\ `e8d4e7e <https://github.com/saltstack-formulas/logrotate-formula/commit/e8d4e7eb9e54e6cd510461afc76ed82522346891>`_\ )
`0.13.2 <https://github.com/saltstack-formulas/logrotate-formula/compare/v0.13.1...v0.13.2>`_ (2022-03-28)
--------------------------------------------------------------------------------------------------------------
Bug Fixes
^^^^^^^^^
* **conf:** add 'monthly' interval (\ `b6cc8a9 <https://github.com/saltstack-formulas/logrotate-formula/commit/b6cc8a908482997ecd84ac6bbce0607bd759df47>`_\ )
Tests
^^^^^
* **jobs:** add a monthly job test (\ `957e689 <https://github.com/saltstack-formulas/logrotate-formula/commit/957e6897c052840a16bdd281b3e96132c4f37c01>`_\ )
* **jobs:** reorder parameters to match pillar (\ `3bdc11b <https://github.com/saltstack-formulas/logrotate-formula/commit/3bdc11b5c2b2f2b60d8dfe7b3a493fce532b0c6e>`_\ )
`0.13.1 <https://github.com/saltstack-formulas/logrotate-formula/compare/v0.13.0...v0.13.1>`_ (2022-02-22)
--------------------------------------------------------------------------------------------------------------
Bug Fixes
^^^^^^^^^
* **ubuntu:** removed breaking wtmp btmp (\ `012bfef <https://github.com/saltstack-formulas/logrotate-formula/commit/012bfef7d7733300059375edaf9b93aca343cd4d>`_\ )
Continuous Integration
^^^^^^^^^^^^^^^^^^^^^^
* update linters to latest versions [skip ci] (\ `eb6d2ea <https://github.com/saltstack-formulas/logrotate-formula/commit/eb6d2ea9be3f8203e5e48c3c579614f6761b4e8d>`_\ )
* **gemfile:** allow rubygems proxy to be provided as an env var [skip ci] (\ `d545fb2 <https://github.com/saltstack-formulas/logrotate-formula/commit/d545fb2278b0b1c702f39d59228d0a74406aa3d2>`_\ )
* **kitchen+gitlab:** update for new pre-salted images [skip ci] (\ `d71215b <https://github.com/saltstack-formulas/logrotate-formula/commit/d71215bd8174decbec56fa9a5b098564ab7b3584>`_\ )
Tests
^^^^^
* **system:** add ``build_platform_codename`` [skip ci] (\ `4722110 <https://github.com/saltstack-formulas/logrotate-formula/commit/4722110f28e5a286f23292084026cd3c521bb38f>`_\ )
`0.13.0 <https://github.com/saltstack-formulas/logrotate-formula/compare/v0.12.0...v0.13.0>`_ (2022-01-14)
--------------------------------------------------------------------------------------------------------------
Continuous Integration
^^^^^^^^^^^^^^^^^^^^^^
* **gemfile+lock:** use ``ssf`` customised ``inspec`` repo [skip ci] (\ `27829b8 <https://github.com/saltstack-formulas/logrotate-formula/commit/27829b8969162dcf2deb27b4135ac1dec651348d>`_\ )
* **kitchen:** move ``provisioner`` block & update ``run_command`` [skip ci] (\ `42bde9c <https://github.com/saltstack-formulas/logrotate-formula/commit/42bde9c5f53bc9c897b9fa6ccb0fd50c251b2fe8>`_\ )
* **kitchen:** use ``cron-formula`` dependency instead of ``cron`` state (\ `4cf2808 <https://github.com/saltstack-formulas/logrotate-formula/commit/4cf2808840cc8701347b81018ad41603c534cc0b>`_\ )
* **kitchen+ci:** update with ``3004`` pre-salted images/boxes [skip ci] (\ `bacce6e <https://github.com/saltstack-formulas/logrotate-formula/commit/bacce6ea8935bfafb56b16aaa217b5b03a8b9168>`_\ )
* **kitchen+ci:** update with latest ``3003.2`` pre-salted images [skip ci] (\ `e6ee323 <https://github.com/saltstack-formulas/logrotate-formula/commit/e6ee323f87819acce9b54f36fb8cfa9ca55c6241>`_\ )
* **kitchen+ci:** update with latest CVE pre-salted images [skip ci] (\ `a1dd441 <https://github.com/saltstack-formulas/logrotate-formula/commit/a1dd4415e54651bb021a068fe0cd8cd0e883a827>`_\ )
* add Debian 11 Bullseye & update ``yamllint`` configuration [skip ci] (\ `0e63e18 <https://github.com/saltstack-formulas/logrotate-formula/commit/0e63e188eff36282a5c5a3525afb3c7a6cfc7676>`_\ )
Features
^^^^^^^^
* **hourly:** add configuration to enable hourly jobs (\ `7b5676b <https://github.com/saltstack-formulas/logrotate-formula/commit/7b5676b9e267fb9bc7b610040a113fa870ee3d23>`_\ )
* **hourly:** add hourly job def to pillar.example (\ `cd4cd1d <https://github.com/saltstack-formulas/logrotate-formula/commit/cd4cd1d670b1a83b6a58dcaa96bd0db6ce380a2e>`_\ )
Tests
^^^^^
* **alma+rocky:** add platforms (finalise dc63042) [skip ci] (\ `e4ad016 <https://github.com/saltstack-formulas/logrotate-formula/commit/e4ad016b97293e8e4d74864c6afbfdeb308b38bf>`_\ )
* **base:** re-enable Arch Linux test (possible due to ``cron-formula``\ ) (\ `2136711 <https://github.com/saltstack-formulas/logrotate-formula/commit/2136711a12ba4e1989afa160808d5a2851f25793>`_\ )
* **jobs:** add ``hourly`` test (\ `69677b0 <https://github.com/saltstack-formulas/logrotate-formula/commit/69677b0c02623d4c4c7954e39c7225864abf9d87>`_\ )
`0.12.0 <https://github.com/saltstack-formulas/logrotate-formula/compare/v0.11.5...v0.12.0>`_ (2021-07-07)
--------------------------------------------------------------------------------------------------------------
Continuous Integration
^^^^^^^^^^^^^^^^^^^^^^
* **3003.1:** update inc. AlmaLinux, Rocky & ``rst-lint`` [skip ci] (\ `bb6bfac <https://github.com/saltstack-formulas/logrotate-formula/commit/bb6bfac80eade092222776d63040248ddd6bce6e>`_\ )
* **commitlint:** ensure ``upstream/master`` uses main repo URL [skip ci] (\ `ac5a57c <https://github.com/saltstack-formulas/logrotate-formula/commit/ac5a57c76d171492bb87be9476514e26d32016d2>`_\ )
* **gemfile+lock:** use ``ssf`` customised ``kitchen-docker`` repo [skip ci] (\ `7368305 <https://github.com/saltstack-formulas/logrotate-formula/commit/7368305919c2ac67e94e5c1f017e909957733659>`_\ )
* **kitchen+gitlab:** remove Ubuntu 16.04 & Fedora 32 (EOL) [skip ci] (\ `1f55b57 <https://github.com/saltstack-formulas/logrotate-formula/commit/1f55b57a61278f96926566aa48c25026e5740e24>`_\ )
* add ``arch-master`` to matrix and update ``.travis.yml`` [skip ci] (\ `84b2f6a <https://github.com/saltstack-formulas/logrotate-formula/commit/84b2f6aa991da969a28c455e6b7f8b4ed69d8ce9>`_\ )
* **gitlab-ci:** add ``rubocop`` linter (with ``allow_failure``\ ) [skip ci] (\ `1fc52cd <https://github.com/saltstack-formulas/logrotate-formula/commit/1fc52cd2339c8ecef93de9fca4b9edcfd16464c3>`_\ )
* **gitlab-ci:** use GitLab CI as Travis CI replacement (\ `94c2cf7 <https://github.com/saltstack-formulas/logrotate-formula/commit/94c2cf7d2cc49802fda5baee93efcc1509227ffe>`_\ )
* **kitchen+ci:** use latest pre-salted images (after CVE) [skip ci] (\ `406dbbb <https://github.com/saltstack-formulas/logrotate-formula/commit/406dbbb4e594bc9ff14267f39d3acaca77510860>`_\ )
* **kitchen+gitlab:** adjust matrix to add ``3003`` [skip ci] (\ `b198955 <https://github.com/saltstack-formulas/logrotate-formula/commit/b198955b5f324323c51dbdac13ea5825f424656f>`_\ )
* **kitchen+gitlab-ci:** use latest pre-salted images [skip ci] (\ `ea66a0d <https://github.com/saltstack-formulas/logrotate-formula/commit/ea66a0d2b85635dc66088caac94614191a772a9d>`_\ )
* **pre-commit:** add to formula [skip ci] (\ `e506d69 <https://github.com/saltstack-formulas/logrotate-formula/commit/e506d6954ddba83146afc98e9338e68a8ffbfcb6>`_\ )
* **pre-commit:** enable/disable ``rstcheck`` as relevant [skip ci] (\ `267bb94 <https://github.com/saltstack-formulas/logrotate-formula/commit/267bb944a4b889234b438b46bf03e7b8d13482b4>`_\ )
* **pre-commit:** finalise ``rstcheck`` configuration [skip ci] (\ `bd1dc81 <https://github.com/saltstack-formulas/logrotate-formula/commit/bd1dc81dcbf7f031cb58ce74cb43443194a24b1d>`_\ )
* **pre-commit:** update hook for ``rubocop`` [skip ci] (\ `2c964b0 <https://github.com/saltstack-formulas/logrotate-formula/commit/2c964b09e4b3450356e5bc1bac7a880fc2cbed18>`_\ )
Features
^^^^^^^^
* **jobs:** add ``jobs: {}`` to defaults and state to init (\ `c3b64d3 <https://github.com/saltstack-formulas/logrotate-formula/commit/c3b64d37a7c06d143df3a474d9129cb860fe17c7>`_\ ), closes `#57 <https://github.com/saltstack-formulas/logrotate-formula/issues/57>`_
Tests
^^^^^
* **alma+rocky:** add platforms (based on CentOS 8) [skip ci] (\ `dc63042 <https://github.com/saltstack-formulas/logrotate-formula/commit/dc630420a5715f26276707adf00866ef882d4cb4>`_\ )
* standardise use of ``share`` suite & ``_mapdata`` state [skip ci] (\ `650cfad <https://github.com/saltstack-formulas/logrotate-formula/commit/650cfaddf026badfb926bb39643021d9d4918880>`_\ )
* **base:** update from ``template-formula`` and Arch Linux exclusion (\ `09d4f5a <https://github.com/saltstack-formulas/logrotate-formula/commit/09d4f5a0341f1f4c5644742631c749f1cb78409d>`_\ )
* **rubocop:** fix violation [skip ci] (\ `3f5edef <https://github.com/saltstack-formulas/logrotate-formula/commit/3f5edefc18b606fbb205de22d0286393714750e6>`_\ )
`0.11.5 <https://github.com/saltstack-formulas/logrotate-formula/compare/v0.11.4...v0.11.5>`_ (2020-06-29)
--------------------------------------------------------------------------------------------------------------
Bug Fixes
^^^^^^^^^
* **debian-10:** disable login_records, they're managed by the package (\ `335c9e6 <https://github.com/saltstack-formulas/logrotate-formula/commit/335c9e63087a4d6b93d1283547cc4094bcf5d581>`_\ )
Continuous Integration
^^^^^^^^^^^^^^^^^^^^^^
* **kitchen:** use ``saltimages`` Docker Hub where available [skip ci] (\ `8f32221 <https://github.com/saltstack-formulas/logrotate-formula/commit/8f32221ba450b14db5227f4a579cdcfd1876a67d>`_\ )
* **kitchen+travis:** use latest pre-salted images [skip ci] (\ `e18246d <https://github.com/saltstack-formulas/logrotate-formula/commit/e18246d89bc83097ae1ee1ab887b884b7a2ad84d>`_\ )
* **travis:** add notifications => zulip [skip ci] (\ `d1c1a81 <https://github.com/saltstack-formulas/logrotate-formula/commit/d1c1a81aa2a6ff62796dfa04aba6e093a2129a5e>`_\ )
`0.11.4 <https://github.com/saltstack-formulas/logrotate-formula/compare/v0.11.3...v0.11.4>`_ (2020-05-07)
--------------------------------------------------------------------------------------------------------------
Bug Fixes
^^^^^^^^^
* make necessary modifications to get working on ``salt-ssh`` (\ `57c88a8 <https://github.com/saltstack-formulas/logrotate-formula/commit/57c88a81403726431377acf3e87fec6abae34b1f>`_\ ), closes `/freenode.logbot.info/saltstack-formulas/20200506#c3811885-c3812572 <https://github.com//freenode.logbot.info/saltstack-formulas/20200506/issues/c3811885-c3812572>`_
Continuous Integration
^^^^^^^^^^^^^^^^^^^^^^
* **gemfile.lock:** add to repo with updated ``Gemfile`` [skip ci] (\ `a5cf505 <https://github.com/saltstack-formulas/logrotate-formula/commit/a5cf505cc018180361a6f2c9d9c21b4595f2632a>`_\ )
* **kitchen+travis:** remove ``master-py2-arch-base-latest`` [skip ci] (\ `bf6f940 <https://github.com/saltstack-formulas/logrotate-formula/commit/bf6f9406daad33586aef93a864564206642ffeac>`_\ )
* **workflows/commitlint:** add to repo [skip ci] (\ `4c2a90b <https://github.com/saltstack-formulas/logrotate-formula/commit/4c2a90bccd53a6079aac13cacafc396ad28660c3>`_\ )
`0.11.3 <https://github.com/saltstack-formulas/logrotate-formula/compare/v0.11.2...v0.11.3>`_ (2020-03-22)
--------------------------------------------------------------------------------------------------------------
Bug Fixes
^^^^^^^^^
* **release.config.js:** use full commit hash in commit link [skip ci] (\ `c79d42e <https://github.com/saltstack-formulas/logrotate-formula/commit/c79d42e0e0d9ef87aa697969ee5027a16d143595>`_\ )
Continuous Integration
^^^^^^^^^^^^^^^^^^^^^^
* **gemfile:** restrict ``train`` gem version until upstream fix [skip ci] (\ `e6a2d52 <https://github.com/saltstack-formulas/logrotate-formula/commit/e6a2d52a4c6b448e136618cbf493a360ed18a6c7>`_\ )
* **kitchen:** avoid using bootstrap for ``master`` instances [skip ci] (\ `6200869 <https://github.com/saltstack-formulas/logrotate-formula/commit/6200869f7a04a4b2f69d763744e65047f879f2dd>`_\ )
* **kitchen:** ensure ``cron`` installed on ``Debian`` (\ `4401a20 <https://github.com/saltstack-formulas/logrotate-formula/commit/4401a206710af159c04c95ea31d2a36585233c46>`_\ )
* **kitchen:** use ``debian-10-master-py3`` instead of ``develop`` [skip ci] (\ `7ba188f <https://github.com/saltstack-formulas/logrotate-formula/commit/7ba188f535502e641a0a429a65fa0e0f788ef7b9>`_\ )
* **kitchen:** use ``develop`` image until ``master`` is ready (\ ``amazonlinux``\ ) [skip ci] (\ `c4a1fa9 <https://github.com/saltstack-formulas/logrotate-formula/commit/c4a1fa9f6ffc6ef5b8b93d0d71719184294b3217>`_\ )
* **kitchen+travis:** upgrade matrix after ``2019.2.2`` release [skip ci] (\ `74ab7a1 <https://github.com/saltstack-formulas/logrotate-formula/commit/74ab7a144d73c9159e078a8711edfe1df2dc191e>`_\ )
* **travis:** apply changes from build config validation [skip ci] (\ `4e65a71 <https://github.com/saltstack-formulas/logrotate-formula/commit/4e65a7197b637e9f243a01be52f9b67e148c708e>`_\ )
* **travis:** opt-in to ``dpl v2`` to complete build config validation [skip ci] (\ `05f9738 <https://github.com/saltstack-formulas/logrotate-formula/commit/05f973872e814545dadb991eedbd93333330db48>`_\ )
* **travis:** quote pathspecs used with ``git ls-files`` [skip ci] (\ `b7ff28d <https://github.com/saltstack-formulas/logrotate-formula/commit/b7ff28d630908a0962b50a4934bec42fd062b304>`_\ )
* **travis:** run ``shellcheck`` during lint job [skip ci] (\ `b60e2ab <https://github.com/saltstack-formulas/logrotate-formula/commit/b60e2abf734bbd6ea0c11559fc6f965b28a9ced9>`_\ )
* **travis:** update ``salt-lint`` config for ``v0.0.10`` [skip ci] (\ `a75723c <https://github.com/saltstack-formulas/logrotate-formula/commit/a75723cbe59b1a4c55c809bde580f6b302447d76>`_\ )
* **travis:** use ``major.minor`` for ``semantic-release`` version [skip ci] (\ `d08d9bf <https://github.com/saltstack-formulas/logrotate-formula/commit/d08d9bfa06300073e768d7a7b1471af3cc89a203>`_\ )
* **travis:** use build config validation (beta) [skip ci] (\ `ef455ff <https://github.com/saltstack-formulas/logrotate-formula/commit/ef455fffae2dce9c11fdfaa877fb0003a402890d>`_\ )
Documentation
^^^^^^^^^^^^^
* **contributing:** remove to use org-level file instead [skip ci] (\ `01493e9 <https://github.com/saltstack-formulas/logrotate-formula/commit/01493e95a947306bd0c2c43c5f076c18cb60843b>`_\ )
* **readme:** update link to ``CONTRIBUTING`` [skip ci] (\ `d2ee252 <https://github.com/saltstack-formulas/logrotate-formula/commit/d2ee2524cdc8ae37e44ea2d002ebf7b0de6ff466>`_\ )
Performance Improvements
^^^^^^^^^^^^^^^^^^^^^^^^
* **travis:** improve ``salt-lint`` invocation [skip ci] (\ `ebd94f0 <https://github.com/saltstack-formulas/logrotate-formula/commit/ebd94f078e2418ebd9f738150da223e4bef9b807>`_\ )
`0.11.2 <https://github.com/saltstack-formulas/logrotate-formula/compare/v0.11.1...v0.11.2>`_ (2019-10-11)
--------------------------------------------------------------------------------------------------------------
Bug Fixes
^^^^^^^^^
* **rubocop:** add fixes using ``rubocop --safe-auto-correct`` (\ ` <https://github.com/saltstack-formulas/logrotate-formula/commit/de80802>`_\ )
* **rubocop:** fix remaining errors manually (\ ` <https://github.com/saltstack-formulas/logrotate-formula/commit/401493b>`_\ )
Continuous Integration
^^^^^^^^^^^^^^^^^^^^^^
* **kitchen:** change ``log_level`` to ``debug`` instead of ``info`` (\ ` <https://github.com/saltstack-formulas/logrotate-formula/commit/e98975f>`_\ )
* **kitchen:** install required packages to bootstrapped ``opensuse`` [skip ci] (\ ` <https://github.com/saltstack-formulas/logrotate-formula/commit/4e76aa3>`_\ )
* **kitchen:** use bootstrapped ``opensuse`` images until ``2019.2.2`` [skip ci] (\ ` <https://github.com/saltstack-formulas/logrotate-formula/commit/26582d7>`_\ )
* **platform:** add ``arch-base-latest`` (commented out for now) [skip ci] (\ ` <https://github.com/saltstack-formulas/logrotate-formula/commit/7e0f2b4>`_\ )
* merge travis matrix, add ``salt-lint`` & ``rubocop`` to ``lint`` job (\ ` <https://github.com/saltstack-formulas/logrotate-formula/commit/a66f4fe>`_\ )
* merge travis matrix, add ``salt-lint`` & ``rubocop`` to ``lint`` job (\ ` <https://github.com/saltstack-formulas/logrotate-formula/commit/f31e348>`_\ )
* use ``dist: bionic`` & apply ``opensuse-leap-15`` SCP error workaround (\ ` <https://github.com/saltstack-formulas/logrotate-formula/commit/b836a66>`_\ )
* **travis:** merge ``rubocop`` linter into main ``lint`` job (\ ` <https://github.com/saltstack-formulas/logrotate-formula/commit/b8d7987>`_\ )
* **yamllint:** add rule ``empty-values`` & use new ``yaml-files`` setting (\ ` <https://github.com/saltstack-formulas/logrotate-formula/commit/7544833>`_\ )
`0.11.1 <https://github.com/saltstack-formulas/logrotate-formula/compare/v0.11.0...v0.11.1>`_ (2019-09-01)
--------------------------------------------------------------------------------------------------------------
Continuous Integration
^^^^^^^^^^^^^^^^^^^^^^
* **kitchen+travis:** replace EOL pre-salted images (\ `cc3fa62 <https://github.com/saltstack-formulas/logrotate-formula/commit/cc3fa62>`_\ )
Tests
^^^^^
* **inspec:** improve to work on ``amazon`` as well (\ `be09e0d <https://github.com/saltstack-formulas/logrotate-formula/commit/be09e0d>`_\ )
`0.11.0 <https://github.com/saltstack-formulas/logrotate-formula/compare/v0.10.0...v0.11.0>`_ (2019-08-10)
--------------------------------------------------------------------------------------------------------------
Features
^^^^^^^^
* **yamllint:** include for this repo and apply rules throughout (\ `86aed1e <https://github.com/saltstack-formulas/logrotate-formula/commit/86aed1e>`_\ )
`0.10.0 <https://github.com/saltstack-formulas/logrotate-formula/compare/v0.9.0...v0.10.0>`_ (2019-06-25)
-------------------------------------------------------------------------------------------------------------
Bug Fixes
^^^^^^^^^
* **test:** on suse using and additional kitchen state (\ `21a1866 <https://github.com/saltstack-formulas/logrotate-formula/commit/21a1866>`_\ )
Features
^^^^^^^^
* implement semantic release (\ `ef086b2 <https://github.com/saltstack-formulas/logrotate-formula/commit/ef086b2>`_\ )

View file

@ -1,120 +0,0 @@
.. _readme:
logrotate-formula
=================
|img_travis| |img_sr|
.. |img_travis| image:: https://travis-ci.com/saltstack-formulas/logrotate-formula.svg?branch=master
:alt: Travis CI Build Status
:scale: 100%
:target: https://travis-ci.com/saltstack-formulas/logrotate-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
Install and configure logrotate on a machine.
The config files are per OS.
At the moment only Debian, RedHat, Scientific Linux and Archlinux supported with this formula
.. 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.
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.
Available states
----------------
.. contents::
:local:
``logrotate``
^^^^^^^^^^^^^
Installs the ``logrotate`` package and service/timer/cron.
``logrotate.config``
^^^^^^^^^^^^^^^^^^^^
Manages logrotate config and include dir.
``logrotate.install``
^^^^^^^^^^^^^^^^^^^^^
Installs the logrotate package and its dependencies.
``logrotate.jobs``
^^^^^^^^^^^^^^^^^^
Create custom job for logrotate.
``logrotate.service``
^^^^^^^^^^^^^^^^^^^^^
Manages the startup and running state of the logrotate service.
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 ``logrotate`` 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.

View file

@ -1,291 +0,0 @@
# -*- 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: /usr/lib/systemd/systemd
provisioner:
name: salt_solo
log_level: debug
salt_install: none
require_chef: false
formula: logrotate
salt_copy_filter:
- .kitchen
- .git
platforms:
## SALT `tiamat`
- name: debian-11-tiamat-py3
driver:
image: saltimages/salt-tiamat-py3:debian-11
run_command: /lib/systemd/systemd
- name: debian-10-tiamat-py3
driver:
image: saltimages/salt-tiamat-py3:debian-10
run_command: /lib/systemd/systemd
- name: debian-9-tiamat-py3
driver:
image: saltimages/salt-tiamat-py3:debian-9
run_command: /lib/systemd/systemd
- name: ubuntu-2204-tiamat-py3
driver:
image: saltimages/salt-tiamat-py3:ubuntu-22.04
run_command: /lib/systemd/systemd
- name: ubuntu-2004-tiamat-py3
driver:
image: saltimages/salt-tiamat-py3:ubuntu-20.04
run_command: /lib/systemd/systemd
- name: ubuntu-1804-tiamat-py3
driver:
image: saltimages/salt-tiamat-py3:ubuntu-18.04
run_command: /lib/systemd/systemd
- name: centos-stream8-tiamat-py3
driver:
image: saltimages/salt-tiamat-py3:centos-stream8
- name: centos-7-tiamat-py3
driver:
image: saltimages/salt-tiamat-py3:centos-7
- name: amazonlinux-2-tiamat-py3
driver:
image: saltimages/salt-tiamat-py3:amazonlinux-2
- name: oraclelinux-8-tiamat-py3
driver:
image: saltimages/salt-tiamat-py3:oraclelinux-8
- name: oraclelinux-7-tiamat-py3
driver:
image: saltimages/salt-tiamat-py3:oraclelinux-7
- name: almalinux-8-tiamat-py3
driver:
image: saltimages/salt-tiamat-py3:almalinux-8
- name: rockylinux-8-tiamat-py3
driver:
image: saltimages/salt-tiamat-py3:rockylinux-8
## SALT `master`
- name: debian-11-master-py3
driver:
image: saltimages/salt-master-py3:debian-11
run_command: /lib/systemd/systemd
- name: debian-10-master-py3
driver:
image: saltimages/salt-master-py3:debian-10
run_command: /lib/systemd/systemd
- name: debian-9-master-py3
driver:
image: saltimages/salt-master-py3:debian-9
run_command: /lib/systemd/systemd
- name: ubuntu-2204-master-py3
driver:
image: saltimages/salt-master-py3:ubuntu-22.04
run_command: /lib/systemd/systemd
- name: ubuntu-2004-master-py3
driver:
image: saltimages/salt-master-py3:ubuntu-20.04
run_command: /lib/systemd/systemd
- name: ubuntu-1804-master-py3
driver:
image: saltimages/salt-master-py3:ubuntu-18.04
run_command: /lib/systemd/systemd
- name: centos-stream8-master-py3
driver:
image: saltimages/salt-master-py3:centos-stream8
- name: centos-7-master-py3
driver:
image: saltimages/salt-master-py3:centos-7
- name: fedora-36-master-py3
driver:
image: saltimages/salt-master-py3:fedora-36
- name: fedora-35-master-py3
driver:
image: saltimages/salt-master-py3:fedora-35
- name: opensuse-leap-153-master-py3
driver:
image: saltimages/salt-master-py3:opensuse-leap-15.3
# Workaround to avoid intermittent failures on `opensuse-leap-15.3`:
# => SCP did not finish successfully (255): (Net::SCP::Error)
transport:
max_ssh_sessions: 1
- name: opensuse-tmbl-latest-master-py3
driver:
image: saltimages/salt-master-py3:opensuse-tumbleweed-latest
# Workaround to avoid intermittent failures on `opensuse-tumbleweed`:
# => SCP did not finish successfully (255): (Net::SCP::Error)
transport:
max_ssh_sessions: 1
- name: amazonlinux-2-master-py3
driver:
image: saltimages/salt-master-py3:amazonlinux-2
- name: oraclelinux-8-master-py3
driver:
image: saltimages/salt-master-py3:oraclelinux-8
- name: oraclelinux-7-master-py3
driver:
image: saltimages/salt-master-py3:oraclelinux-7
- name: arch-base-latest-master-py3
driver:
image: saltimages/salt-master-py3:arch-base-latest
- name: gentoo-stage3-latest-master-py3
driver:
image: saltimages/salt-master-py3:gentoo-stage3-latest
run_command: /sbin/init
- name: gentoo-stage3-systemd-master-py3
driver:
image: saltimages/salt-master-py3:gentoo-stage3-systemd
- name: almalinux-8-master-py3
driver:
image: saltimages/salt-master-py3:almalinux-8
- name: rockylinux-8-master-py3
driver:
image: saltimages/salt-master-py3:rockylinux-8
## SALT `3004.1`
- name: debian-11-3004-1-py3
driver:
image: saltimages/salt-3004.1-py3:debian-11
run_command: /lib/systemd/systemd
- name: debian-10-3004-1-py3
driver:
image: saltimages/salt-3004.1-py3:debian-10
run_command: /lib/systemd/systemd
- name: debian-9-3004-1-py3
driver:
image: saltimages/salt-3004.1-py3:debian-9
run_command: /lib/systemd/systemd
- name: ubuntu-2204-3004-1-py3
driver:
image: saltimages/salt-3004.1-py3:ubuntu-22.04
run_command: /lib/systemd/systemd
- name: ubuntu-2004-3004-1-py3
driver:
image: saltimages/salt-3004.1-py3:ubuntu-20.04
run_command: /lib/systemd/systemd
- name: ubuntu-1804-3004-1-py3
driver:
image: saltimages/salt-3004.1-py3:ubuntu-18.04
run_command: /lib/systemd/systemd
- name: centos-stream8-3004-1-py3
driver:
image: saltimages/salt-3004.1-py3:centos-stream8
- name: centos-7-3004-1-py3
driver:
image: saltimages/salt-3004.1-py3:centos-7
- name: fedora-36-3004-1-py3
driver:
image: saltimages/salt-3004.1-py3:fedora-36
- name: fedora-35-3004-1-py3
driver:
image: saltimages/salt-3004.1-py3:fedora-35
- name: amazonlinux-2-3004-1-py3
driver:
image: saltimages/salt-3004.1-py3:amazonlinux-2
- name: oraclelinux-8-3004-1-py3
driver:
image: saltimages/salt-3004.1-py3:oraclelinux-8
- name: oraclelinux-7-3004-1-py3
driver:
image: saltimages/salt-3004.1-py3:oraclelinux-7
- name: arch-base-latest-3004-1-py3
driver:
image: saltimages/salt-3004.1-py3:arch-base-latest
- name: gentoo-stage3-latest-3004-1-py3
driver:
image: saltimages/salt-3004.1-py3:gentoo-stage3-latest
run_command: /sbin/init
- name: gentoo-stage3-systemd-3004-1-py3
driver:
image: saltimages/salt-3004.1-py3:gentoo-stage3-systemd
- name: almalinux-8-3004-1-py3
driver:
image: saltimages/salt-3004.1-py3:almalinux-8
- name: rockylinux-8-3004-1-py3
driver:
image: saltimages/salt-3004.1-py3:rockylinux-8
## SALT `3004.0`
- name: opensuse-leap-153-3004-0-py3
driver:
image: saltimages/salt-3004.0-py3:opensuse-leap-15.3
# Workaround to avoid intermittent failures on `opensuse-leap-15.3`:
# => SCP did not finish successfully (255): (Net::SCP::Error)
transport:
max_ssh_sessions: 1
- name: opensuse-tmbl-latest-3004-0-py3
driver:
image: saltimages/salt-3004.0-py3:opensuse-tumbleweed-latest
# Workaround to avoid intermittent failures on `opensuse-tumbleweed`:
# => SCP did not finish successfully (255): (Net::SCP::Error)
transport:
max_ssh_sessions: 1
## SALT `3003.4`
- name: debian-10-3003-4-py3
driver:
image: saltimages/salt-3003.4-py3:debian-10
run_command: /lib/systemd/systemd
- name: debian-9-3003-4-py3
driver:
image: saltimages/salt-3003.4-py3:debian-9
run_command: /lib/systemd/systemd
- name: ubuntu-2004-3003-4-py3
driver:
image: saltimages/salt-3003.4-py3:ubuntu-20.04
run_command: /lib/systemd/systemd
- name: ubuntu-1804-3003-4-py3
driver:
image: saltimages/salt-3003.4-py3:ubuntu-18.04
run_command: /lib/systemd/systemd
- name: centos-stream8-3003-4-py3
driver:
image: saltimages/salt-3003.4-py3:centos-stream8
- name: centos-7-3003-4-py3
driver:
image: saltimages/salt-3003.4-py3:centos-7
- name: amazonlinux-2-3003-4-py3
driver:
image: saltimages/salt-3003.4-py3:amazonlinux-2
- name: oraclelinux-8-3003-4-py3
driver:
image: saltimages/salt-3003.4-py3:oraclelinux-8
- name: oraclelinux-7-3003-4-py3
driver:
image: saltimages/salt-3003.4-py3:oraclelinux-7
- name: almalinux-8-3003-4-py3
driver:
image: saltimages/salt-3003.4-py3:almalinux-8
verifier:
# https://www.inspec.io/
name: inspec
sudo: true
reporter:
# cli, documentation, html, progress, json, json-min, json-rspec, junit
- cli
suites:
- name: default
provisioner:
dependencies:
- name: cron
repo: git
source: https://github.com/saltstack-formulas/cron-formula.git
state_top:
base:
'*':
- logrotate._mapdata
- cron
- logrotate
pillars:
top.sls:
base:
'*':
- logrotate
pillars_from_files:
logrotate.sls: pillar.example
verifier:
inspec_tests:
- path: test/integration/default

View file

@ -1,13 +0,0 @@
# yamllint disable rule:indentation rule:line-length
# {{ grains.get("osfinger", grains.os) }}
---
{#- use salt.slsutil.serialize to avoid encoding errors on some platforms #}
{{ salt["slsutil.serialize"](
"yaml",
map,
default_flow_style=False,
allow_unicode=True,
)
| regex_replace("^\s+'$", "'", multiline=True)
| trim
}}

View file

@ -1,22 +0,0 @@
# -*- coding: utf-8 -*-
# vim: ft=sls
---
{#- Get the `tplroot` from `tpldir` #}
{%- set tplroot = tpldir.split("/")[0] %}
{%- from tplroot ~ "/map.jinja" import logrotate with context %}
{%- set _mapdata = {
"values": logrotate,
} %}
{%- do salt["log.debug"]("### MAP.JINJA DUMP ###\n" ~ _mapdata | yaml(False)) %}
{%- set output_dir = "/temp" if grains.os_family == "Windows" else "/tmp" %}
{%- set output_file = output_dir ~ "/salt_mapdata_dump.yaml" %}
{{ tplroot }}-mapdata-dump:
file.managed:
- name: {{ output_file }}
- source: salt://{{ tplroot }}/_mapdata/_mapdata.jinja
- template: jinja
- context:
map: {{ _mapdata | yaml }}

View file

@ -3,61 +3,20 @@
include:
- logrotate
{% set ns = namespace(hourly=False) %}
{% for key, value in logrotate.jobs.items() %}
{% set contents = value.get('contents', False) %}
{% if 'hourly' in (contents or value.config) %}
{% set ns.hourly = True %}
{% break %}
{% endif %}
{% endfor %}
logrotate-config:
file.managed:
- name: {{ logrotate.conf_file }}
- source: salt://logrotate/templates/logrotate.conf.tmpl
- template: jinja
- user: {{ salt['config.get']('logrotate:config:user', logrotate.user) }}
- group: {{ salt['config.get']('logrotate:config:group', logrotate.group) }}
- mode: {{ salt['config.get']('logrotate:config:mode', '0644') }}
- context:
logrotate: {{ logrotate|tojson }}
- user: {{ salt['pillar.get']('logrotate:config:user', logrotate.user) }}
- group: {{ salt['pillar.get']('logrotate:config:group', logrotate.group) }}
- mode: {{ salt['pillar.get']('logrotate:config:mode', '644') }}
logrotate-directory:
file.directory:
- name: {{ logrotate.include_dir }}
- user: {{ salt['config.get']('logrotate:config:user', logrotate.user) }}
- group: {{ salt['config.get']('logrotate:config:group', logrotate.group) }}
- mode: '0755'
- user: {{ salt['pillar.get']('logrotate:config:user', logrotate.user) }}
- group: {{ salt['pillar.get']('logrotate:config:group', logrotate.group) }}
- mode: 755
- makedirs: True
{%- if ns.hourly %}
logrotate-hourly-config:
file.managed:
- name: {{ logrotate.hourly_conf_file }}
- user: {{ salt['config.get']('logrotate:config:user', logrotate.user) }}
- group: {{ salt['config.get']('logrotate:config:group', logrotate.group) }}
- mode: {{ salt['config.get']('logrotate:config:mode', '0644') }}
- contents:
- include {{ logrotate.hourly_include_dir }}
logrotate-hourly-directory:
file.directory:
- name: {{ logrotate.hourly_include_dir }}
- user: {{ logrotate.user }}
- group: {{ logrotate.group }}
- mode: '0755'
- makedirs: True
logrotate-hourly-cron:
file.managed:
- name: "/etc/cron.hourly/logrotate"
- source: salt://logrotate/templates/logrotate.hourly.tmpl
- template: jinja
- user: {{ salt['config.get']('logrotate:config:user', logrotate.user) }}
- group: {{ salt['config.get']('logrotate:config:group', logrotate.group) }}
- mode: '0775'
- context:
logrotate: {{ logrotate|tojson }}
{%- endif %}

View file

@ -1,20 +1,16 @@
# -*- coding: utf-8 -*-
# vim: ft=yaml
---
logrotate:
bin: /usr/sbin/logrotate
status_dir: /var/lib/logrotate
pkg: logrotate
conf_file: '/etc/logrotate.conf'
include_dir: '/etc/logrotate.d'
hourly_conf_file: '/etc/logrotate.hourly.conf'
hourly_include_dir: '/etc/logrotate.hourly.d'
user: root
group: root
service: cron
login_records_jobs: true
login_records_jobs: True
default_config:
weekly: true
weekly: True
rotate: 4
create: true
jobs: {}
create: True

View file

@ -5,4 +5,3 @@ include:
- logrotate.install
- logrotate.config
- logrotate.service
- logrotate.jobs

View file

@ -7,16 +7,9 @@ include:
{% for key, value in jobs.items() %}
{% set contents = value.get('contents', False) %}
logrotate-{{ key }}:
file.managed:
{% if 'hourly' in (contents or value.config) %}
- name: {{ logrotate.hourly_include_dir }}/{{ key.split("/")[-1] }}
- require:
- file: {{ logrotate.hourly_include_dir }}
{% else %}
- name: {{ logrotate.include_dir }}/{{ key.split("/")[-1] }}
{% endif %}
- user: {{ salt['pillar.get']('logrotate:config:user', logrotate.user) }}
- group: {{ salt['pillar.get']('logrotate:config:group', logrotate.group) }}
- mode: {{ salt['pillar.get']('logrotate:config:mode', '644') }}
@ -36,5 +29,5 @@ logrotate-{{ key }}:
data: {{ value | json }}
{% endif %}
{% endif %}
{%- endfor -%}
{% endfor %}

View file

@ -1,51 +1,25 @@
# -*- 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 ~ "/osfamilymap.yaml" as osfamilymap %}
{%- import_yaml tplroot ~ "/osmap.yaml" as osmap %}
{%- import_yaml tplroot ~ "/osfingermap.yaml" as osfingermap %}
{% import_yaml 'logrotate/defaults.yaml' as default_settings %}
{% import_yaml "logrotate/osfamilymap.yaml" as os_family_map %}
{% import_yaml "logrotate/osmap.yaml" as os_map %}
{#- Retrieve the config dict only once #}
{%- set _config = salt['config.get'](tplroot, default={}) %}
{% set osfam = salt['grains.filter_by'](
os_family_map,
grain='os_family',
) or {} %}
{% set os = salt['grains.filter_by'](
os_map,
grain='os',
) or {} %}
{%- set defaults = salt['grains.filter_by'](
default_settings,
default=tplroot,
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'
)
)
)
)
)
%}
{% do salt['defaults.merge'](default_settings['logrotate'], osfam) %}
{% do salt['defaults.merge'](default_settings['logrotate'], os) %}
{%- set config = salt['grains.filter_by'](
{'defaults': defaults},
default='defaults',
merge=_config
)
%}
{% set logrotate = salt['pillar.get'](
'logrotate:lookup',
default=default_settings['logrotate'],
merge=True,
) %}
{#- Change **logrotate** to match with your formula's name and then remove this line #}
{%- set logrotate = config %}
{#- Post-processing for specific non-YAML customisations #}
{%- if grains.os == 'MacOS' %}
{%- set macos_group = salt['cmd.run']("stat -f '%Sg' /dev/console") %}
{%- do logrotate.update({'rootgroup': macos_group}) %}
{%- endif %}

View file

@ -1,22 +1,19 @@
# -*- coding: utf-8 -*-
# vim: ft=yaml
---
Arch:
service: logrotate.timer
default_config:
tabooext: + .pacorig .pacnew .pacsave
Debian:
default_config:
compress: true
compress: True
RedHat:
pkg: cronie
service: crond
default_config:
dateext: true
dateext: True
Suse:
login_records_jobs: false
login_records_jobs: False
default_config:
dateext: true
dateext: True
compresscmd: /usr/bin/xz
uncompresscmd: /usr/bin/xzdec
Gentoo:
@ -24,12 +21,8 @@ Gentoo:
service: cronie
default_config:
tabooext: + .keep
dateext: true
dateext: True
FreeBSD:
bin: /usr/local/sbin/logrotate
status_dir: /var/run
conf_file: /usr/local/etc/logrotate.conf
hourly_conf_file: /usr/local/etc/logrotate.hourly.conf
include_dir: /usr/local/etc/logrotate.d
hourly_include_dir: /usr/local/etc/logrotate.hourly.d
group: wheel

View file

@ -1,17 +0,0 @@
# -*- 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:
login_records_jobs: false
Debian-11:
login_records_jobs: false

View file

@ -1,7 +1,3 @@
# -*- coding: utf-8 -*-
# vim: ft=yaml
---
Ubuntu:
login_records_jobs: false
default_config:
su: root syslog

View file

@ -1,3 +1,4 @@
{%- from "logrotate/map.jinja" import logrotate with context -%}
{%- set config = salt['pillar.get']('logrotate:default_config', logrotate.default_config) -%}
{%- set processed_parameters = [] -%}
@ -23,7 +24,7 @@ no{{ parameter }}
# See "man logrotate" for details.
# log files rotation period
{% for period in ['hourly', 'daily', 'weekly', 'monthly', 'yearly'] -%}
{% for period in ['hourly', 'daily', 'weekly', 'yearly'] -%}
{{ set_parameter(period) }}
{%- endfor %}

View file

@ -1,9 +0,0 @@
#!/bin/sh
{{ logrotate.bin }} -s {{ logrotate.status_dir }}/logrotate.hourly.status {{ logrotate.hourly_conf_file }}
EXITVALUE=$?
if [ $EXITVALUE != 0 ]; then
/usr/bin/logger -t logrotate "ALERT exited abnormally with [$EXITVALUE]"
fi
exit 0

View file

@ -1,17 +1,16 @@
# -*- coding: utf-8 -*-
# vim: ft=yaml
---
# vim: sts=2 ts=2 sw=2 et ai
logrotate:
# default OS values can be overridden in 'lookup' dict
# lookup:
# pkg: logrotate
# service: crond
#lookup:
#pkg: logrotate
#service: crond
default_config:
weekly: true
weekly: True
rotate: 52
create: true
compress: true
dateext: true
create: True
compress: True
dateext: True
jobs:
/tmp/var/log/mysql/error:
config:
@ -24,7 +23,7 @@ logrotate:
- create 640 root adm
- sharedscripts
mysql:
path:
path:
- /tmp/var/log/mysql/*.log
config:
- weekly
@ -35,18 +34,6 @@ logrotate:
- notifempty
- create 640 root adm
- sharedscripts
a_monthly_job:
path:
- /tmp/var/log/a_service/*.log
config:
- monthly
- missingok
- rotate 12
- compress
- delaycompress
- notifempty
- create 640 root adm
- sharedscripts
syslog:
path:
- /var/log/cron
@ -58,23 +45,7 @@ logrotate:
config:
- sharedscripts
- postrotate
- /bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || true
- endscript
nginx_high_traf:
path:
- /var/log/nginx_high_traf/*.log
config:
- hourly
- missingok
- rotate {{ 30 * 24 }} # keep 1 month's worth of hourly logs
- compress
- notifempty
- dateext
- dateformat .%Y-%m-%d-%H00
- olddir /var/log/nginx_high_traf/archive
- sharedscripts
- postrotate
- 'kill -USR1 $(cat /var/run/nginx_high_traf.pid)'
- /bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || true
- endscript
nginx:
contents: |
@ -95,3 +66,4 @@ logrotate:
invoke-rc.d nginx rotate >/dev/null 2>&1
endscript
}

View file

@ -1,30 +0,0 @@
#!/bin/sh
###############################################################################
# (A) Update `FORMULA` with `${nextRelease.version}`
###############################################################################
sed -i -e "s_^\(version:\).*_\1 ${1}_" FORMULA
###############################################################################
# (B) Use `m2r2` to convert automatically produced `.md` docs to `.rst`
###############################################################################
# Install `m2r2`
pip3 install m2r2
# Copy and then convert the `.md` docs
cp ./*.md docs/
cd docs/ || exit
m2r2 --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 ..

View file

@ -1,18 +0,0 @@
// 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'},
];

View file

@ -1,107 +0,0 @@
module.exports = {
branch: 'master',
repositoryUrl: 'https://github.com/saltstack-formulas/logrotate-formula',
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
},
},
},
};

View file

@ -1,50 +0,0 @@
# 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).

View file

@ -1,61 +1,40 @@
# frozen_string_literal: true
# encoding: utf-8
title 'Test logrotate installation'
control 'logrotate-pkg.pkg.installed' do
title 'The required package should be installed'
pkg =
case platform[:family]
when 'redhat', 'fedora'
'cronie'
else
'logrotate'
end
describe package(pkg) do
it { should be_installed }
end
case os[:name]
when 'redhat', 'centos', 'fedora'
pkg = 'cronie'
else
pkg = 'logrotate'
end
describe package(pkg) do
it { should be_installed }
end
control 'logrotate-config.file.managed' do
title 'Verify the configuration file'
describe file('/etc/logrotate.conf') do
it { should exist }
it { should be_owned_by 'root' }
it { should be_grouped_into 'root' }
its('mode') { should cmp '0644' }
end
describe file('/etc/logrotate.conf') do
it { should exist }
it { should be_owned_by 'root' }
it { should be_grouped_into 'root' }
its('mode') { should cmp '0644' }
end
control 'logrotate-directory.file.directory' do
title 'Verify the `.d` directory'
describe file('/etc/logrotate.d') do
it { should be_directory }
it { should be_owned_by 'root' }
it { should be_grouped_into 'root' }
its('mode') { should cmp '0755' }
end
describe file('/etc/logrotate.d') do
it { should be_directory }
it { should be_owned_by 'root' }
it { should be_grouped_into 'root' }
its('mode') { should cmp '0755' }
end
control 'logrotate.service.running' do
title 'The service should be installed, enabled and running'
service =
case system.platform[:family]
when 'arch'
'cronie'
when 'redhat', 'fedora'
'crond'
else
'cron'
end
describe service(service) do
it { should be_installed }
it { should be_enabled }
it { should be_running }
end
case os[:name]
when 'redhat', 'centos', 'fedora'
service = 'crond'
else
service = 'cron'
end
describe service(service) do
it { should be_installed }
it { should be_enabled }
it { should be_running }
end

View file

@ -1,4 +1,4 @@
# frozen_string_literal: true
# encoding: utf-8
title 'Test logrotate jobs configuration'
@ -61,46 +61,10 @@ describe file('/etc/logrotate.d/nginx') do
its('content') { should include 'compress' }
its('content') { should include 'delaycompress' }
its('content') { should include 'prerotate' }
its('content') do
should include 'if [ -d /etc/logrotate.d/httpd-prerotate ]; then \\'
end
its('content') { should include 'if [ -d /etc/logrotate.d/httpd-prerotate ]; then \\' }
its('content') { should include ' run-parts /etc/logrotate.d/httpd-prerotate; \\' }
its('content') { should include ' fi \\' }
its('content') { should include 'postrotate' }
its('content') { should include ' invoke-rc.d nginx rotate >/dev/null 2>&1' }
end
describe file('/etc/logrotate.hourly.d/nginx_high_traf') do
it { should be_file }
it { should be_owned_by 'root' }
it { should be_grouped_into 'root' }
its('mode') { should cmp '0644' }
its('content') { should include '/var/log/nginx_high_traf/*.log' }
its('content') { should include 'hourly' }
its('content') { should include 'missingok' }
its('content') { should include 'rotate 720' }
its('content') { should include 'compress' }
its('content') { should include 'notifempty' }
its('content') { should include 'dateext' }
its('content') { should include 'dateformat .%Y-%m-%d-%H00' }
its('content') { should include 'olddir /var/log/nginx_high_traf/archive' }
its('content') { should include 'sharedscripts' }
its('content') { should include 'postrotate' }
its('content') { should include 'kill -USR1 $(cat /var/run/nginx_high_traf.pid)' }
end
describe file('/etc/logrotate.d/a_monthly_job') do
it { should be_file }
it { should be_owned_by 'root' }
it { should be_grouped_into 'root' }
its('mode') { should cmp '0644' }
its('content') { should include '/var/log/a_service/*.log' }
its('content') { should include 'monthly' }
its('content') { should include 'missingok' }
its('content') { should include 'rotate 12' }
its('content') { should include 'compress' }
its('content') { should include 'delaycompress' }
its('content') { should include 'notifempty' }
its('content') { should include 'create 640 root adm' }
its('content') { should include 'sharedscripts' }
end

View file

@ -1,28 +1,10 @@
# -*- coding: utf-8 -*-
# vim: ft=yaml
---
name: default
title: logrotate formula
maintainer: SaltStack Formulas
license: Apache-2.0
summary: Verify that the logrotate formula is setup and configured correctly
depends:
- name: share
path: test/integration/share
name: logrotate
title: Logrotate Profile
maintainer: Eric Veiras Galisson
copyright: Eric Veiras Galisson
copyright_email: eric AT sietch-tabr DOT com
license: MIT
summary: Logrotate Compliance Profile
version: 0.1.0
supports:
- platform-name: debian
- platform-name: ubuntu
- platform-name: centos
- platform-name: fedora
- platform-name: opensuse
- platform-name: suse
- platform-name: freebsd
- platform-name: openbsd
- platform-name: amazon
- platform-name: oracle
- platform-name: arch
- platform-name: gentoo
- platform-name: almalinux
- platform-name: rocky
- platform-name: mac_os_x
- platform: windows
- os-family: linux

View file

@ -1,22 +0,0 @@
# InSpec Profile: `share`
This shows the implementation of the `share` InSpec [profile](https://github.com/inspec/inspec/blob/master/docs/profiles.md).
Its goal is to share the libraries between all profiles.
## Libraries
### `system`
The `system` library provides easy access to system dependent information:
- `system.platform`: based on `inspec.platform`, modify to values that are more consistent from a SaltStack perspective
- `system.platform[:family]` provide a family name for Arch and Gentoo
- `system.platform[:name]` append `linux` to both `amazon` and `oracle`; ensure Windows platforms are resolved as simply `windows`
- `system.platform[:release]` tweak Arch, Amazon Linux, Gentoo, openSUSE and Windows:
- `Arch` is always `base-latest`
- `Amazon Linux` release `2018` is resolved as `1`
- `Gentoo` release is trimmed to its major version number and then the init system is appended (i.e. `sysv` or `sysd`)
- `openSUSE` is resolved as `tumbleweed` if the `platform[:release]` is in date format
- `Windows` uses the widely-used release number (e.g. `8.1` or `2019-server`) in place of the actual system release version
- `system.platform[:finger]` is the concatenation of the name and the major release number (except for Ubuntu, which gives `ubuntu-20.04` for example)

View file

@ -1,25 +0,0 @@
# -*- coding: utf-8 -*-
# vim: ft=yaml
---
name: share
title: InSpec shared resources
maintainer: SaltStack Formulas
license: Apache-2.0
summary: shared resources
supports:
- platform-name: debian
- platform-name: ubuntu
- platform-name: centos
- platform-name: fedora
- platform-name: opensuse
- platform-name: suse
- platform-name: freebsd
- platform-name: openbsd
- platform-name: amazon
- platform-name: oracle
- platform-name: arch
- platform-name: gentoo
- platform-name: almalinux
- platform-name: rocky
- platform-name: mac_os_x
- platform: windows

View file

@ -1,138 +0,0 @@
# frozen_string_literal: true
# system.rb -- InSpec resources for system values
# Author: Daniel Dehennin <daniel.dehennin@ac-dijon.fr>
# Copyright (C) 2020 Daniel Dehennin <daniel.dehennin@ac-dijon.fr>
# rubocop:disable Metrics/ClassLength
class SystemResource < Inspec.resource(1)
name 'system'
attr_reader :platform
def initialize
super
@platform = build_platform
end
private
def build_platform
{
family: build_platform_family,
name: build_platform_name,
release: build_platform_release,
finger: build_platform_finger,
codename: build_platform_codename
}
end
def build_platform_family
case inspec.platform[:name]
when 'arch', 'gentoo'
inspec.platform[:name]
else
inspec.platform[:family]
end
end
def build_platform_name
case inspec.platform[:name]
when 'amazon', 'oracle', 'rocky'
"#{inspec.platform[:name]}linux"
when /^windows_/
inspec.platform[:family]
else
inspec.platform[:name]
end
end
# rubocop:disable Metrics/MethodLength,Metrics/AbcSize,Metrics/CyclomaticComplexity
def build_platform_release
case inspec.platform[:name]
when 'amazon'
# `2018` relase is named `1` in `kitchen.yml`
inspec.platform[:release].gsub(/2018.*/, '1')
when 'arch'
'base-latest'
when 'gentoo'
"#{inspec.platform[:release].split('.')[0]}-#{derive_gentoo_init_system}"
when 'mac_os_x'
inspec.command('sw_vers -productVersion').stdout.to_s
when 'opensuse'
# rubocop:disable Style/NumericLiterals,Layout/LineLength
inspec.platform[:release].to_i > 20210101 ? 'tumbleweed' : inspec.platform[:release]
# rubocop:enable Style/NumericLiterals,Layout/LineLength
when 'windows_8.1_pro'
'8.1'
when 'windows_server_2022_datacenter'
'2022-server'
when 'windows_server_2019_datacenter'
'2019-server'
when 'windows_server_2016_datacenter'
'2016-server'
else
inspec.platform[:release]
end
end
# rubocop:enable Metrics/MethodLength,Metrics/AbcSize,Metrics/CyclomaticComplexity
def derive_gentoo_init_system
inspec.command('systemctl').exist? ? 'sysd' : 'sysv'
end
def build_platform_finger
"#{build_platform_name}-#{build_finger_release}"
end
def build_finger_release
case inspec.platform[:name]
when 'ubuntu'
build_platform_release.split('.').slice(0, 2).join('.')
else
build_platform_release.split('.')[0]
end
end
# rubocop:disable Metrics/MethodLength,Metrics/CyclomaticComplexity
def build_platform_codename
case build_platform_finger
when 'ubuntu-22.04'
'jammy'
when 'ubuntu-20.04'
'focal'
when 'ubuntu-18.04'
'bionic'
when 'debian-11'
'bullseye'
when 'debian-10'
'buster'
when 'debian-9'
'stretch'
when 'almalinux-8'
"AlmaLinux #{build_platform_release} (Arctic Sphynx)"
when 'amazonlinux-2'
'Amazon Linux 2'
when 'arch-base-latest'
'Arch Linux'
when 'centos-7'
'CentOS Linux 7 (Core)'
when 'centos-8'
'CentOS Stream 8'
when 'opensuse-tumbleweed'
'openSUSE Tumbleweed'
when 'opensuse-15'
"openSUSE Leap #{build_platform_release}"
when 'oraclelinux-8', 'oraclelinux-7'
"Oracle Linux Server #{build_platform_release}"
when 'gentoo-2-sysd', 'gentoo-2-sysv'
'Gentoo/Linux'
when 'rockylinux-8'
"Rocky Linux #{build_platform_release} (Green Obsidian)"
else
''
end
end
# rubocop:enable Metrics/MethodLength,Metrics/CyclomaticComplexity
end
# rubocop:enable Metrics/ClassLength