├── logrotate ├── osmap.yaml ├── init.sls ├── templates │ ├── job.tmpl │ ├── logrotate.hourly.tmpl │ └── logrotate.conf.tmpl ├── install.sls ├── _mapdata │ ├── _mapdata.jinja │ └── init.sls ├── service.sls ├── defaults.yaml ├── osfingermap.yaml ├── osfamilymap.yaml ├── jobs.sls ├── map.jinja └── config.sls ├── commitlint.config.js ├── FORMULA ├── .rstcheck.cfg ├── .github └── workflows │ └── commitlint.yml ├── .yamllint ├── bin ├── install-hooks └── kitchen ├── .salt-lint ├── LICENSE ├── .rubocop.yml ├── test └── integration │ ├── share │ ├── inspec.yml │ ├── README.md │ └── libraries │ │ └── system.rb │ └── default │ ├── inspec.yml │ ├── README.md │ └── controls │ ├── base.rb │ └── jobs.rb ├── release-rules.js ├── Gemfile ├── pre-commit_semantic-release.sh ├── .gitignore ├── pillar.example ├── .pre-commit-config.yaml ├── CODEOWNERS ├── docs ├── README.rst ├── AUTHORS.rst └── CHANGELOG.rst ├── release.config.js ├── AUTHORS.md ├── .gitlab-ci.yml ├── .travis.yml ├── kitchen.yml ├── CHANGELOG.md └── Gemfile.lock /logrotate/osmap.yaml: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # vim: ft=yaml 3 | --- 4 | Ubuntu: 5 | login_records_jobs: false 6 | default_config: 7 | su: root syslog 8 | -------------------------------------------------------------------------------- /logrotate/init.sls: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # vim: ft=sls 3 | 4 | include: 5 | - logrotate.install 6 | - logrotate.config 7 | - logrotate.service 8 | - logrotate.jobs 9 | -------------------------------------------------------------------------------- /logrotate/templates/job.tmpl: -------------------------------------------------------------------------------- 1 | # vim: sw=2 sts=2 ts=2 sw et 2 | # 3 | # This file is managed by salt. Do not edit by hand. 4 | # 5 | {% for onepath in path %} 6 | {{ onepath }} 7 | {%- endfor %} 8 | { 9 | {%- for item in data %} 10 | {{ item }} 11 | {%- endfor %} 12 | } 13 | -------------------------------------------------------------------------------- /commitlint.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | extends: ['@commitlint/config-conventional'], 3 | rules: { 4 | 'body-max-line-length': [2, 'always', 120], 5 | 'footer-max-line-length': [2, 'always', 120], 6 | 'header-max-length': [2, 'always', 72], 7 | }, 8 | }; 9 | -------------------------------------------------------------------------------- /logrotate/install.sls: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # vim: ft=sls 3 | 4 | {% from "logrotate/map.jinja" import logrotate with context %} 5 | 6 | {% set pkgs = [logrotate.pkg] if logrotate.pkg is string else logrotate.pkg %} 7 | logrotate-pkg: 8 | pkg.installed: 9 | - pkgs: {{ pkgs | json }} 10 | -------------------------------------------------------------------------------- /FORMULA: -------------------------------------------------------------------------------- 1 | name: logrotate 2 | os: Debian, Ubuntu, Raspbian, RedHat, Fedora, CentOS, Suse, openSUSE 3 | os_family: Debian, RedHat, Suse 4 | version: 0.14.2 5 | release: 1 6 | minimum_version: 2016.11 7 | summary: logrotate formula 8 | description: Formula to setup logrotate 9 | top_level_dir: logrotate 10 | -------------------------------------------------------------------------------- /logrotate/templates/logrotate.hourly.tmpl: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | {{ logrotate.bin }} -s {{ logrotate.status_dir }}/logrotate.hourly.status {{ logrotate.hourly_conf_file }} 4 | EXITVALUE=$? 5 | if [ $EXITVALUE != 0 ]; then 6 | /usr/bin/logger -t logrotate "ALERT exited abnormally with [$EXITVALUE]" 7 | fi 8 | 9 | exit 0 10 | -------------------------------------------------------------------------------- /.rstcheck.cfg: -------------------------------------------------------------------------------- 1 | [rstcheck] 2 | report=info 3 | ignore_language=rst 4 | # salt['config.get']('roles') is misidentified as a Markdown link. 5 | # Ignore for now, but perhaps try to submit a fix upstream in rstcheck 6 | ignore_messages=(Duplicate (ex|im)plicit target.*|Hyperlink target ".*" is not referenced\.$|\(rst\) Link is formatted in Markdown style\.) 7 | -------------------------------------------------------------------------------- /.github/workflows/commitlint.yml: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # vim: ft=yaml 3 | --- 4 | name: Commitlint 5 | 'on': [pull_request] 6 | 7 | jobs: 8 | lint: 9 | runs-on: ubuntu-latest 10 | env: 11 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 12 | steps: 13 | - uses: actions/checkout@v2 14 | with: 15 | fetch-depth: 0 16 | - uses: wagoid/commitlint-github-action@v1 17 | -------------------------------------------------------------------------------- /logrotate/_mapdata/_mapdata.jinja: -------------------------------------------------------------------------------- 1 | # yamllint disable rule:indentation rule:line-length 2 | # {{ grains.get("osfinger", grains.os) }} 3 | --- 4 | {#- use salt.slsutil.serialize to avoid encoding errors on some platforms #} 5 | {{ salt["slsutil.serialize"]( 6 | "yaml", 7 | map, 8 | default_flow_style=False, 9 | allow_unicode=True, 10 | ) 11 | | regex_replace("^\s+'$", "'", multiline=True) 12 | | trim 13 | }} 14 | -------------------------------------------------------------------------------- /logrotate/service.sls: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # vim: ft=sls 3 | 4 | {% from "logrotate/map.jinja" import logrotate with context %} 5 | 6 | include: 7 | - logrotate.config 8 | - logrotate.install 9 | 10 | logrotate: 11 | service.running: 12 | - name: {{ logrotate.service }} 13 | - enable: True 14 | - require: 15 | - pkg: logrotate-pkg 16 | - file: logrotate-config 17 | - file: logrotate-directory 18 | -------------------------------------------------------------------------------- /.yamllint: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # vim: ft=yaml 3 | --- 4 | # Extend the `default` configuration provided by `yamllint` 5 | extends: 'default' 6 | 7 | rules: 8 | empty-values: 9 | forbid-in-block-mappings: true 10 | forbid-in-flow-mappings: true 11 | line-length: 12 | # Increase from default of `80` 13 | # Based on https://github.com/PyCQA/flake8-bugbear#opinionated-warnings (`B950`) 14 | max: 88 15 | octal-values: 16 | forbid-implicit-octal: true 17 | forbid-explicit-octal: true 18 | -------------------------------------------------------------------------------- /logrotate/defaults.yaml: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # vim: ft=yaml 3 | --- 4 | logrotate: 5 | bin: /usr/sbin/logrotate 6 | status_dir: /var/lib/logrotate 7 | pkg: logrotate 8 | conf_file: '/etc/logrotate.conf' 9 | include_dir: '/etc/logrotate.d' 10 | hourly_conf_file: '/etc/logrotate.hourly.conf' 11 | hourly_include_dir: '/etc/logrotate.hourly.d' 12 | user: root 13 | group: root 14 | service: cron 15 | login_records_jobs: true 16 | default_config: 17 | weekly: true 18 | rotate: 4 19 | create: true 20 | jobs: {} 21 | -------------------------------------------------------------------------------- /logrotate/osfingermap.yaml: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # vim: ft=yaml 3 | # 4 | # Setup variables using grains['osfinger'] based logic. 5 | # You just need to add the key:values for an `osfinger` that differ 6 | # from `defaults.yaml` + `osarch.yaml` + `os_family.yaml` + `osmap.yaml`. 7 | # Only add an `osfinger` which is/will be supported by the formula. 8 | # 9 | # If you do not need to provide defaults via the `os_finger` grain, 10 | # you will need to provide at least an empty dict in this file, e.g. 11 | # osfingermap: {} 12 | --- 13 | # os: Debian 14 | osfingermap: {} 15 | -------------------------------------------------------------------------------- /bin/install-hooks: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | set -o nounset # Treat unset variables as an error and immediately exit 3 | set -o errexit # If a command fails exit the whole script 4 | 5 | if [ "${DEBUG:-false}" = "true" ]; then 6 | set -x # Run the entire script in debug mode 7 | fi 8 | 9 | if ! command -v pre-commit >/dev/null 2>&1; then 10 | echo "pre-commit not found: please install or check your PATH" >&2 11 | echo "See https://pre-commit.com/#installation" >&2 12 | exit 1 13 | fi 14 | 15 | pre-commit install --install-hooks 16 | pre-commit install --hook-type commit-msg --install-hooks 17 | -------------------------------------------------------------------------------- /.salt-lint: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # vim: ft=yaml 3 | --- 4 | exclude_paths: [] 5 | rules: {} 6 | skip_list: 7 | # Using `salt-lint` for linting other files as well, such as Jinja macros/templates 8 | - 205 # Use ".sls" as a Salt State file extension 9 | # Skipping `207` and `208` because `210` is sufficient, at least for the time-being 10 | # I.e. Allows 3-digit unquoted codes to still be used, such as `644` and `755` 11 | - 207 # File modes should always be encapsulated in quotation marks 12 | - 208 # File modes should always contain a leading zero 13 | tags: [] 14 | verbosity: 1 15 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2013-2015 Salt Stack Formulas 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | -------------------------------------------------------------------------------- /.rubocop.yml: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # vim: ft=yaml 3 | --- 4 | # General overrides used across formulas in the org 5 | Layout/LineLength: 6 | # Increase from default of `80` 7 | # Based on https://github.com/PyCQA/flake8-bugbear#opinionated-warnings (`B950`) 8 | Max: 88 9 | Metrics/BlockLength: 10 | AllowedMethods: 11 | - control 12 | - describe 13 | # Increase from default of `25` 14 | Max: 30 15 | Security/YAMLLoad: 16 | Exclude: 17 | - test/integration/**/_mapdata.rb 18 | 19 | # General settings across all cops in this formula 20 | AllCops: 21 | NewCops: enable 22 | 23 | # Any offenses that should be fixed, e.g. collected via. `rubocop --auto-gen-config` 24 | -------------------------------------------------------------------------------- /test/integration/share/inspec.yml: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # vim: ft=yaml 3 | --- 4 | name: share 5 | title: InSpec shared resources 6 | maintainer: SaltStack Formulas 7 | license: Apache-2.0 8 | summary: shared resources 9 | supports: 10 | - platform-name: debian 11 | - platform-name: ubuntu 12 | - platform-name: centos 13 | - platform-name: fedora 14 | - platform-name: opensuse 15 | - platform-name: suse 16 | - platform-name: freebsd 17 | - platform-name: openbsd 18 | - platform-name: amazon 19 | - platform-name: oracle 20 | - platform-name: arch 21 | - platform-name: gentoo 22 | - platform-name: almalinux 23 | - platform-name: rocky 24 | - platform-name: mac_os_x 25 | - platform: windows 26 | -------------------------------------------------------------------------------- /release-rules.js: -------------------------------------------------------------------------------- 1 | // No release is triggered for the types commented out below. 2 | // Commits using these types will be incorporated into the next release. 3 | // 4 | // NOTE: Any changes here must be reflected in `CONTRIBUTING.md`. 5 | module.exports = [ 6 | {breaking: true, release: 'major'}, 7 | // {type: 'build', release: 'patch'}, 8 | // {type: 'chore', release: 'patch'}, 9 | // {type: 'ci', release: 'patch'}, 10 | {type: 'docs', release: 'patch'}, 11 | {type: 'feat', release: 'minor'}, 12 | {type: 'fix', release: 'patch'}, 13 | {type: 'perf', release: 'patch'}, 14 | {type: 'refactor', release: 'patch'}, 15 | {type: 'revert', release: 'patch'}, 16 | {type: 'style', release: 'patch'}, 17 | {type: 'test', release: 'patch'}, 18 | ]; 19 | -------------------------------------------------------------------------------- /logrotate/_mapdata/init.sls: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # vim: ft=sls 3 | --- 4 | {#- Get the `tplroot` from `tpldir` #} 5 | {%- set tplroot = tpldir.split("/")[0] %} 6 | {%- from tplroot ~ "/map.jinja" import logrotate with context %} 7 | 8 | {%- set _mapdata = { 9 | "values": logrotate, 10 | } %} 11 | {%- do salt["log.debug"]("### MAP.JINJA DUMP ###\n" ~ _mapdata | yaml(False)) %} 12 | 13 | {%- set output_dir = "/temp" if grains.os_family == "Windows" else "/tmp" %} 14 | {%- set output_file = output_dir ~ "/salt_mapdata_dump.yaml" %} 15 | 16 | {{ tplroot }}-mapdata-dump: 17 | file.managed: 18 | - name: {{ output_file }} 19 | - source: salt://{{ tplroot }}/_mapdata/_mapdata.jinja 20 | - template: jinja 21 | - context: 22 | map: {{ _mapdata | yaml }} 23 | -------------------------------------------------------------------------------- /test/integration/default/inspec.yml: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # vim: ft=yaml 3 | --- 4 | name: default 5 | title: logrotate formula 6 | maintainer: SaltStack Formulas 7 | license: Apache-2.0 8 | summary: Verify that the logrotate formula is setup and configured correctly 9 | depends: 10 | - name: share 11 | path: test/integration/share 12 | supports: 13 | - platform-name: debian 14 | - platform-name: ubuntu 15 | - platform-name: centos 16 | - platform-name: fedora 17 | - platform-name: opensuse 18 | - platform-name: suse 19 | - platform-name: freebsd 20 | - platform-name: openbsd 21 | - platform-name: amazon 22 | - platform-name: oracle 23 | - platform-name: arch 24 | - platform-name: gentoo 25 | - platform-name: almalinux 26 | - platform-name: rocky 27 | - platform-name: mac_os_x 28 | - platform: windows 29 | -------------------------------------------------------------------------------- /logrotate/osfamilymap.yaml: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # vim: ft=yaml 3 | --- 4 | Arch: 5 | service: logrotate.timer 6 | default_config: 7 | tabooext: + .pacorig .pacnew .pacsave 8 | Debian: 9 | login_records_jobs: false 10 | default_config: 11 | compress: true 12 | RedHat: 13 | pkg: cronie 14 | service: crond 15 | default_config: 16 | dateext: true 17 | Suse: 18 | login_records_jobs: false 19 | default_config: 20 | dateext: true 21 | compresscmd: /usr/bin/xz 22 | uncompresscmd: /usr/bin/xzdec 23 | Gentoo: 24 | pkg: app-admin/logrotate 25 | service: cronie 26 | default_config: 27 | tabooext: + .keep 28 | dateext: true 29 | FreeBSD: 30 | bin: /usr/local/sbin/logrotate 31 | status_dir: /var/run 32 | conf_file: /usr/local/etc/logrotate.conf 33 | hourly_conf_file: /usr/local/etc/logrotate.hourly.conf 34 | include_dir: /usr/local/etc/logrotate.d 35 | hourly_include_dir: /usr/local/etc/logrotate.hourly.d 36 | group: wheel 37 | -------------------------------------------------------------------------------- /bin/kitchen: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | # frozen_string_literal: true 3 | 4 | # 5 | # This file was generated by Bundler. 6 | # 7 | # The application 'kitchen' is installed as part of a gem, and 8 | # this file is here to facilitate running it. 9 | # 10 | 11 | require 'pathname' 12 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', 13 | Pathname.new(__FILE__).realpath) 14 | 15 | bundle_binstub = File.expand_path('bundle', __dir__) 16 | 17 | if File.file?(bundle_binstub) 18 | if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/ 19 | load(bundle_binstub) 20 | else 21 | abort( 22 | 'Your `bin/bundle` was not generated by Bundler, ' \ 23 | 'so this binstub cannot run. Replace `bin/bundle` by running ' \ 24 | '`bundle binstubs bundler --force`, then run this command again.' 25 | ) 26 | end 27 | end 28 | 29 | require 'rubygems' 30 | require 'bundler/setup' 31 | 32 | load Gem.bin_path('test-kitchen', 'kitchen') 33 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | source ENV.fetch('PROXY_RUBYGEMSORG', 'https://rubygems.org') 4 | 5 | # Install the `inspec` gem using `git` because versions after `4.22.22` 6 | # suppress diff output; this version fixes this for our uses. 7 | # rubocop:disable Layout/LineLength 8 | gem 'inspec', git: 'https://gitlab.com/saltstack-formulas/infrastructure/inspec', branch: 'ssf' 9 | # rubocop:enable Layout/LineLength 10 | 11 | # Install the `kitchen-docker` gem using `git` in order to gain a performance 12 | # improvement: avoid package installations which are already covered by the 13 | # `salt-image-builder` (i.e. the pre-salted images that we're using) 14 | # rubocop:disable Layout/LineLength 15 | gem 'kitchen-docker', git: 'https://gitlab.com/saltstack-formulas/infrastructure/kitchen-docker', branch: 'ssf' 16 | # rubocop:enable Layout/LineLength 17 | 18 | gem 'kitchen-inspec', '>= 2.5.0' 19 | gem 'kitchen-salt', '>= 0.7.2' 20 | 21 | # Avoid the error 'pkeys are immutable on OpenSSL 3.0' 22 | gem 'net-ssh', '>= 7.0.0' 23 | -------------------------------------------------------------------------------- /pre-commit_semantic-release.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | ############################################################################### 4 | # (A) Update `FORMULA` with `${nextRelease.version}` 5 | ############################################################################### 6 | sed -i -e "s_^\(version:\).*_\1 ${1}_" FORMULA 7 | 8 | 9 | ############################################################################### 10 | # (B) Use `m2r2` to convert automatically produced `.md` docs to `.rst` 11 | ############################################################################### 12 | 13 | # Install `m2r2` 14 | pip3 install m2r2 15 | 16 | # Copy and then convert the `.md` docs 17 | cp ./*.md docs/ 18 | cd docs/ || exit 19 | m2r2 --overwrite ./*.md 20 | 21 | # Change excess `H1` headings to `H2` in converted `CHANGELOG.rst` 22 | sed -i -e '/^=.*$/s/=/-/g' CHANGELOG.rst 23 | sed -i -e '1,4s/-/=/g' CHANGELOG.rst 24 | 25 | # Use for debugging output, when required 26 | # cat AUTHORS.rst 27 | # cat CHANGELOG.rst 28 | 29 | # Return back to the main directory 30 | cd .. 31 | -------------------------------------------------------------------------------- /test/integration/default/README.md: -------------------------------------------------------------------------------- 1 | # InSpec Profile: `default` 2 | 3 | This shows the implementation of the `default` InSpec [profile](https://github.com/inspec/inspec/blob/master/docs/profiles.md). 4 | 5 | ## Verify a profile 6 | 7 | InSpec ships with built-in features to verify a profile structure. 8 | 9 | ```bash 10 | $ inspec check default 11 | Summary 12 | ------- 13 | Location: default 14 | Profile: profile 15 | Controls: 4 16 | Timestamp: 2019-06-24T23:09:01+00:00 17 | Valid: true 18 | 19 | Errors 20 | ------ 21 | 22 | Warnings 23 | -------- 24 | ``` 25 | 26 | ## Execute a profile 27 | 28 | To run all **supported** controls on a local machine use `inspec exec /path/to/profile`. 29 | 30 | ```bash 31 | $ inspec exec default 32 | .. 33 | 34 | Finished in 0.0025 seconds (files took 0.12449 seconds to load) 35 | 8 examples, 0 failures 36 | ``` 37 | 38 | ## Execute a specific control from a profile 39 | 40 | To run one control from the profile use `inspec exec /path/to/profile --controls name`. 41 | 42 | ```bash 43 | $ inspec exec default --controls package 44 | . 45 | 46 | Finished in 0.0025 seconds (files took 0.12449 seconds to load) 47 | 1 examples, 0 failures 48 | ``` 49 | 50 | See an [example control here](https://github.com/inspec/inspec/blob/master/examples/profile/controls/example.rb). 51 | -------------------------------------------------------------------------------- /test/integration/share/README.md: -------------------------------------------------------------------------------- 1 | # InSpec Profile: `share` 2 | 3 | This shows the implementation of the `share` InSpec [profile](https://github.com/inspec/inspec/blob/master/docs/profiles.md). 4 | 5 | Its goal is to share the libraries between all profiles. 6 | 7 | ## Libraries 8 | 9 | ### `system` 10 | 11 | The `system` library provides easy access to system dependent information: 12 | 13 | - `system.platform`: based on `inspec.platform`, modify to values that are more consistent from a SaltStack perspective 14 | - `system.platform[:family]` provide a family name for Arch and Gentoo 15 | - `system.platform[:name]` append `linux` to both `amazon` and `oracle`; ensure Windows platforms are resolved as simply `windows` 16 | - `system.platform[:release]` tweak Arch, Amazon Linux, Gentoo, openSUSE and Windows: 17 | - `Arch` is always `base-latest` 18 | - `Amazon Linux` release `2018` is resolved as `1` 19 | - `Gentoo` release is trimmed to its major version number and then the init system is appended (i.e. `sysv` or `sysd`) 20 | - `openSUSE` is resolved as `tumbleweed` if the `platform[:release]` is in date format 21 | - `Windows` uses the widely-used release number (e.g. `8.1` or `2019-server`) in place of the actual system release version 22 | - `system.platform[:finger]` is the concatenation of the name and the major release number (except for Ubuntu, which gives `ubuntu-20.04` for example) 23 | -------------------------------------------------------------------------------- /logrotate/jobs.sls: -------------------------------------------------------------------------------- 1 | # vim: sts=2 ts=2 sw=2 et ai 2 | {% from "logrotate/map.jinja" import logrotate with context %} 3 | {% set jobs = salt['pillar.get']('logrotate:jobs', {}) %} 4 | 5 | include: 6 | - logrotate 7 | 8 | {% for key, value in jobs.items() %} 9 | {% set contents = value.get('contents', False) %} 10 | 11 | logrotate-{{ key }}: 12 | file.managed: 13 | {% if 'hourly' in (contents or value.config) %} 14 | - name: {{ logrotate.hourly_include_dir }}/{{ key.split("/")[-1] }} 15 | - require: 16 | - file: {{ logrotate.hourly_include_dir }} 17 | {% else %} 18 | - name: {{ logrotate.include_dir }}/{{ key.split("/")[-1] }} 19 | {% endif %} 20 | - user: {{ salt['pillar.get']('logrotate:config:user', logrotate.user) }} 21 | - group: {{ salt['pillar.get']('logrotate:config:group', logrotate.group) }} 22 | - mode: {{ salt['pillar.get']('logrotate:config:mode', '644') }} 23 | - require: 24 | - pkg: logrotate-pkg 25 | {% if contents %} 26 | - contents: {{ contents | yaml_encode }} 27 | {% else %} 28 | - source: salt://logrotate/templates/job.tmpl 29 | - template: jinja 30 | - context: 31 | {% if value is mapping %} 32 | path: {{ value.get('path', [key]) | json }} 33 | data: {{ value.get('config', []) | json }} 34 | {% else %} 35 | path: [ {{ key | json }} ] 36 | data: {{ value | json }} 37 | {% endif %} 38 | {% endif %} 39 | 40 | {% endfor %} 41 | -------------------------------------------------------------------------------- /test/integration/default/controls/base.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | title 'Test logrotate installation' 4 | 5 | control 'logrotate-pkg.pkg.installed' do 6 | title 'The required package should be installed' 7 | 8 | pkg = 9 | case platform[:family] 10 | when 'redhat', 'fedora' 11 | 'cronie' 12 | else 13 | 'logrotate' 14 | end 15 | 16 | describe package(pkg) do 17 | it { should be_installed } 18 | end 19 | end 20 | 21 | control 'logrotate-config.file.managed' do 22 | title 'Verify the configuration file' 23 | 24 | describe file('/etc/logrotate.conf') do 25 | it { should exist } 26 | it { should be_owned_by 'root' } 27 | it { should be_grouped_into 'root' } 28 | its('mode') { should cmp '0644' } 29 | end 30 | end 31 | 32 | control 'logrotate-directory.file.directory' do 33 | title 'Verify the `.d` directory' 34 | 35 | describe file('/etc/logrotate.d') do 36 | it { should be_directory } 37 | it { should be_owned_by 'root' } 38 | it { should be_grouped_into 'root' } 39 | its('mode') { should cmp '0755' } 40 | end 41 | end 42 | 43 | control 'logrotate.service.running' do 44 | title 'The service should be installed, enabled and running' 45 | 46 | service = 47 | case system.platform[:family] 48 | when 'arch' 49 | 'cronie' 50 | when 'redhat', 'fedora' 51 | 'crond' 52 | else 53 | 'cron' 54 | end 55 | 56 | describe service(service) do 57 | it { should be_installed } 58 | it { should be_enabled } 59 | it { should be_running } 60 | end 61 | end 62 | -------------------------------------------------------------------------------- /logrotate/map.jinja: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # vim: ft=jinja 3 | 4 | {#- Get the `tplroot` from `tpldir` #} 5 | {%- set tplroot = tpldir.split('/')[0] %} 6 | {#- Start imports as #} 7 | {%- import_yaml tplroot ~ "/defaults.yaml" as default_settings %} 8 | {%- import_yaml tplroot ~ "/osfamilymap.yaml" as osfamilymap %} 9 | {%- import_yaml tplroot ~ "/osmap.yaml" as osmap %} 10 | {%- import_yaml tplroot ~ "/osfingermap.yaml" as osfingermap %} 11 | 12 | {#- Retrieve the config dict only once #} 13 | {%- set _config = salt['config.get'](tplroot, default={}) %} 14 | 15 | {%- set defaults = salt['grains.filter_by']( 16 | default_settings, 17 | default=tplroot, 18 | merge=salt['grains.filter_by']( 19 | osfamilymap, 20 | grain='os_family', 21 | merge=salt['grains.filter_by']( 22 | osmap, 23 | grain='os', 24 | merge=salt['grains.filter_by']( 25 | osfingermap, 26 | grain='osfinger', 27 | merge=salt['grains.filter_by']( 28 | _config, 29 | default='lookup' 30 | ) 31 | ) 32 | ) 33 | ) 34 | ) 35 | %} 36 | 37 | {%- set config = salt['grains.filter_by']( 38 | {'defaults': defaults}, 39 | default='defaults', 40 | merge=_config 41 | ) 42 | %} 43 | 44 | {#- Change **logrotate** to match with your formula's name and then remove this line #} 45 | {%- set logrotate = config %} 46 | 47 | {#- Post-processing for specific non-YAML customisations #} 48 | {%- if grains.os == 'MacOS' %} 49 | {%- set macos_group = salt['cmd.run']("stat -f '%Sg' /dev/console") %} 50 | {%- do logrotate.update({'rootgroup': macos_group}) %} 51 | {%- endif %} 52 | -------------------------------------------------------------------------------- /logrotate/templates/logrotate.conf.tmpl: -------------------------------------------------------------------------------- 1 | {%- set config = salt['pillar.get']('logrotate:default_config', logrotate.default_config) -%} 2 | 3 | {%- set processed_parameters = [] -%} 4 | 5 | {%- macro set_parameter(parameter, default=None) -%} 6 | {%- set value = config.get(parameter, default) -%} 7 | {%- if value is not none %} 8 | {%- if value is sameas true -%} 9 | {{ parameter }} 10 | {%- elif value is sameas false -%} 11 | no{{ parameter }} 12 | {%- elif value is string or value is number -%} 13 | {{ parameter }} {{ value }} 14 | {%- else -%} 15 | {{ value }} 16 | {%- endif %} 17 | {%- do processed_parameters.append(parameter) %} 18 | {%- endif %} 19 | {%- endmacro -%} 20 | 21 | # Managed by saltstack 22 | # 23 | # See "man logrotate" for details. 24 | 25 | # log files rotation period 26 | {% for period in ['hourly', 'daily', 'weekly', 'monthly', 'yearly'] -%} 27 | {{ set_parameter(period) }} 28 | {%- endfor %} 29 | 30 | # keep x periods worth of backlogs 31 | {{ set_parameter('rotate', 4) }} 32 | 33 | # create new (empty) log files after rotating old ones 34 | {{ set_parameter('create', True) }} 35 | 36 | # use date as a suffix of the rotated file 37 | {{ set_parameter('dateext', False) }} 38 | 39 | # change this if you want your log files compressed 40 | {{ set_parameter('compress', False) }} 41 | 42 | {#- Accept arbitrary parameters #} 43 | {%- for parameter in config %} 44 | {%- if parameter not in processed_parameters %} 45 | {{ set_parameter(parameter) }} 46 | {%- endif %} 47 | {%- endfor %} 48 | 49 | # packages drop log rotation information into this directory 50 | include {{ logrotate.include_dir }} 51 | 52 | {% if logrotate.login_records_jobs -%} 53 | # no packages own wtmp and btmp -- we'll rotate them here 54 | /var/log/wtmp { 55 | monthly 56 | create 0664 root utmp 57 | minsize 1M 58 | rotate 1 59 | } 60 | 61 | /var/log/btmp { 62 | missingok 63 | monthly 64 | create 0600 root utmp 65 | rotate 1 66 | } 67 | {%- endif %} 68 | 69 | # system-specific logs may be configured here 70 | -------------------------------------------------------------------------------- /logrotate/config.sls: -------------------------------------------------------------------------------- 1 | {% from "logrotate/map.jinja" import logrotate with context %} 2 | 3 | include: 4 | - logrotate 5 | 6 | {% set ns = namespace(hourly=False) %} 7 | {% for key, value in logrotate.jobs.items() %} 8 | {% set contents = value.get('contents', False) %} 9 | {% if 'hourly' in (contents or value.config) %} 10 | {% set ns.hourly = True %} 11 | {% break %} 12 | {% endif %} 13 | {% endfor %} 14 | 15 | logrotate-config: 16 | file.managed: 17 | - name: {{ logrotate.conf_file }} 18 | - source: salt://logrotate/templates/logrotate.conf.tmpl 19 | - template: jinja 20 | - user: {{ salt['config.get']('logrotate:config:user', logrotate.user) }} 21 | - group: {{ salt['config.get']('logrotate:config:group', logrotate.group) }} 22 | - mode: {{ salt['config.get']('logrotate:config:mode', '0644') }} 23 | - context: 24 | logrotate: {{ logrotate|tojson }} 25 | 26 | logrotate-directory: 27 | file.directory: 28 | - name: {{ logrotate.include_dir }} 29 | - user: {{ salt['config.get']('logrotate:config:user', logrotate.user) }} 30 | - group: {{ salt['config.get']('logrotate:config:group', logrotate.group) }} 31 | - mode: '0755' 32 | - makedirs: True 33 | 34 | {%- if ns.hourly %} 35 | logrotate-hourly-config: 36 | file.managed: 37 | - name: {{ logrotate.hourly_conf_file }} 38 | - user: {{ salt['config.get']('logrotate:config:user', logrotate.user) }} 39 | - group: {{ salt['config.get']('logrotate:config:group', logrotate.group) }} 40 | - mode: {{ salt['config.get']('logrotate:config:mode', '0644') }} 41 | - contents: 42 | - include {{ logrotate.hourly_include_dir }} 43 | 44 | logrotate-hourly-directory: 45 | file.directory: 46 | - name: {{ logrotate.hourly_include_dir }} 47 | - user: {{ logrotate.user }} 48 | - group: {{ logrotate.group }} 49 | - mode: '0755' 50 | - makedirs: True 51 | 52 | logrotate-hourly-cron: 53 | file.managed: 54 | - name: "/etc/cron.hourly/logrotate" 55 | - source: salt://logrotate/templates/logrotate.hourly.tmpl 56 | - template: jinja 57 | - user: {{ salt['config.get']('logrotate:config:user', logrotate.user) }} 58 | - group: {{ salt['config.get']('logrotate:config:group', logrotate.group) }} 59 | - mode: '0775' 60 | - context: 61 | logrotate: {{ logrotate|tojson }} 62 | 63 | {%- endif %} 64 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | 6 | # C extensions 7 | *.so 8 | 9 | # Distribution / packaging 10 | .Python 11 | env/ 12 | build/ 13 | develop-eggs/ 14 | dist/ 15 | downloads/ 16 | eggs/ 17 | .eggs/ 18 | lib/ 19 | lib64/ 20 | parts/ 21 | sdist/ 22 | var/ 23 | wheels/ 24 | *.egg-info/ 25 | .installed.cfg 26 | *.egg 27 | 28 | # PyInstaller 29 | # Usually these files are written by a python script from a packager 30 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 31 | *.manifest 32 | *.spec 33 | 34 | # Installer logs 35 | pip-log.txt 36 | pip-delete-this-directory.txt 37 | 38 | # Unit test / coverage reports 39 | htmlcov/ 40 | .tox/ 41 | .coverage 42 | .coverage.* 43 | .cache 44 | nosetests.xml 45 | coverage.xml 46 | *.cover 47 | .hypothesis/ 48 | .kitchen 49 | .kitchen.local.yml 50 | kitchen.local.yml 51 | junit-*.xml 52 | 53 | # Translations 54 | *.mo 55 | *.pot 56 | 57 | # Django stuff: 58 | *.log 59 | local_settings.py 60 | 61 | # Flask stuff: 62 | instance/ 63 | .webassets-cache 64 | 65 | # Scrapy stuff: 66 | .scrapy 67 | 68 | # Sphinx documentation 69 | docs/_build/ 70 | 71 | # PyBuilder 72 | target/ 73 | 74 | # Jupyter Notebook 75 | .ipynb_checkpoints 76 | 77 | # pyenv 78 | .python-version 79 | 80 | # celery beat schedule file 81 | celerybeat-schedule 82 | 83 | # SageMath parsed files 84 | *.sage.py 85 | 86 | # dotenv 87 | .env 88 | 89 | # virtualenv 90 | .venv 91 | venv/ 92 | ENV/ 93 | 94 | # visual studio 95 | .vs/ 96 | 97 | # Spyder project settings 98 | .spyderproject 99 | .spyproject 100 | 101 | # Rope project settings 102 | .ropeproject 103 | 104 | # mkdocs documentation 105 | /site 106 | 107 | # mypy 108 | .mypy_cache/ 109 | 110 | # Bundler 111 | .bundle/ 112 | 113 | # copied `.md` files used for conversion to `.rst` using `m2r` 114 | docs/*.md 115 | 116 | # Vim 117 | *.sw? 118 | 119 | ## Collected when centralising formulas (check and sort) 120 | # `collectd-formula` 121 | .pytest_cache/ 122 | /.idea/ 123 | Dockerfile.*_* 124 | ignore/ 125 | tmp/ 126 | 127 | # `salt-formula` -- Vagrant Specific files 128 | .vagrant 129 | top.sls 130 | !test/salt/pillar/top.sls 131 | 132 | # `suricata-formula` -- Platform binaries 133 | *.rpm 134 | *.deb 135 | -------------------------------------------------------------------------------- /pillar.example: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # vim: ft=yaml 3 | --- 4 | logrotate: 5 | # default OS values can be overridden in 'lookup' dict 6 | # lookup: 7 | # pkg: logrotate 8 | # service: crond 9 | default_config: 10 | weekly: true 11 | rotate: 52 12 | create: true 13 | compress: true 14 | dateext: true 15 | jobs: 16 | /tmp/var/log/mysql/error: 17 | config: 18 | - weekly 19 | - missingok 20 | - rotate 52 21 | - compress 22 | - delaycompress 23 | - notifempty 24 | - create 640 root adm 25 | - sharedscripts 26 | mysql: 27 | path: 28 | - /tmp/var/log/mysql/*.log 29 | config: 30 | - weekly 31 | - missingok 32 | - rotate 52 33 | - compress 34 | - delaycompress 35 | - notifempty 36 | - create 640 root adm 37 | - sharedscripts 38 | a_monthly_job: 39 | path: 40 | - /tmp/var/log/a_service/*.log 41 | config: 42 | - monthly 43 | - missingok 44 | - rotate 12 45 | - compress 46 | - delaycompress 47 | - notifempty 48 | - create 640 root adm 49 | - sharedscripts 50 | syslog: 51 | path: 52 | - /var/log/cron 53 | - /var/log/maillog 54 | - /var/log/messages 55 | - /var/log/secure 56 | - /var/log/spooler 57 | - /var/log/slapd.log 58 | config: 59 | - sharedscripts 60 | - postrotate 61 | - /bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || true 62 | - endscript 63 | nginx_high_traf: 64 | path: 65 | - /var/log/nginx_high_traf/*.log 66 | config: 67 | - hourly 68 | - missingok 69 | - rotate {{ 30 * 24 }} # keep 1 month's worth of hourly logs 70 | - compress 71 | - notifempty 72 | - dateext 73 | - dateformat .%Y-%m-%d-%H00 74 | - olddir /var/log/nginx_high_traf/archive 75 | - sharedscripts 76 | - postrotate 77 | - 'kill -USR1 $(cat /var/run/nginx_high_traf.pid)' 78 | - endscript 79 | nginx: 80 | contents: | 81 | /var/log/nginx/*.log{ 82 | weekly 83 | missingok 84 | compress 85 | delaycompress 86 | notifempty 87 | create 0640 www-data adm 88 | sharedscripts 89 | prerotate 90 | if [ -d /etc/logrotate.d/httpd-prerotate ]; then \ 91 | run-parts /etc/logrotate.d/httpd-prerotate; \ 92 | fi \ 93 | endscript 94 | postrotate 95 | invoke-rc.d nginx rotate >/dev/null 2>&1 96 | endscript 97 | } 98 | -------------------------------------------------------------------------------- /.pre-commit-config.yaml: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # vim: ft=yaml 3 | --- 4 | # See https://pre-commit.com for more information 5 | # See https://pre-commit.com/hooks.html for more hooks 6 | ci: 7 | autofix_commit_msg: | 8 | ci(pre-commit.ci): apply auto fixes from pre-commit.com hooks 9 | 10 | For more information, see https://pre-commit.ci 11 | autofix_prs: true 12 | autoupdate_branch: '' 13 | autoupdate_commit_msg: | 14 | ci(pre-commit.ci): perform `pre-commit` autoupdate 15 | autoupdate_schedule: quarterly 16 | skip: [] 17 | submodules: false 18 | default_stages: [commit] 19 | repos: 20 | - repo: https://github.com/dafyddj/commitlint-pre-commit-hook 21 | rev: v2.3.0 22 | hooks: 23 | - id: commitlint 24 | name: Check commit message using commitlint 25 | description: Lint commit message against @commitlint/config-conventional rules 26 | stages: [commit-msg] 27 | additional_dependencies: ['@commitlint/config-conventional@17.1.0'] 28 | - repo: https://github.com/rubocop-hq/rubocop 29 | rev: v1.57.0 30 | hooks: 31 | - id: rubocop 32 | name: Check Ruby files with rubocop 33 | args: [--debug] 34 | - repo: https://github.com/shellcheck-py/shellcheck-py 35 | rev: v0.9.0.6 36 | hooks: 37 | - id: shellcheck 38 | name: Check shell scripts with shellcheck 39 | files: ^.*\.(sh|bash|ksh)$ 40 | types: [] 41 | - repo: https://github.com/adrienverge/yamllint 42 | rev: v1.32.0 43 | hooks: 44 | - id: yamllint 45 | name: Check YAML syntax with yamllint 46 | args: [--strict] 47 | types: [file] 48 | # Files to include 49 | # 1. Obvious YAML files 50 | # 2. `pillar.example` and similar files 51 | # 3. SLS files under directory `test/` which are pillar files 52 | # Files to exclude 53 | # 1. SLS files under directory `test/` which are state files 54 | # 2. `kitchen.vagrant.yml`, which contains Embedded Ruby (ERB) template syntax 55 | # 3. YAML files heavily reliant on Jinja 56 | files: | 57 | (?x)^( 58 | .*\.yaml| 59 | .*\.yml| 60 | \.salt-lint| 61 | \.yamllint| 62 | .*\.example| 63 | test/.*\.sls 64 | )$ 65 | exclude: | 66 | (?x)^( 67 | kitchen.vagrant.yml| 68 | test/.*/states/.*\.sls 69 | )$ 70 | - repo: https://github.com/warpnet/salt-lint 71 | rev: v0.9.2 72 | hooks: 73 | - id: salt-lint 74 | name: Check Salt files using salt-lint 75 | files: ^.*\.(sls|jinja|j2|tmpl|tst)$ 76 | - repo: https://github.com/myint/rstcheck 77 | rev: v6.2.0 78 | hooks: 79 | - id: rstcheck 80 | name: Check reST files using rstcheck 81 | exclude: 'docs/CHANGELOG.rst' 82 | additional_dependencies: [sphinx==7.2.6] 83 | - repo: https://github.com/saltstack-formulas/mirrors-rst-lint 84 | rev: v1.3.2 85 | hooks: 86 | - id: rst-lint 87 | name: Check reST files using rst-lint 88 | exclude: | 89 | (?x)^( 90 | docs/CHANGELOG.rst| 91 | docs/TOFS_pattern.rst| 92 | docs/CONTRIBUTING_DOCS.rst| 93 | docs/index.rst| 94 | )$ 95 | additional_dependencies: [pygments==2.16.1] 96 | -------------------------------------------------------------------------------- /CODEOWNERS: -------------------------------------------------------------------------------- 1 | # https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners 2 | 3 | # SECTION: Owner(s) for everything in the repo, unless a later match takes precedence 4 | # ************************************************************************** 5 | # *** NO GLOBAL OWNER(S) SPECIFIED *** 6 | # *** Ideally this will be defined for a healthy, well-maintained repo *** 7 | # ************************************************************************** 8 | # FILE PATTERN OWNER(S) 9 | * @NONE 10 | 11 | # SECTION: Owner(s) for specific directories 12 | # FILE PATTERN OWNER(S) 13 | 14 | # SECTION: Owner(s) for files/directories related to `semantic-release` 15 | # FILE PATTERN OWNER(S) 16 | /.github/workflows/ @saltstack-formulas/ssf 17 | /bin/install-hooks @saltstack-formulas/ssf 18 | /bin/kitchen @saltstack-formulas/ssf 19 | /docs/AUTHORS.rst @saltstack-formulas/ssf 20 | /docs/CHANGELOG.rst @saltstack-formulas/ssf 21 | /docs/TOFS_pattern.rst @saltstack-formulas/ssf 22 | /*/_mapdata/ @saltstack-formulas/ssf 23 | /*/libsaltcli.jinja @saltstack-formulas/ssf 24 | /*/libtofs.jinja @saltstack-formulas/ssf 25 | /test/integration/**/_mapdata.rb @saltstack-formulas/ssf 26 | /test/integration/**/libraries/system.rb @saltstack-formulas/ssf 27 | /test/integration/**/inspec.yml @saltstack-formulas/ssf 28 | /test/integration/**/README.md @saltstack-formulas/ssf 29 | /test/salt/pillar/top.sls @saltstack-formulas/ssf 30 | /.gitignore @saltstack-formulas/ssf 31 | /.cirrus.yml @saltstack-formulas/ssf 32 | /.gitlab-ci.yml @saltstack-formulas/ssf 33 | /.pre-commit-config.yaml @saltstack-formulas/ssf 34 | /.rstcheck.cfg @saltstack-formulas/ssf 35 | /.rubocop.yml @saltstack-formulas/ssf 36 | /.salt-lint @saltstack-formulas/ssf 37 | /.travis.yml @saltstack-formulas/ssf 38 | /.yamllint @saltstack-formulas/ssf 39 | /AUTHORS.md @saltstack-formulas/ssf 40 | /CHANGELOG.md @saltstack-formulas/ssf 41 | /CODEOWNERS @saltstack-formulas/ssf 42 | /commitlint.config.js @saltstack-formulas/ssf 43 | /FORMULA @saltstack-formulas/ssf 44 | /Gemfile @saltstack-formulas/ssf 45 | /Gemfile.lock @saltstack-formulas/ssf 46 | /kitchen.yml @saltstack-formulas/ssf 47 | /kitchen.vagrant.yml @saltstack-formulas/ssf 48 | /kitchen.windows.yml @saltstack-formulas/ssf 49 | /pre-commit_semantic-release.sh @saltstack-formulas/ssf 50 | /release-rules.js @saltstack-formulas/ssf 51 | /release.config.js @saltstack-formulas/ssf 52 | 53 | # SECTION: Owner(s) for specific files 54 | # FILE PATTERN OWNER(S) 55 | -------------------------------------------------------------------------------- /docs/README.rst: -------------------------------------------------------------------------------- 1 | .. _readme: 2 | 3 | logrotate-formula 4 | ================= 5 | 6 | |img_travis| |img_sr| 7 | 8 | .. |img_travis| image:: https://travis-ci.com/saltstack-formulas/logrotate-formula.svg?branch=master 9 | :alt: Travis CI Build Status 10 | :scale: 100% 11 | :target: https://travis-ci.com/saltstack-formulas/logrotate-formula 12 | .. |img_sr| image:: https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg 13 | :alt: Semantic Release 14 | :scale: 100% 15 | :target: https://github.com/semantic-release/semantic-release 16 | 17 | Install and configure logrotate on a machine. 18 | 19 | The config files are per OS. 20 | At the moment only Debian, RedHat, Scientific Linux and Archlinux supported with this formula 21 | 22 | .. contents:: **Table of Contents** 23 | 24 | General notes 25 | ------------- 26 | 27 | See the full `SaltStack Formulas installation and usage instructions 28 | `_. 29 | 30 | If you are interested in writing or contributing to formulas, please pay attention to the `Writing Formula Section 31 | `_. 32 | 33 | If you want to use this formula, please pay attention to the ``FORMULA`` file and/or ``git tag``, 34 | which contains the currently released version. This formula is versioned according to `Semantic Versioning `_. 35 | 36 | See `Formula Versioning Section `_ for more details. 37 | 38 | Contributing to this repo 39 | ------------------------- 40 | 41 | **Commit message formatting is significant!!** 42 | 43 | Please see `How to contribute `_ for more details. 44 | 45 | Available states 46 | ---------------- 47 | 48 | .. contents:: 49 | :local: 50 | 51 | ``logrotate`` 52 | ^^^^^^^^^^^^^ 53 | 54 | Installs the ``logrotate`` package and service/timer/cron. 55 | 56 | ``logrotate.config`` 57 | ^^^^^^^^^^^^^^^^^^^^ 58 | 59 | Manages logrotate config and include dir. 60 | 61 | ``logrotate.install`` 62 | ^^^^^^^^^^^^^^^^^^^^^ 63 | 64 | Installs the logrotate package and its dependencies. 65 | 66 | ``logrotate.jobs`` 67 | ^^^^^^^^^^^^^^^^^^ 68 | 69 | Create custom job for logrotate. 70 | 71 | ``logrotate.service`` 72 | ^^^^^^^^^^^^^^^^^^^^^ 73 | 74 | Manages the startup and running state of the logrotate service. 75 | 76 | Testing 77 | ------- 78 | 79 | Linux testing is done with ``kitchen-salt``. 80 | 81 | Requirements 82 | ^^^^^^^^^^^^ 83 | 84 | * Ruby 85 | * Docker 86 | 87 | .. code-block:: bash 88 | 89 | $ gem install bundler 90 | $ bundle install 91 | $ bin/kitchen test [platform] 92 | 93 | Where ``[platform]`` is the platform name defined in ``kitchen.yml``, 94 | e.g. ``debian-9-2019-2-py3``. 95 | 96 | ``bin/kitchen converge`` 97 | ^^^^^^^^^^^^^^^^^^^^^^^^ 98 | 99 | Creates the docker instance and runs the ``logrotate`` main state, ready for testing. 100 | 101 | ``bin/kitchen verify`` 102 | ^^^^^^^^^^^^^^^^^^^^^^ 103 | 104 | Runs the ``inspec`` tests on the actual instance. 105 | 106 | ``bin/kitchen destroy`` 107 | ^^^^^^^^^^^^^^^^^^^^^^^ 108 | 109 | Removes the docker instance. 110 | 111 | ``bin/kitchen test`` 112 | ^^^^^^^^^^^^^^^^^^^^ 113 | 114 | Runs all of the stages above in one go: i.e. ``destroy`` + ``converge`` + ``verify`` + ``destroy``. 115 | 116 | ``bin/kitchen login`` 117 | ^^^^^^^^^^^^^^^^^^^^^ 118 | 119 | Gives you SSH access to the instance for manual testing. 120 | 121 | -------------------------------------------------------------------------------- /release.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | branch: 'master', 3 | repositoryUrl: 'https://github.com/saltstack-formulas/logrotate-formula', 4 | plugins: [ 5 | ['@semantic-release/commit-analyzer', { 6 | preset: 'angular', 7 | releaseRules: './release-rules.js', 8 | }], 9 | '@semantic-release/release-notes-generator', 10 | ['@semantic-release/changelog', { 11 | changelogFile: 'CHANGELOG.md', 12 | changelogTitle: '# Changelog', 13 | }], 14 | ['@semantic-release/exec', { 15 | prepareCmd: 'sh ./pre-commit_semantic-release.sh ${nextRelease.version}', 16 | }], 17 | ['@semantic-release/git', { 18 | assets: ['*.md', 'docs/*.rst', 'FORMULA'], 19 | }], 20 | '@semantic-release/github', 21 | ], 22 | generateNotes: { 23 | preset: 'angular', 24 | writerOpts: { 25 | // Required due to upstream bug preventing all types being displayed. 26 | // Bug: https://github.com/conventional-changelog/conventional-changelog/issues/317 27 | // Fix: https://github.com/conventional-changelog/conventional-changelog/pull/410 28 | transform: (commit, context) => { 29 | const issues = [] 30 | 31 | commit.notes.forEach(note => { 32 | note.title = `BREAKING CHANGES` 33 | }) 34 | 35 | // NOTE: Any changes here must be reflected in `CONTRIBUTING.md`. 36 | if (commit.type === `feat`) { 37 | commit.type = `Features` 38 | } else if (commit.type === `fix`) { 39 | commit.type = `Bug Fixes` 40 | } else if (commit.type === `perf`) { 41 | commit.type = `Performance Improvements` 42 | } else if (commit.type === `revert`) { 43 | commit.type = `Reverts` 44 | } else if (commit.type === `docs`) { 45 | commit.type = `Documentation` 46 | } else if (commit.type === `style`) { 47 | commit.type = `Styles` 48 | } else if (commit.type === `refactor`) { 49 | commit.type = `Code Refactoring` 50 | } else if (commit.type === `test`) { 51 | commit.type = `Tests` 52 | } else if (commit.type === `build`) { 53 | commit.type = `Build System` 54 | // } else if (commit.type === `chore`) { 55 | // commit.type = `Maintenance` 56 | } else if (commit.type === `ci`) { 57 | commit.type = `Continuous Integration` 58 | } else { 59 | return 60 | } 61 | 62 | if (commit.scope === `*`) { 63 | commit.scope = `` 64 | } 65 | 66 | if (typeof commit.hash === `string`) { 67 | commit.shortHash = commit.hash.substring(0, 7) 68 | } 69 | 70 | if (typeof commit.subject === `string`) { 71 | let url = context.repository 72 | ? `${context.host}/${context.owner}/${context.repository}` 73 | : context.repoUrl 74 | if (url) { 75 | url = `${url}/issues/` 76 | // Issue URLs. 77 | commit.subject = commit.subject.replace(/#([0-9]+)/g, (_, issue) => { 78 | issues.push(issue) 79 | return `[#${issue}](${url}${issue})` 80 | }) 81 | } 82 | if (context.host) { 83 | // User URLs. 84 | commit.subject = commit.subject.replace(/\B@([a-z0-9](?:-?[a-z0-9/]){0,38})/g, (_, username) => { 85 | if (username.includes('/')) { 86 | return `@${username}` 87 | } 88 | 89 | return `[@${username}](${context.host}/${username})` 90 | }) 91 | } 92 | } 93 | 94 | // remove references that already appear in the subject 95 | commit.references = commit.references.filter(reference => { 96 | if (issues.indexOf(reference.issue) === -1) { 97 | return true 98 | } 99 | 100 | return false 101 | }) 102 | 103 | return commit 104 | }, 105 | }, 106 | }, 107 | }; 108 | -------------------------------------------------------------------------------- /test/integration/share/libraries/system.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | # system.rb -- InSpec resources for system values 4 | # Author: Daniel Dehennin 5 | # Copyright (C) 2020 Daniel Dehennin 6 | 7 | # rubocop:disable Metrics/ClassLength 8 | class SystemResource < Inspec.resource(1) 9 | name 'system' 10 | 11 | attr_reader :platform 12 | 13 | def initialize 14 | super 15 | @platform = build_platform 16 | end 17 | 18 | private 19 | 20 | def build_platform 21 | { 22 | family: build_platform_family, 23 | name: build_platform_name, 24 | release: build_platform_release, 25 | finger: build_platform_finger, 26 | codename: build_platform_codename 27 | } 28 | end 29 | 30 | def build_platform_family 31 | case inspec.platform[:name] 32 | when 'arch', 'gentoo' 33 | inspec.platform[:name] 34 | else 35 | inspec.platform[:family] 36 | end 37 | end 38 | 39 | def build_platform_name 40 | case inspec.platform[:name] 41 | when 'amazon', 'oracle', 'rocky' 42 | "#{inspec.platform[:name]}linux" 43 | when /^windows_/ 44 | inspec.platform[:family] 45 | else 46 | inspec.platform[:name] 47 | end 48 | end 49 | 50 | # rubocop:disable Metrics/MethodLength,Metrics/AbcSize,Metrics/CyclomaticComplexity 51 | def build_platform_release 52 | case inspec.platform[:name] 53 | when 'amazon' 54 | # `2018` relase is named `1` in `kitchen.yml` 55 | inspec.platform[:release].gsub(/2018.*/, '1') 56 | when 'arch' 57 | 'base-latest' 58 | when 'gentoo' 59 | "#{inspec.platform[:release].split('.')[0]}-#{derive_gentoo_init_system}" 60 | when 'mac_os_x' 61 | inspec.command('sw_vers -productVersion').stdout.to_s 62 | when 'opensuse' 63 | # rubocop:disable Style/NumericLiterals,Layout/LineLength 64 | inspec.platform[:release].to_i > 20210101 ? 'tumbleweed' : inspec.platform[:release] 65 | # rubocop:enable Style/NumericLiterals,Layout/LineLength 66 | when 'windows_8.1_pro' 67 | '8.1' 68 | when 'windows_server_2022_datacenter' 69 | '2022-server' 70 | when 'windows_server_2019_datacenter' 71 | '2019-server' 72 | when 'windows_server_2016_datacenter' 73 | '2016-server' 74 | else 75 | inspec.platform[:release] 76 | end 77 | end 78 | # rubocop:enable Metrics/MethodLength,Metrics/AbcSize,Metrics/CyclomaticComplexity 79 | 80 | def derive_gentoo_init_system 81 | inspec.command('systemctl').exist? ? 'sysd' : 'sysv' 82 | end 83 | 84 | def build_platform_finger 85 | "#{build_platform_name}-#{build_finger_release}" 86 | end 87 | 88 | def build_finger_release 89 | case inspec.platform[:name] 90 | when 'ubuntu' 91 | build_platform_release.split('.').slice(0, 2).join('.') 92 | else 93 | build_platform_release.split('.')[0] 94 | end 95 | end 96 | 97 | # rubocop:disable Metrics/MethodLength,Metrics/CyclomaticComplexity 98 | def build_platform_codename 99 | case build_platform_finger 100 | when 'ubuntu-22.04' 101 | 'jammy' 102 | when 'ubuntu-20.04' 103 | 'focal' 104 | when 'ubuntu-18.04' 105 | 'bionic' 106 | when 'debian-11' 107 | 'bullseye' 108 | when 'debian-10' 109 | 'buster' 110 | when 'debian-9' 111 | 'stretch' 112 | when 'almalinux-8' 113 | "AlmaLinux #{build_platform_release} (Arctic Sphynx)" 114 | when 'amazonlinux-2' 115 | 'Amazon Linux 2' 116 | when 'arch-base-latest' 117 | 'Arch Linux' 118 | when 'centos-7' 119 | 'CentOS Linux 7 (Core)' 120 | when 'centos-8' 121 | 'CentOS Stream 8' 122 | when 'opensuse-tumbleweed' 123 | 'openSUSE Tumbleweed' 124 | when 'opensuse-15' 125 | "openSUSE Leap #{build_platform_release}" 126 | when 'oraclelinux-8', 'oraclelinux-7' 127 | "Oracle Linux Server #{build_platform_release}" 128 | when 'gentoo-2-sysd', 'gentoo-2-sysv' 129 | 'Gentoo/Linux' 130 | when 'rockylinux-8' 131 | "Rocky Linux #{build_platform_release} (Green Obsidian)" 132 | else 133 | '' 134 | end 135 | end 136 | # rubocop:enable Metrics/MethodLength,Metrics/CyclomaticComplexity 137 | end 138 | # rubocop:enable Metrics/ClassLength 139 | -------------------------------------------------------------------------------- /test/integration/default/controls/jobs.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | title 'Test logrotate jobs configuration' 4 | 5 | describe file('/etc/logrotate.d/error') do 6 | it { should be_file } 7 | it { should be_owned_by 'root' } 8 | it { should be_grouped_into 'root' } 9 | its('mode') { should cmp '0644' } 10 | its('content') { should include '/tmp/var/log/mysql/error' } 11 | its('content') { should include 'weekly' } 12 | its('content') { should include 'missingok' } 13 | its('content') { should include 'rotate 52' } 14 | its('content') { should include 'compress' } 15 | its('content') { should include 'delaycompress' } 16 | its('content') { should include 'notifempty' } 17 | its('content') { should include 'create 640 root adm' } 18 | its('content') { should include 'sharedscripts' } 19 | end 20 | 21 | describe file('/etc/logrotate.d/mysql') do 22 | it { should be_file } 23 | it { should be_owned_by 'root' } 24 | it { should be_grouped_into 'root' } 25 | its('mode') { should cmp '0644' } 26 | its('content') { should include '/tmp/var/log/mysql/*.log' } 27 | its('content') { should include 'weekly' } 28 | its('content') { should include 'missingok' } 29 | its('content') { should include 'rotate 52' } 30 | its('content') { should include 'compress' } 31 | its('content') { should include 'delaycompress' } 32 | its('content') { should include 'notifempty' } 33 | its('content') { should include 'create 640 root adm' } 34 | its('content') { should include 'sharedscripts' } 35 | end 36 | 37 | describe file('/etc/logrotate.d/syslog') do 38 | it { should be_file } 39 | it { should be_owned_by 'root' } 40 | it { should be_grouped_into 'root' } 41 | its('mode') { should cmp '0644' } 42 | its('content') { should include '/var/log/cron' } 43 | its('content') { should include '/var/log/maillog' } 44 | its('content') { should include '/var/log/messages' } 45 | its('content') { should include '/var/log/secure' } 46 | its('content') { should include '/var/log/spooler' } 47 | its('content') { should include '/var/log/slapd.log' } 48 | its('content') { should include 'sharedscripts' } 49 | its('content') { should include 'postrotate' } 50 | its('content') { should include 'sharedscripts' } 51 | end 52 | 53 | describe file('/etc/logrotate.d/nginx') do 54 | it { should be_file } 55 | it { should be_owned_by 'root' } 56 | it { should be_grouped_into 'root' } 57 | its('mode') { should cmp '0644' } 58 | its('content') { should include '/var/log/nginx/*.log' } 59 | its('content') { should include 'weekly' } 60 | its('content') { should include 'missingok' } 61 | its('content') { should include 'compress' } 62 | its('content') { should include 'delaycompress' } 63 | its('content') { should include 'prerotate' } 64 | its('content') do 65 | should include 'if [ -d /etc/logrotate.d/httpd-prerotate ]; then \\' 66 | end 67 | its('content') { should include ' run-parts /etc/logrotate.d/httpd-prerotate; \\' } 68 | its('content') { should include ' fi \\' } 69 | its('content') { should include 'postrotate' } 70 | its('content') { should include ' invoke-rc.d nginx rotate >/dev/null 2>&1' } 71 | end 72 | 73 | describe file('/etc/logrotate.hourly.d/nginx_high_traf') do 74 | it { should be_file } 75 | it { should be_owned_by 'root' } 76 | it { should be_grouped_into 'root' } 77 | its('mode') { should cmp '0644' } 78 | its('content') { should include '/var/log/nginx_high_traf/*.log' } 79 | its('content') { should include 'hourly' } 80 | its('content') { should include 'missingok' } 81 | its('content') { should include 'rotate 720' } 82 | its('content') { should include 'compress' } 83 | its('content') { should include 'notifempty' } 84 | its('content') { should include 'dateext' } 85 | its('content') { should include 'dateformat .%Y-%m-%d-%H00' } 86 | its('content') { should include 'olddir /var/log/nginx_high_traf/archive' } 87 | its('content') { should include 'sharedscripts' } 88 | its('content') { should include 'postrotate' } 89 | its('content') { should include 'kill -USR1 $(cat /var/run/nginx_high_traf.pid)' } 90 | end 91 | 92 | describe file('/etc/logrotate.d/a_monthly_job') do 93 | it { should be_file } 94 | it { should be_owned_by 'root' } 95 | it { should be_grouped_into 'root' } 96 | its('mode') { should cmp '0644' } 97 | its('content') { should include '/var/log/a_service/*.log' } 98 | its('content') { should include 'monthly' } 99 | its('content') { should include 'missingok' } 100 | its('content') { should include 'rotate 12' } 101 | its('content') { should include 'compress' } 102 | its('content') { should include 'delaycompress' } 103 | its('content') { should include 'notifempty' } 104 | its('content') { should include 'create 640 root adm' } 105 | its('content') { should include 'sharedscripts' } 106 | end 107 | -------------------------------------------------------------------------------- /AUTHORS.md: -------------------------------------------------------------------------------- 1 | # Authors 2 | 3 | This list is sorted by the number of commits per contributor in _descending_ order. 4 | 5 | Avatar|Contributor|Contributions 6 | :-:|---|:-: 7 | @myii|[@myii](https://github.com/myii)|150 8 | @aboe76|[@aboe76](https://github.com/aboe76)|27 9 | @javierbertoli|[@javierbertoli](https://github.com/javierbertoli)|11 10 | @daks|[@daks](https://github.com/daks)|11 11 | @EvaSDK|[@EvaSDK](https://github.com/EvaSDK)|8 12 | @nmadhok|[@nmadhok](https://github.com/nmadhok)|8 13 | @fessoga5|[@fessoga5](https://github.com/fessoga5)|5 14 | @dafyddj|[@dafyddj](https://github.com/dafyddj)|5 15 | @waynegemmell|[@waynegemmell](https://github.com/waynegemmell)|5 16 | @wwentland|[@wwentland](https://github.com/wwentland)|4 17 | @asenci|[@asenci](https://github.com/asenci)|2 18 | @egarbi|[@egarbi](https://github.com/egarbi)|2 19 | @mdschmitt|[@mdschmitt](https://github.com/mdschmitt)|2 20 | @n-rodriguez|[@n-rodriguez](https://github.com/n-rodriguez)|2 21 | @puneetk|[@puneetk](https://github.com/puneetk)|2 22 | @sylvainfaivre|[@sylvainfaivre](https://github.com/sylvainfaivre)|2 23 | @abednarik|[@abednarik](https://github.com/abednarik)|1 24 | @Bilge|[@Bilge](https://github.com/Bilge)|1 25 | @baby-gnu|[@baby-gnu](https://github.com/baby-gnu)|1 26 | @gtmanfred|[@gtmanfred](https://github.com/gtmanfred)|1 27 | @dseira|[@dseira](https://github.com/dseira)|1 28 | @gravyboat|[@gravyboat](https://github.com/gravyboat)|1 29 | @mgomersbach|[@mgomersbach](https://github.com/mgomersbach)|1 30 | @mlg-lebo|[@mlg-lebo](https://github.com/mlg-lebo)|1 31 | @edwin--zhao|[@edwin--zhao](https://github.com/edwin--zhao)|1 32 | @mdubois83|[@mdubois83](https://github.com/mdubois83)|1 33 | @noelmcloughlin|[@noelmcloughlin](https://github.com/noelmcloughlin)|1 34 | 35 | --- 36 | 37 | Auto-generated by a [forked version](https://github.com/myii/maintainer) of [gaocegege/maintainer](https://github.com/gaocegege/maintainer) on 2024-12-30. 38 | -------------------------------------------------------------------------------- /docs/AUTHORS.rst: -------------------------------------------------------------------------------- 1 | .. role:: raw-html-m2r(raw) 2 | :format: html 3 | 4 | 5 | Authors 6 | ======= 7 | 8 | This list is sorted by the number of commits per contributor in *descending* order. 9 | 10 | .. list-table:: 11 | :header-rows: 1 12 | 13 | * - Avatar 14 | - Contributor 15 | - Contributions 16 | * - :raw-html-m2r:`@myii` 17 | - `@myii `_ 18 | - 150 19 | * - :raw-html-m2r:`@aboe76` 20 | - `@aboe76 `_ 21 | - 27 22 | * - :raw-html-m2r:`@javierbertoli` 23 | - `@javierbertoli `_ 24 | - 11 25 | * - :raw-html-m2r:`@daks` 26 | - `@daks `_ 27 | - 11 28 | * - :raw-html-m2r:`@EvaSDK` 29 | - `@EvaSDK `_ 30 | - 8 31 | * - :raw-html-m2r:`@nmadhok` 32 | - `@nmadhok `_ 33 | - 8 34 | * - :raw-html-m2r:`@fessoga5` 35 | - `@fessoga5 `_ 36 | - 5 37 | * - :raw-html-m2r:`@dafyddj` 38 | - `@dafyddj `_ 39 | - 5 40 | * - :raw-html-m2r:`@waynegemmell` 41 | - `@waynegemmell `_ 42 | - 5 43 | * - :raw-html-m2r:`@wwentland` 44 | - `@wwentland `_ 45 | - 4 46 | * - :raw-html-m2r:`@asenci` 47 | - `@asenci `_ 48 | - 2 49 | * - :raw-html-m2r:`@egarbi` 50 | - `@egarbi `_ 51 | - 2 52 | * - :raw-html-m2r:`@mdschmitt` 53 | - `@mdschmitt `_ 54 | - 2 55 | * - :raw-html-m2r:`@n-rodriguez` 56 | - `@n-rodriguez `_ 57 | - 2 58 | * - :raw-html-m2r:`@puneetk` 59 | - `@puneetk `_ 60 | - 2 61 | * - :raw-html-m2r:`@sylvainfaivre` 62 | - `@sylvainfaivre `_ 63 | - 2 64 | * - :raw-html-m2r:`@abednarik` 65 | - `@abednarik `_ 66 | - 1 67 | * - :raw-html-m2r:`@Bilge` 68 | - `@Bilge `_ 69 | - 1 70 | * - :raw-html-m2r:`@baby-gnu` 71 | - `@baby-gnu `_ 72 | - 1 73 | * - :raw-html-m2r:`@gtmanfred` 74 | - `@gtmanfred `_ 75 | - 1 76 | * - :raw-html-m2r:`@dseira` 77 | - `@dseira `_ 78 | - 1 79 | * - :raw-html-m2r:`@gravyboat` 80 | - `@gravyboat `_ 81 | - 1 82 | * - :raw-html-m2r:`@mgomersbach` 83 | - `@mgomersbach `_ 84 | - 1 85 | * - :raw-html-m2r:`@mlg-lebo` 86 | - `@mlg-lebo `_ 87 | - 1 88 | * - :raw-html-m2r:`@edwin--zhao` 89 | - `@edwin--zhao `_ 90 | - 1 91 | * - :raw-html-m2r:`@mdubois83` 92 | - `@mdubois83 `_ 93 | - 1 94 | * - :raw-html-m2r:`@noelmcloughlin` 95 | - `@noelmcloughlin `_ 96 | - 1 97 | 98 | 99 | ---- 100 | 101 | Auto-generated by a `forked version `_ of `gaocegege/maintainer `_ on 2024-12-30. 102 | -------------------------------------------------------------------------------- /.gitlab-ci.yml: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # vim: ft=yaml 3 | --- 4 | ############################################################################### 5 | # Define all YAML node anchors 6 | ############################################################################### 7 | .node_anchors: 8 | # `only` (also used for `except` where applicable) 9 | only_branch_master_parent_repo: &only_branch_master_parent_repo 10 | - 'master@saltstack-formulas/logrotate-formula' 11 | # `stage` 12 | stage_lint: &stage_lint 'lint' 13 | stage_release: &stage_release 'release' 14 | stage_test: &stage_test 'test' 15 | # `image` 16 | image_commitlint: &image_commitlint 'techneg/ci-commitlint:v1.1.76' 17 | image_dindruby: &image_dindruby 'techneg/ci-docker-python-ruby:v2.2.45' 18 | image_dindrubybionic: &image_dindrubybionic 'techneg/ci-docker-python-ruby:v2.2.45' 19 | image_precommit: &image_precommit 'techneg/ci-pre-commit:v2.4.10' 20 | image_rubocop: &image_rubocop 'pipelinecomponents/rubocop:latest' 21 | image_semantic-release: &image_semanticrelease 'myii/ssf-semantic-release:15.14' 22 | # `services` 23 | services_docker_dind: &services_docker_dind 24 | - 'docker:dind' 25 | # `variables` 26 | # https://forum.gitlab.com/t/gitlab-com-ci-caching-rubygems/5627/3 27 | # https://bundler.io/v1.16/bundle_config.html 28 | variables_bundler: &variables_bundler 29 | BUNDLE_CACHE_PATH: '${CI_PROJECT_DIR}/.cache/bundler' 30 | BUNDLE_WITHOUT: 'production' 31 | # `cache` 32 | cache_bundler: &cache_bundler 33 | key: '${CI_JOB_STAGE}' 34 | paths: 35 | - '${BUNDLE_CACHE_PATH}' 36 | 37 | ############################################################################### 38 | # Define stages and global variables 39 | ############################################################################### 40 | stages: 41 | - *stage_lint 42 | - *stage_test 43 | - *stage_release 44 | variables: 45 | DOCKER_DRIVER: 'overlay2' 46 | 47 | ############################################################################### 48 | # `lint` stage: `commitlint`, `pre-commit` & `rubocop` (latest, failure allowed) 49 | ############################################################################### 50 | commitlint: 51 | stage: *stage_lint 52 | image: *image_commitlint 53 | script: 54 | # Add `upstream` remote to get access to `upstream/master` 55 | - 'git remote add upstream 56 | https://gitlab.com/saltstack-formulas/logrotate-formula.git' 57 | - 'git fetch --all' 58 | # Set default commit hashes for `--from` and `--to` 59 | - 'export COMMITLINT_FROM="$(git merge-base upstream/master HEAD)"' 60 | - 'export COMMITLINT_TO="${CI_COMMIT_SHA}"' 61 | # `coqbot` adds a merge commit to test PRs on top of the latest commit in 62 | # the repo; amend this merge commit message to avoid failure 63 | - | 64 | if [ "${GITLAB_USER_LOGIN}" = "coqbot" ] \ 65 | && [ "${CI_COMMIT_BRANCH}" != "master" ]; then 66 | git commit --amend -m \ 67 | 'chore: reword coqbot merge commit message for commitlint' 68 | export COMMITLINT_TO=HEAD 69 | fi 70 | # Run `commitlint` 71 | - 'commitlint --from "${COMMITLINT_FROM}" 72 | --to "${COMMITLINT_TO}" 73 | --verbose' 74 | 75 | pre-commit: 76 | stage: *stage_lint 77 | image: *image_precommit 78 | # https://pre-commit.com/#gitlab-ci-example 79 | variables: 80 | PRE_COMMIT_HOME: '${CI_PROJECT_DIR}/.cache/pre-commit' 81 | cache: 82 | key: '${CI_JOB_NAME}' 83 | paths: 84 | - '${PRE_COMMIT_HOME}' 85 | script: 86 | - 'pre-commit run --all-files --color always --verbose' 87 | 88 | # Use a separate job for `rubocop` other than the one potentially run by `pre-commit` 89 | # - The `pre-commit` check will only be available for formulas that pass the default 90 | # `rubocop` check -- and must continue to do so 91 | # - This job is allowed to fail, so can be used for all formulas 92 | # - Furthermore, this job uses all of the latest `rubocop` features & cops, 93 | # which will help when upgrading the `rubocop` linter used in `pre-commit` 94 | rubocop: 95 | allow_failure: true 96 | stage: *stage_lint 97 | image: *image_rubocop 98 | script: 99 | - 'rubocop -d -P -S --enable-pending-cops' 100 | 101 | ############################################################################### 102 | # Define `test` template 103 | ############################################################################### 104 | .test_instance: &test_instance 105 | stage: *stage_test 106 | image: *image_dindruby 107 | services: *services_docker_dind 108 | variables: *variables_bundler 109 | cache: *cache_bundler 110 | before_script: 111 | # TODO: This should work from the env vars above automatically 112 | - 'bundle config set path "${BUNDLE_CACHE_PATH}"' 113 | - 'bundle config set without "${BUNDLE_WITHOUT}"' 114 | - 'bundle install' 115 | script: 116 | # Alternative value to consider: `${CI_JOB_NAME}` 117 | - 'bin/kitchen verify "${DOCKER_ENV_CI_JOB_NAME}"' 118 | 119 | ############################################################################### 120 | # Define `test` template (`allow_failure: true`) 121 | ############################################################################### 122 | .test_instance_failure_permitted: 123 | <<: *test_instance 124 | allow_failure: true 125 | 126 | ############################################################################### 127 | # `test` stage: each instance below uses the `test` template above 128 | ############################################################################### 129 | ## Define the rest of the matrix based on Kitchen testing 130 | # Make sure the instances listed below match up with 131 | # the `platforms` defined in `kitchen.yml` 132 | # yamllint disable rule:line-length 133 | default-debian-12-master-py3: {extends: '.test_instance'} 134 | default-debian-11-master-py3: {extends: '.test_instance'} 135 | default-ubuntu-2404-master-py3: {extends: '.test_instance'} 136 | default-ubuntu-2204-master-py3: {extends: '.test_instance'} 137 | default-fedora-40-master-py3: {extends: '.test_instance'} 138 | default-debian-12-3007-1-py3: {extends: '.test_instance'} 139 | default-debian-11-3007-1-py3: {extends: '.test_instance'} 140 | default-ubuntu-2404-3007-1-py3: {extends: '.test_instance'} 141 | default-ubuntu-2204-3007-1-py3: {extends: '.test_instance'} 142 | default-fedora-40-3007-1-py3: {extends: '.test_instance'} 143 | default-debian-12-3006-10-py3: {extends: '.test_instance'} 144 | default-debian-11-3006-10-py3: {extends: '.test_instance'} 145 | default-ubuntu-2404-3006-10-py3: {extends: '.test_instance'} 146 | default-ubuntu-2204-3006-10-py3: {extends: '.test_instance'} 147 | default-fedora-40-3006-10-py3: {extends: '.test_instance'} 148 | # yamllint enable rule:line-length 149 | 150 | ############################################################################### 151 | # `release` stage: `semantic-release` 152 | ############################################################################### 153 | semantic-release: 154 | only: *only_branch_master_parent_repo 155 | stage: *stage_release 156 | image: *image_semanticrelease 157 | variables: 158 | MAINTAINER_TOKEN: '${GH_TOKEN}' 159 | script: 160 | # Update `AUTHORS.md` 161 | - '${HOME}/go/bin/maintainer contributor' 162 | # Run `semantic-release` 163 | - 'semantic-release' 164 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # vim: ft=yaml 3 | --- 4 | ################################################################################ 5 | # NOTE: This file is UNMAINTAINED; it is provided for references purposes only. 6 | # No guarantees are tendered that this structure will work after 2020. 7 | ################################################################################ 8 | # * https://en.wikipedia.org/wiki/Travis_CI: 9 | # - "... free open-source plans were removed in [sic] the end of 2020" 10 | # - https://blog.travis-ci.com/2020-11-02-travis-ci-new-billing 11 | # - https://ropensci.org/technotes/2020/11/19/moving-away-travis/ 12 | ################################################################################ 13 | ## Machine config 14 | os: 'linux' 15 | arch: 'amd64' 16 | dist: 'bionic' 17 | version: '~> 1.0' 18 | 19 | ## Language and cache config 20 | language: 'ruby' 21 | cache: 'bundler' 22 | 23 | ## Services config 24 | services: 25 | - docker 26 | 27 | ## Script to run for the test stage 28 | script: 29 | - bin/kitchen verify "${INSTANCE}" 30 | 31 | ## Stages and jobs matrix 32 | stages: 33 | - test 34 | # # As part of the switch away from Travis CI, ensure that the `release` stage 35 | # # is not run inadvertently 36 | # - name: 'release' 37 | # if: 'branch = master AND type != pull_request' 38 | jobs: 39 | include: 40 | ## Define the test stage that runs the linters (and testing matrix, if applicable) 41 | 42 | # Run all of the linters in a single job 43 | - language: 'node_js' 44 | node_js: 'lts/*' 45 | env: 'Lint' 46 | name: 'Lint: salt-lint, yamllint, rubocop, shellcheck & commitlint' 47 | before_install: 'skip' 48 | script: 49 | # Install and run `salt-lint` 50 | - pip install --user salt-lint 51 | - git ls-files -- '*.sls' '*.jinja' '*.j2' '*.tmpl' '*.tst' 52 | | xargs salt-lint 53 | # Install and run `yamllint` 54 | # Need at least `v1.17.0` for the `yaml-files` setting 55 | - pip install --user yamllint>=1.17.0 56 | - yamllint -s . 57 | # Install and run `rubocop` 58 | - gem install rubocop 59 | - rubocop -d 60 | # Run `shellcheck` (already pre-installed in Travis) 61 | - shellcheck --version 62 | - git ls-files -- '*.sh' '*.bash' '*.ksh' 63 | | xargs shellcheck 64 | # Install and run `commitlint` 65 | - npm i -D @commitlint/config-conventional 66 | @commitlint/travis-cli 67 | - commitlint-travis 68 | 69 | # Run `pre-commit` linters in a single job 70 | - language: 'python' 71 | env: 'Lint_pre-commit' 72 | name: 'Lint: pre-commit' 73 | before_install: 'skip' 74 | cache: 75 | directories: 76 | - $HOME/.cache/pre-commit 77 | script: 78 | # Install and run `pre-commit` 79 | - pip install pre-commit==2.7.1 80 | - pre-commit run --all-files --color always --verbose 81 | - pre-commit run --color always --hook-stage manual --verbose commitlint-travis 82 | 83 | ## Define the rest of the matrix based on Kitchen testing 84 | # Make sure the instances listed below match up with 85 | # the `platforms` defined in `kitchen.yml` 86 | # - env: INSTANCE=default-debian-11-tiamat-py3 87 | # - env: INSTANCE=default-debian-10-tiamat-py3 88 | # - env: INSTANCE=default-debian-9-tiamat-py3 89 | # - env: INSTANCE=default-ubuntu-2204-tiamat-py3 90 | # - env: INSTANCE=default-ubuntu-2004-tiamat-py3 91 | # - env: INSTANCE=default-ubuntu-1804-tiamat-py3 92 | # - env: INSTANCE=default-centos-stream8-tiamat-py3 93 | # - env: INSTANCE=default-centos-7-tiamat-py3 94 | # - env: INSTANCE=default-amazonlinux-2-tiamat-py3 95 | # - env: INSTANCE=default-oraclelinux-8-tiamat-py3 96 | # - env: INSTANCE=default-oraclelinux-7-tiamat-py3 97 | # - env: INSTANCE=default-almalinux-8-tiamat-py3 98 | # - env: INSTANCE=default-rockylinux-8-tiamat-py3 99 | - env: INSTANCE=default-debian-11-master-py3 100 | - env: INSTANCE=default-debian-10-master-py3 101 | - env: INSTANCE=default-debian-9-master-py3 102 | - env: INSTANCE=default-ubuntu-2204-master-py3 103 | - env: INSTANCE=default-ubuntu-2004-master-py3 104 | - env: INSTANCE=default-ubuntu-1804-master-py3 105 | - env: INSTANCE=default-centos-stream8-master-py3 106 | - env: INSTANCE=default-centos-7-master-py3 107 | - env: INSTANCE=default-fedora-36-master-py3 108 | - env: INSTANCE=default-fedora-35-master-py3 109 | - env: INSTANCE=default-opensuse-leap-153-master-py3 110 | - env: INSTANCE=default-opensuse-tmbl-latest-master-py3 111 | - env: INSTANCE=default-amazonlinux-2-master-py3 112 | - env: INSTANCE=default-oraclelinux-8-master-py3 113 | - env: INSTANCE=default-oraclelinux-7-master-py3 114 | - env: INSTANCE=default-arch-base-latest-master-py3 115 | - env: INSTANCE=default-gentoo-stage3-latest-master-py3 116 | - env: INSTANCE=default-gentoo-stage3-systemd-master-py3 117 | - env: INSTANCE=default-almalinux-8-master-py3 118 | - env: INSTANCE=default-rockylinux-8-master-py3 119 | # - env: INSTANCE=default-debian-11-3004-1-py3 120 | # - env: INSTANCE=default-debian-10-3004-1-py3 121 | # - env: INSTANCE=default-debian-9-3004-1-py3 122 | # - env: INSTANCE=default-ubuntu-2204-3004-1-py3 123 | # - env: INSTANCE=default-ubuntu-2004-3004-1-py3 124 | # - env: INSTANCE=default-ubuntu-1804-3004-1-py3 125 | # - env: INSTANCE=default-centos-stream8-3004-1-py3 126 | # - env: INSTANCE=default-centos-7-3004-1-py3 127 | # - env: INSTANCE=default-fedora-36-3004-1-py3 128 | # - env: INSTANCE=default-fedora-35-3004-1-py3 129 | # - env: INSTANCE=default-amazonlinux-2-3004-1-py3 130 | # - env: INSTANCE=default-oraclelinux-8-3004-1-py3 131 | # - env: INSTANCE=default-oraclelinux-7-3004-1-py3 132 | # - env: INSTANCE=default-arch-base-latest-3004-1-py3 133 | # - env: INSTANCE=default-gentoo-stage3-latest-3004-1-py3 134 | # - env: INSTANCE=default-gentoo-stage3-systemd-3004-1-py3 135 | # - env: INSTANCE=default-almalinux-8-3004-1-py3 136 | # - env: INSTANCE=default-rockylinux-8-3004-1-py3 137 | # - env: INSTANCE=default-opensuse-leap-153-3004-0-py3 138 | # - env: INSTANCE=default-opensuse-tmbl-latest-3004-0-py3 139 | # - env: INSTANCE=default-debian-10-3003-4-py3 140 | # - env: INSTANCE=default-debian-9-3003-4-py3 141 | # - env: INSTANCE=default-ubuntu-2004-3003-4-py3 142 | # - env: INSTANCE=default-ubuntu-1804-3003-4-py3 143 | # - env: INSTANCE=default-centos-stream8-3003-4-py3 144 | # - env: INSTANCE=default-centos-7-3003-4-py3 145 | # - env: INSTANCE=default-amazonlinux-2-3003-4-py3 146 | # - env: INSTANCE=default-oraclelinux-8-3003-4-py3 147 | # - env: INSTANCE=default-oraclelinux-7-3003-4-py3 148 | # - env: INSTANCE=default-almalinux-8-3003-4-py3 149 | 150 | ## Define the release stage that runs `semantic-release` 151 | - stage: 'release' 152 | language: 'node_js' 153 | node_js: 'lts/*' 154 | env: 'Release' 155 | name: 'Run semantic-release inc. file updates to AUTHORS, CHANGELOG & FORMULA' 156 | before_install: 'skip' 157 | script: 158 | # Update `AUTHORS.md` 159 | - export MAINTAINER_TOKEN=${GH_TOKEN} 160 | - go get github.com/myii/maintainer 161 | - maintainer contributor 162 | 163 | # Install all dependencies required for `semantic-release` 164 | - npm i -D @semantic-release/changelog@3 165 | @semantic-release/exec@3 166 | @semantic-release/git@7 167 | deploy: 168 | provider: 'script' 169 | # Opt-in to `dpl v2` to complete the Travis build config validation (beta) 170 | # * https://docs.travis-ci.com/user/build-config-validation 171 | # Deprecated `skip_cleanup` can now be avoided, `cleanup: false` is by default 172 | edge: true 173 | # Run `semantic-release` 174 | script: 'npx semantic-release@15.14' 175 | 176 | # Notification options: `always`, `never` or `change` 177 | notifications: 178 | webhooks: 179 | if: 'repo = saltstack-formulas/logrotate-formula' 180 | urls: 181 | - https://saltstack-formulas.zulipchat.com/api/v1/external/travis?api_key=HsIq3o5QmLxdnVCKF9is0FUIpkpAY79P&stream=CI&topic=saltstack-formulas%2Flogrotate-formula&ignore_pull_requests=true 182 | on_success: always # default: always 183 | on_failure: always # default: always 184 | on_start: always # default: never 185 | on_cancel: always # default: always 186 | on_error: always # default: always 187 | -------------------------------------------------------------------------------- /kitchen.yml: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # vim: ft=yaml 3 | --- 4 | # For help on this file's format, see https://kitchen.ci/ 5 | driver: 6 | name: docker 7 | use_sudo: false 8 | privileged: true 9 | run_command: /usr/lib/systemd/systemd 10 | 11 | provisioner: 12 | name: salt_solo 13 | log_level: debug 14 | salt_install: none 15 | require_chef: false 16 | formula: logrotate 17 | salt_copy_filter: 18 | - .kitchen 19 | - .git 20 | 21 | platforms: 22 | ## SALT `master` 23 | - name: debian-12-master-py3 24 | driver: 25 | image: saltimages/salt-master-py3:debian-12 26 | run_command: /lib/systemd/systemd 27 | - name: debian-11-master-py3 28 | driver: 29 | image: saltimages/salt-master-py3:debian-11 30 | run_command: /lib/systemd/systemd 31 | - name: ubuntu-2404-master-py3 32 | driver: 33 | image: saltimages/salt-master-py3:ubuntu-24.04 34 | run_command: /lib/systemd/systemd 35 | - name: ubuntu-2204-master-py3 36 | driver: 37 | image: saltimages/salt-master-py3:ubuntu-22.04 38 | run_command: /lib/systemd/systemd 39 | - name: ubuntu-2004-master-py3 40 | driver: 41 | image: saltimages/salt-master-py3:ubuntu-20.04 42 | run_command: /lib/systemd/systemd 43 | - name: centos-stream9-master-py3 44 | driver: 45 | image: saltimages/salt-master-py3:centos-stream9 46 | - name: opensuse-leap-156-master-py3 47 | driver: 48 | image: saltimages/salt-master-py3:opensuse-leap-15.6 49 | # Workaround to avoid intermittent failures on `opensuse-leap-15.6`: 50 | # => SCP did not finish successfully (255): (Net::SCP::Error) 51 | transport: 52 | max_ssh_sessions: 1 53 | - name: opensuse-leap-155-master-py3 54 | driver: 55 | image: saltimages/salt-master-py3:opensuse-leap-15.5 56 | # Workaround to avoid intermittent failures on `opensuse-leap-15.5`: 57 | # => SCP did not finish successfully (255): (Net::SCP::Error) 58 | transport: 59 | max_ssh_sessions: 1 60 | - name: opensuse-tmbl-latest-master-py3 61 | driver: 62 | image: saltimages/salt-master-py3:opensuse-tumbleweed-latest 63 | # Workaround to avoid intermittent failures on `opensuse-tumbleweed`: 64 | # => SCP did not finish successfully (255): (Net::SCP::Error) 65 | transport: 66 | max_ssh_sessions: 1 67 | - name: fedora-41-master-py3 68 | driver: 69 | image: saltimages/salt-master-py3:fedora-41 70 | - name: fedora-40-master-py3 71 | driver: 72 | image: saltimages/salt-master-py3:fedora-40 73 | - name: amazonlinux-2023-master-py3 74 | driver: 75 | image: saltimages/salt-master-py3:amazonlinux-2023 76 | - name: oraclelinux-9-master-py3 77 | driver: 78 | image: saltimages/salt-master-py3:oraclelinux-9 79 | - name: oraclelinux-8-master-py3 80 | driver: 81 | image: saltimages/salt-master-py3:oraclelinux-8 82 | - name: almalinux-9-master-py3 83 | driver: 84 | image: saltimages/salt-master-py3:almalinux-9 85 | - name: almalinux-8-master-py3 86 | driver: 87 | image: saltimages/salt-master-py3:almalinux-8 88 | - name: rockylinux-9-master-py3 89 | driver: 90 | image: saltimages/salt-master-py3:rockylinux-9 91 | - name: rockylinux-8-master-py3 92 | driver: 93 | image: saltimages/salt-master-py3:rockylinux-8 94 | 95 | ## SALT `3007.1` 96 | - name: debian-12-3007-1-py3 97 | driver: 98 | image: saltimages/salt-3007.1-py3:debian-12 99 | run_command: /lib/systemd/systemd 100 | - name: debian-11-3007-1-py3 101 | driver: 102 | image: saltimages/salt-3007.1-py3:debian-11 103 | run_command: /lib/systemd/systemd 104 | - name: ubuntu-2404-3007-1-py3 105 | driver: 106 | image: saltimages/salt-3007.1-py3:ubuntu-24.04 107 | run_command: /lib/systemd/systemd 108 | - name: ubuntu-2204-3007-1-py3 109 | driver: 110 | image: saltimages/salt-3007.1-py3:ubuntu-22.04 111 | run_command: /lib/systemd/systemd 112 | - name: ubuntu-2004-3007-1-py3 113 | driver: 114 | image: saltimages/salt-3007.1-py3:ubuntu-20.04 115 | run_command: /lib/systemd/systemd 116 | - name: centos-stream9-3007-1-py3 117 | driver: 118 | image: saltimages/salt-3007.1-py3:centos-stream9 119 | - name: opensuse-leap-155-3007-1-py3 120 | driver: 121 | image: saltimages/salt-3007.1-py3:opensuse-leap-15.5 122 | # Workaround to avoid intermittent failures on `opensuse-leap-15.5`: 123 | # => SCP did not finish successfully (255): (Net::SCP::Error) 124 | transport: 125 | max_ssh_sessions: 1 126 | - name: opensuse-leap-156-3007-1-py3 127 | driver: 128 | image: saltimages/salt-3007.1-py3:opensuse-leap-15.6 129 | # Workaround to avoid intermittent failures on `opensuse-leap-15.6`: 130 | # => SCP did not finish successfully (255): (Net::SCP::Error) 131 | transport: 132 | max_ssh_sessions: 1 133 | - name: opensuse-tmbl-latest-3007-1-py3 134 | driver: 135 | image: saltimages/salt-3007.1-py3:opensuse-tumbleweed-latest 136 | # Workaround to avoid intermittent failures on `opensuse-tumbleweed`: 137 | # => SCP did not finish successfully (255): (Net::SCP::Error) 138 | transport: 139 | max_ssh_sessions: 1 140 | - name: fedora-41-3007-1-py3 141 | driver: 142 | image: saltimages/salt-3007.1-py3:fedora-41 143 | - name: fedora-40-3007-1-py3 144 | driver: 145 | image: saltimages/salt-3007.1-py3:fedora-40 146 | - name: amazonlinux-2023-3007-1-py3 147 | driver: 148 | image: saltimages/salt-3007.1-py3:amazonlinux-2023 149 | - name: amazonlinux-2-3007-1-py3 150 | driver: 151 | image: saltimages/salt-3007.1-py3:amazonlinux-2 152 | - name: oraclelinux-9-3007-1-py3 153 | driver: 154 | image: saltimages/salt-3007.1-py3:oraclelinux-9 155 | - name: oraclelinux-8-3007-1-py3 156 | driver: 157 | image: saltimages/salt-3007.1-py3:oraclelinux-8 158 | - name: almalinux-9-3007-1-py3 159 | driver: 160 | image: saltimages/salt-3007.1-py3:almalinux-9 161 | - name: almalinux-8-3007-1-py3 162 | driver: 163 | image: saltimages/salt-3007.1-py3:almalinux-8 164 | - name: rockylinux-9-3007-1-py3 165 | driver: 166 | image: saltimages/salt-3007.1-py3:rockylinux-9 167 | - name: rockylinux-8-3007-1-py3 168 | driver: 169 | image: saltimages/salt-3007.1-py3:rockylinux-8 170 | 171 | ## SALT `3006.10` 172 | - name: debian-12-3006-10-py3 173 | driver: 174 | image: saltimages/salt-3006.10-py3:debian-12 175 | run_command: /lib/systemd/systemd 176 | - name: debian-11-3006-10-py3 177 | driver: 178 | image: saltimages/salt-3006.10-py3:debian-11 179 | run_command: /lib/systemd/systemd 180 | - name: ubuntu-2404-3006-10-py3 181 | driver: 182 | image: saltimages/salt-3006.10-py3:ubuntu-24.04 183 | run_command: /lib/systemd/systemd 184 | - name: ubuntu-2204-3006-10-py3 185 | driver: 186 | image: saltimages/salt-3006.10-py3:ubuntu-22.04 187 | run_command: /lib/systemd/systemd 188 | - name: ubuntu-2004-3006-10-py3 189 | driver: 190 | image: saltimages/salt-3006.10-py3:ubuntu-20.04 191 | run_command: /lib/systemd/systemd 192 | - name: centos-stream9-3006-10-py3 193 | driver: 194 | image: saltimages/salt-3006.10-py3:centos-stream9 195 | - name: opensuse-tmbl-latest-3006-10-py3 196 | driver: 197 | image: saltimages/salt-3006.10-py3:opensuse-tumbleweed-latest 198 | # Workaround to avoid intermittent failures on `opensuse-tumbleweed`: 199 | # => SCP did not finish successfully (255): (Net::SCP::Error) 200 | transport: 201 | max_ssh_sessions: 1 202 | - name: opensuse-leap-156-3006-10-py3 203 | driver: 204 | image: saltimages/salt-3006.10-py3:opensuse-leap-15.6 205 | # Workaround to avoid intermittent failures on `opensuse-leap-15.6`: 206 | # => SCP did not finish successfully (255): (Net::SCP::Error) 207 | transport: 208 | max_ssh_sessions: 1 209 | - name: opensuse-leap-155-3006-10-py3 210 | driver: 211 | image: saltimages/salt-3006.10-py3:opensuse-leap-15.5 212 | # Workaround to avoid intermittent failures on `opensuse-leap-15.5`: 213 | # => SCP did not finish successfully (255): (Net::SCP::Error) 214 | transport: 215 | max_ssh_sessions: 1 216 | - name: fedora-41-3006-10-py3 217 | driver: 218 | image: saltimages/salt-3006.10-py3:fedora-41 219 | - name: fedora-40-3006-10-py3 220 | driver: 221 | image: saltimages/salt-3006.10-py3:fedora-40 222 | - name: amazonlinux-2023-3006-10-py3 223 | driver: 224 | image: saltimages/salt-3006.10-py3:amazonlinux-2023 225 | - name: amazonlinux-2-3006-10-py3 226 | driver: 227 | image: saltimages/salt-3006.10-py3:amazonlinux-2 228 | - name: oraclelinux-9-3006-10-py3 229 | driver: 230 | image: saltimages/salt-3006.10-py3:oraclelinux-9 231 | - name: oraclelinux-8-3006-10-py3 232 | driver: 233 | image: saltimages/salt-3006.10-py3:oraclelinux-8 234 | - name: almalinux-9-3006-10-py3 235 | driver: 236 | image: saltimages/salt-3006.10-py3:almalinux-9 237 | - name: almalinux-8-3006-10-py3 238 | driver: 239 | image: saltimages/salt-3006.10-py3:almalinux-8 240 | - name: rockylinux-9-3006-10-py3 241 | driver: 242 | image: saltimages/salt-3006.10-py3:rockylinux-9 243 | - name: rockylinux-8-3006-10-py3 244 | driver: 245 | image: saltimages/salt-3006.10-py3:rockylinux-8 246 | 247 | verifier: 248 | # https://www.inspec.io/ 249 | name: inspec 250 | sudo: true 251 | reporter: 252 | # cli, documentation, html, progress, json, json-min, json-rspec, junit 253 | - cli 254 | 255 | suites: 256 | - name: default 257 | provisioner: 258 | dependencies: 259 | - name: cron 260 | repo: git 261 | source: https://github.com/saltstack-formulas/cron-formula.git 262 | state_top: 263 | base: 264 | '*': 265 | - logrotate._mapdata 266 | - cron 267 | - logrotate 268 | pillars: 269 | top.sls: 270 | base: 271 | '*': 272 | - logrotate 273 | pillars_from_files: 274 | logrotate.sls: pillar.example 275 | verifier: 276 | inspec_tests: 277 | - path: test/integration/default 278 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | ## [0.14.2](https://github.com/saltstack-formulas/logrotate-formula/compare/v0.14.1...v0.14.2) (2024-12-30) 4 | 5 | 6 | ### Bug Fixes 7 | 8 | * **debian:** disable login_records, they are managed by the package ([db1ada0](https://github.com/saltstack-formulas/logrotate-formula/commit/db1ada02e820d18eb74355278d8085127f8e9573)) 9 | 10 | ## [0.14.1](https://github.com/saltstack-formulas/logrotate-formula/compare/v0.14.0...v0.14.1) (2024-12-17) 11 | 12 | 13 | ### Tests 14 | 15 | * **pre-commit:** update pre-commit hooks ([f4ab681](https://github.com/saltstack-formulas/logrotate-formula/commit/f4ab6819a17f710e32353adce49ec9a2a03083db)) 16 | 17 | # [0.14.0](https://github.com/saltstack-formulas/logrotate-formula/compare/v0.13.2...v0.14.0) (2022-08-29) 18 | 19 | 20 | ### Continuous Integration 21 | 22 | * update `pre-commit` configuration inc. for pre-commit.ci [skip ci] ([df61825](https://github.com/saltstack-formulas/logrotate-formula/commit/df618259eb5b6111138638bef00b07d9383e9570)) 23 | * **kitchen+gitlab:** update for new pre-salted images [skip ci] ([af19654](https://github.com/saltstack-formulas/logrotate-formula/commit/af196541ad64be2e85c9eb8204f8ce08fcd321dd)) 24 | 25 | 26 | ### Features 27 | 28 | * **osfingermap:** add Debian-11 entry to osfingermap.yaml ([756769a](https://github.com/saltstack-formulas/logrotate-formula/commit/756769aeca802cd8586f780b4b0eaeaa22a07fed)) 29 | 30 | 31 | ### Tests 32 | 33 | * **system.rb:** add support for `mac_os_x` [skip ci] ([e8d4e7e](https://github.com/saltstack-formulas/logrotate-formula/commit/e8d4e7eb9e54e6cd510461afc76ed82522346891)) 34 | 35 | ## [0.13.2](https://github.com/saltstack-formulas/logrotate-formula/compare/v0.13.1...v0.13.2) (2022-03-28) 36 | 37 | 38 | ### Bug Fixes 39 | 40 | * **conf:** add 'monthly' interval ([b6cc8a9](https://github.com/saltstack-formulas/logrotate-formula/commit/b6cc8a908482997ecd84ac6bbce0607bd759df47)) 41 | 42 | 43 | ### Tests 44 | 45 | * **jobs:** add a monthly job test ([957e689](https://github.com/saltstack-formulas/logrotate-formula/commit/957e6897c052840a16bdd281b3e96132c4f37c01)) 46 | * **jobs:** reorder parameters to match pillar ([3bdc11b](https://github.com/saltstack-formulas/logrotate-formula/commit/3bdc11b5c2b2f2b60d8dfe7b3a493fce532b0c6e)) 47 | 48 | ## [0.13.1](https://github.com/saltstack-formulas/logrotate-formula/compare/v0.13.0...v0.13.1) (2022-02-22) 49 | 50 | 51 | ### Bug Fixes 52 | 53 | * **ubuntu:** removed breaking wtmp btmp ([012bfef](https://github.com/saltstack-formulas/logrotate-formula/commit/012bfef7d7733300059375edaf9b93aca343cd4d)) 54 | 55 | 56 | ### Continuous Integration 57 | 58 | * update linters to latest versions [skip ci] ([eb6d2ea](https://github.com/saltstack-formulas/logrotate-formula/commit/eb6d2ea9be3f8203e5e48c3c579614f6761b4e8d)) 59 | * **gemfile:** allow rubygems proxy to be provided as an env var [skip ci] ([d545fb2](https://github.com/saltstack-formulas/logrotate-formula/commit/d545fb2278b0b1c702f39d59228d0a74406aa3d2)) 60 | * **kitchen+gitlab:** update for new pre-salted images [skip ci] ([d71215b](https://github.com/saltstack-formulas/logrotate-formula/commit/d71215bd8174decbec56fa9a5b098564ab7b3584)) 61 | 62 | 63 | ### Tests 64 | 65 | * **system:** add `build_platform_codename` [skip ci] ([4722110](https://github.com/saltstack-formulas/logrotate-formula/commit/4722110f28e5a286f23292084026cd3c521bb38f)) 66 | 67 | # [0.13.0](https://github.com/saltstack-formulas/logrotate-formula/compare/v0.12.0...v0.13.0) (2022-01-14) 68 | 69 | 70 | ### Continuous Integration 71 | 72 | * **gemfile+lock:** use `ssf` customised `inspec` repo [skip ci] ([27829b8](https://github.com/saltstack-formulas/logrotate-formula/commit/27829b8969162dcf2deb27b4135ac1dec651348d)) 73 | * **kitchen:** move `provisioner` block & update `run_command` [skip ci] ([42bde9c](https://github.com/saltstack-formulas/logrotate-formula/commit/42bde9c5f53bc9c897b9fa6ccb0fd50c251b2fe8)) 74 | * **kitchen:** use `cron-formula` dependency instead of `cron` state ([4cf2808](https://github.com/saltstack-formulas/logrotate-formula/commit/4cf2808840cc8701347b81018ad41603c534cc0b)) 75 | * **kitchen+ci:** update with `3004` pre-salted images/boxes [skip ci] ([bacce6e](https://github.com/saltstack-formulas/logrotate-formula/commit/bacce6ea8935bfafb56b16aaa217b5b03a8b9168)) 76 | * **kitchen+ci:** update with latest `3003.2` pre-salted images [skip ci] ([e6ee323](https://github.com/saltstack-formulas/logrotate-formula/commit/e6ee323f87819acce9b54f36fb8cfa9ca55c6241)) 77 | * **kitchen+ci:** update with latest CVE pre-salted images [skip ci] ([a1dd441](https://github.com/saltstack-formulas/logrotate-formula/commit/a1dd4415e54651bb021a068fe0cd8cd0e883a827)) 78 | * add Debian 11 Bullseye & update `yamllint` configuration [skip ci] ([0e63e18](https://github.com/saltstack-formulas/logrotate-formula/commit/0e63e188eff36282a5c5a3525afb3c7a6cfc7676)) 79 | 80 | 81 | ### Features 82 | 83 | * **hourly:** add configuration to enable hourly jobs ([7b5676b](https://github.com/saltstack-formulas/logrotate-formula/commit/7b5676b9e267fb9bc7b610040a113fa870ee3d23)) 84 | * **hourly:** add hourly job def to pillar.example ([cd4cd1d](https://github.com/saltstack-formulas/logrotate-formula/commit/cd4cd1d670b1a83b6a58dcaa96bd0db6ce380a2e)) 85 | 86 | 87 | ### Tests 88 | 89 | * **alma+rocky:** add platforms (finalise dc63042) [skip ci] ([e4ad016](https://github.com/saltstack-formulas/logrotate-formula/commit/e4ad016b97293e8e4d74864c6afbfdeb308b38bf)) 90 | * **base:** re-enable Arch Linux test (possible due to `cron-formula`) ([2136711](https://github.com/saltstack-formulas/logrotate-formula/commit/2136711a12ba4e1989afa160808d5a2851f25793)) 91 | * **jobs:** add `hourly` test ([69677b0](https://github.com/saltstack-formulas/logrotate-formula/commit/69677b0c02623d4c4c7954e39c7225864abf9d87)) 92 | 93 | # [0.12.0](https://github.com/saltstack-formulas/logrotate-formula/compare/v0.11.5...v0.12.0) (2021-07-07) 94 | 95 | 96 | ### Continuous Integration 97 | 98 | * **3003.1:** update inc. AlmaLinux, Rocky & `rst-lint` [skip ci] ([bb6bfac](https://github.com/saltstack-formulas/logrotate-formula/commit/bb6bfac80eade092222776d63040248ddd6bce6e)) 99 | * **commitlint:** ensure `upstream/master` uses main repo URL [skip ci] ([ac5a57c](https://github.com/saltstack-formulas/logrotate-formula/commit/ac5a57c76d171492bb87be9476514e26d32016d2)) 100 | * **gemfile+lock:** use `ssf` customised `kitchen-docker` repo [skip ci] ([7368305](https://github.com/saltstack-formulas/logrotate-formula/commit/7368305919c2ac67e94e5c1f017e909957733659)) 101 | * **kitchen+gitlab:** remove Ubuntu 16.04 & Fedora 32 (EOL) [skip ci] ([1f55b57](https://github.com/saltstack-formulas/logrotate-formula/commit/1f55b57a61278f96926566aa48c25026e5740e24)) 102 | * add `arch-master` to matrix and update `.travis.yml` [skip ci] ([84b2f6a](https://github.com/saltstack-formulas/logrotate-formula/commit/84b2f6aa991da969a28c455e6b7f8b4ed69d8ce9)) 103 | * **gitlab-ci:** add `rubocop` linter (with `allow_failure`) [skip ci] ([1fc52cd](https://github.com/saltstack-formulas/logrotate-formula/commit/1fc52cd2339c8ecef93de9fca4b9edcfd16464c3)) 104 | * **gitlab-ci:** use GitLab CI as Travis CI replacement ([94c2cf7](https://github.com/saltstack-formulas/logrotate-formula/commit/94c2cf7d2cc49802fda5baee93efcc1509227ffe)) 105 | * **kitchen+ci:** use latest pre-salted images (after CVE) [skip ci] ([406dbbb](https://github.com/saltstack-formulas/logrotate-formula/commit/406dbbb4e594bc9ff14267f39d3acaca77510860)) 106 | * **kitchen+gitlab:** adjust matrix to add `3003` [skip ci] ([b198955](https://github.com/saltstack-formulas/logrotate-formula/commit/b198955b5f324323c51dbdac13ea5825f424656f)) 107 | * **kitchen+gitlab-ci:** use latest pre-salted images [skip ci] ([ea66a0d](https://github.com/saltstack-formulas/logrotate-formula/commit/ea66a0d2b85635dc66088caac94614191a772a9d)) 108 | * **pre-commit:** add to formula [skip ci] ([e506d69](https://github.com/saltstack-formulas/logrotate-formula/commit/e506d6954ddba83146afc98e9338e68a8ffbfcb6)) 109 | * **pre-commit:** enable/disable `rstcheck` as relevant [skip ci] ([267bb94](https://github.com/saltstack-formulas/logrotate-formula/commit/267bb944a4b889234b438b46bf03e7b8d13482b4)) 110 | * **pre-commit:** finalise `rstcheck` configuration [skip ci] ([bd1dc81](https://github.com/saltstack-formulas/logrotate-formula/commit/bd1dc81dcbf7f031cb58ce74cb43443194a24b1d)) 111 | * **pre-commit:** update hook for `rubocop` [skip ci] ([2c964b0](https://github.com/saltstack-formulas/logrotate-formula/commit/2c964b09e4b3450356e5bc1bac7a880fc2cbed18)) 112 | 113 | 114 | ### Features 115 | 116 | * **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) 117 | 118 | 119 | ### Tests 120 | 121 | * **alma+rocky:** add platforms (based on CentOS 8) [skip ci] ([dc63042](https://github.com/saltstack-formulas/logrotate-formula/commit/dc630420a5715f26276707adf00866ef882d4cb4)) 122 | * standardise use of `share` suite & `_mapdata` state [skip ci] ([650cfad](https://github.com/saltstack-formulas/logrotate-formula/commit/650cfaddf026badfb926bb39643021d9d4918880)) 123 | * **base:** update from `template-formula` and Arch Linux exclusion ([09d4f5a](https://github.com/saltstack-formulas/logrotate-formula/commit/09d4f5a0341f1f4c5644742631c749f1cb78409d)) 124 | * **rubocop:** fix violation [skip ci] ([3f5edef](https://github.com/saltstack-formulas/logrotate-formula/commit/3f5edefc18b606fbb205de22d0286393714750e6)) 125 | 126 | ## [0.11.5](https://github.com/saltstack-formulas/logrotate-formula/compare/v0.11.4...v0.11.5) (2020-06-29) 127 | 128 | 129 | ### Bug Fixes 130 | 131 | * **debian-10:** disable login_records, they're managed by the package ([335c9e6](https://github.com/saltstack-formulas/logrotate-formula/commit/335c9e63087a4d6b93d1283547cc4094bcf5d581)) 132 | 133 | 134 | ### Continuous Integration 135 | 136 | * **kitchen:** use `saltimages` Docker Hub where available [skip ci] ([8f32221](https://github.com/saltstack-formulas/logrotate-formula/commit/8f32221ba450b14db5227f4a579cdcfd1876a67d)) 137 | * **kitchen+travis:** use latest pre-salted images [skip ci] ([e18246d](https://github.com/saltstack-formulas/logrotate-formula/commit/e18246d89bc83097ae1ee1ab887b884b7a2ad84d)) 138 | * **travis:** add notifications => zulip [skip ci] ([d1c1a81](https://github.com/saltstack-formulas/logrotate-formula/commit/d1c1a81aa2a6ff62796dfa04aba6e093a2129a5e)) 139 | 140 | ## [0.11.4](https://github.com/saltstack-formulas/logrotate-formula/compare/v0.11.3...v0.11.4) (2020-05-07) 141 | 142 | 143 | ### Bug Fixes 144 | 145 | * 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) 146 | 147 | 148 | ### Continuous Integration 149 | 150 | * **gemfile.lock:** add to repo with updated `Gemfile` [skip ci] ([a5cf505](https://github.com/saltstack-formulas/logrotate-formula/commit/a5cf505cc018180361a6f2c9d9c21b4595f2632a)) 151 | * **kitchen+travis:** remove `master-py2-arch-base-latest` [skip ci] ([bf6f940](https://github.com/saltstack-formulas/logrotate-formula/commit/bf6f9406daad33586aef93a864564206642ffeac)) 152 | * **workflows/commitlint:** add to repo [skip ci] ([4c2a90b](https://github.com/saltstack-formulas/logrotate-formula/commit/4c2a90bccd53a6079aac13cacafc396ad28660c3)) 153 | 154 | ## [0.11.3](https://github.com/saltstack-formulas/logrotate-formula/compare/v0.11.2...v0.11.3) (2020-03-22) 155 | 156 | 157 | ### Bug Fixes 158 | 159 | * **release.config.js:** use full commit hash in commit link [skip ci] ([c79d42e](https://github.com/saltstack-formulas/logrotate-formula/commit/c79d42e0e0d9ef87aa697969ee5027a16d143595)) 160 | 161 | 162 | ### Continuous Integration 163 | 164 | * **gemfile:** restrict `train` gem version until upstream fix [skip ci] ([e6a2d52](https://github.com/saltstack-formulas/logrotate-formula/commit/e6a2d52a4c6b448e136618cbf493a360ed18a6c7)) 165 | * **kitchen:** avoid using bootstrap for `master` instances [skip ci] ([6200869](https://github.com/saltstack-formulas/logrotate-formula/commit/6200869f7a04a4b2f69d763744e65047f879f2dd)) 166 | * **kitchen:** ensure `cron` installed on `Debian` ([4401a20](https://github.com/saltstack-formulas/logrotate-formula/commit/4401a206710af159c04c95ea31d2a36585233c46)) 167 | * **kitchen:** use `debian-10-master-py3` instead of `develop` [skip ci] ([7ba188f](https://github.com/saltstack-formulas/logrotate-formula/commit/7ba188f535502e641a0a429a65fa0e0f788ef7b9)) 168 | * **kitchen:** use `develop` image until `master` is ready (`amazonlinux`) [skip ci] ([c4a1fa9](https://github.com/saltstack-formulas/logrotate-formula/commit/c4a1fa9f6ffc6ef5b8b93d0d71719184294b3217)) 169 | * **kitchen+travis:** upgrade matrix after `2019.2.2` release [skip ci] ([74ab7a1](https://github.com/saltstack-formulas/logrotate-formula/commit/74ab7a144d73c9159e078a8711edfe1df2dc191e)) 170 | * **travis:** apply changes from build config validation [skip ci] ([4e65a71](https://github.com/saltstack-formulas/logrotate-formula/commit/4e65a7197b637e9f243a01be52f9b67e148c708e)) 171 | * **travis:** opt-in to `dpl v2` to complete build config validation [skip ci] ([05f9738](https://github.com/saltstack-formulas/logrotate-formula/commit/05f973872e814545dadb991eedbd93333330db48)) 172 | * **travis:** quote pathspecs used with `git ls-files` [skip ci] ([b7ff28d](https://github.com/saltstack-formulas/logrotate-formula/commit/b7ff28d630908a0962b50a4934bec42fd062b304)) 173 | * **travis:** run `shellcheck` during lint job [skip ci] ([b60e2ab](https://github.com/saltstack-formulas/logrotate-formula/commit/b60e2abf734bbd6ea0c11559fc6f965b28a9ced9)) 174 | * **travis:** update `salt-lint` config for `v0.0.10` [skip ci] ([a75723c](https://github.com/saltstack-formulas/logrotate-formula/commit/a75723cbe59b1a4c55c809bde580f6b302447d76)) 175 | * **travis:** use `major.minor` for `semantic-release` version [skip ci] ([d08d9bf](https://github.com/saltstack-formulas/logrotate-formula/commit/d08d9bfa06300073e768d7a7b1471af3cc89a203)) 176 | * **travis:** use build config validation (beta) [skip ci] ([ef455ff](https://github.com/saltstack-formulas/logrotate-formula/commit/ef455fffae2dce9c11fdfaa877fb0003a402890d)) 177 | 178 | 179 | ### Documentation 180 | 181 | * **contributing:** remove to use org-level file instead [skip ci] ([01493e9](https://github.com/saltstack-formulas/logrotate-formula/commit/01493e95a947306bd0c2c43c5f076c18cb60843b)) 182 | * **readme:** update link to `CONTRIBUTING` [skip ci] ([d2ee252](https://github.com/saltstack-formulas/logrotate-formula/commit/d2ee2524cdc8ae37e44ea2d002ebf7b0de6ff466)) 183 | 184 | 185 | ### Performance Improvements 186 | 187 | * **travis:** improve `salt-lint` invocation [skip ci] ([ebd94f0](https://github.com/saltstack-formulas/logrotate-formula/commit/ebd94f078e2418ebd9f738150da223e4bef9b807)) 188 | 189 | ## [0.11.2](https://github.com/saltstack-formulas/logrotate-formula/compare/v0.11.1...v0.11.2) (2019-10-11) 190 | 191 | 192 | ### Bug Fixes 193 | 194 | * **rubocop:** add fixes using `rubocop --safe-auto-correct` ([](https://github.com/saltstack-formulas/logrotate-formula/commit/de80802)) 195 | * **rubocop:** fix remaining errors manually ([](https://github.com/saltstack-formulas/logrotate-formula/commit/401493b)) 196 | 197 | 198 | ### Continuous Integration 199 | 200 | * **kitchen:** change `log_level` to `debug` instead of `info` ([](https://github.com/saltstack-formulas/logrotate-formula/commit/e98975f)) 201 | * **kitchen:** install required packages to bootstrapped `opensuse` [skip ci] ([](https://github.com/saltstack-formulas/logrotate-formula/commit/4e76aa3)) 202 | * **kitchen:** use bootstrapped `opensuse` images until `2019.2.2` [skip ci] ([](https://github.com/saltstack-formulas/logrotate-formula/commit/26582d7)) 203 | * **platform:** add `arch-base-latest` (commented out for now) [skip ci] ([](https://github.com/saltstack-formulas/logrotate-formula/commit/7e0f2b4)) 204 | * merge travis matrix, add `salt-lint` & `rubocop` to `lint` job ([](https://github.com/saltstack-formulas/logrotate-formula/commit/a66f4fe)) 205 | * merge travis matrix, add `salt-lint` & `rubocop` to `lint` job ([](https://github.com/saltstack-formulas/logrotate-formula/commit/f31e348)) 206 | * use `dist: bionic` & apply `opensuse-leap-15` SCP error workaround ([](https://github.com/saltstack-formulas/logrotate-formula/commit/b836a66)) 207 | * **travis:** merge `rubocop` linter into main `lint` job ([](https://github.com/saltstack-formulas/logrotate-formula/commit/b8d7987)) 208 | * **yamllint:** add rule `empty-values` & use new `yaml-files` setting ([](https://github.com/saltstack-formulas/logrotate-formula/commit/7544833)) 209 | 210 | ## [0.11.1](https://github.com/saltstack-formulas/logrotate-formula/compare/v0.11.0...v0.11.1) (2019-09-01) 211 | 212 | 213 | ### Continuous Integration 214 | 215 | * **kitchen+travis:** replace EOL pre-salted images ([cc3fa62](https://github.com/saltstack-formulas/logrotate-formula/commit/cc3fa62)) 216 | 217 | 218 | ### Tests 219 | 220 | * **inspec:** improve to work on `amazon` as well ([be09e0d](https://github.com/saltstack-formulas/logrotate-formula/commit/be09e0d)) 221 | 222 | # [0.11.0](https://github.com/saltstack-formulas/logrotate-formula/compare/v0.10.0...v0.11.0) (2019-08-10) 223 | 224 | 225 | ### Features 226 | 227 | * **yamllint:** include for this repo and apply rules throughout ([86aed1e](https://github.com/saltstack-formulas/logrotate-formula/commit/86aed1e)) 228 | 229 | # [0.10.0](https://github.com/saltstack-formulas/logrotate-formula/compare/v0.9.0...v0.10.0) (2019-06-25) 230 | 231 | 232 | ### Bug Fixes 233 | 234 | * **test:** on suse using and additional kitchen state ([21a1866](https://github.com/saltstack-formulas/logrotate-formula/commit/21a1866)) 235 | 236 | 237 | ### Features 238 | 239 | * implement semantic release ([ef086b2](https://github.com/saltstack-formulas/logrotate-formula/commit/ef086b2)) 240 | -------------------------------------------------------------------------------- /docs/CHANGELOG.rst: -------------------------------------------------------------------------------- 1 | 2 | Changelog 3 | ========= 4 | 5 | `0.14.2 `_ (2024-12-30) 6 | -------------------------------------------------------------------------------------------------------------- 7 | 8 | Bug Fixes 9 | ^^^^^^^^^ 10 | 11 | 12 | * **debian:** disable login_records, they are managed by the package (\ `db1ada0 `_\ ) 13 | 14 | `0.14.1 `_ (2024-12-17) 15 | -------------------------------------------------------------------------------------------------------------- 16 | 17 | Tests 18 | ^^^^^ 19 | 20 | 21 | * **pre-commit:** update pre-commit hooks (\ `f4ab681 `_\ ) 22 | 23 | `0.14.0 `_ (2022-08-29) 24 | -------------------------------------------------------------------------------------------------------------- 25 | 26 | Continuous Integration 27 | ^^^^^^^^^^^^^^^^^^^^^^ 28 | 29 | 30 | * update ``pre-commit`` configuration inc. for pre-commit.ci [skip ci] (\ `df61825 `_\ ) 31 | * **kitchen+gitlab:** update for new pre-salted images [skip ci] (\ `af19654 `_\ ) 32 | 33 | Features 34 | ^^^^^^^^ 35 | 36 | 37 | * **osfingermap:** add Debian-11 entry to osfingermap.yaml (\ `756769a `_\ ) 38 | 39 | Tests 40 | ^^^^^ 41 | 42 | 43 | * **system.rb:** add support for ``mac_os_x`` [skip ci] (\ `e8d4e7e `_\ ) 44 | 45 | `0.13.2 `_ (2022-03-28) 46 | -------------------------------------------------------------------------------------------------------------- 47 | 48 | Bug Fixes 49 | ^^^^^^^^^ 50 | 51 | 52 | * **conf:** add 'monthly' interval (\ `b6cc8a9 `_\ ) 53 | 54 | Tests 55 | ^^^^^ 56 | 57 | 58 | * **jobs:** add a monthly job test (\ `957e689 `_\ ) 59 | * **jobs:** reorder parameters to match pillar (\ `3bdc11b `_\ ) 60 | 61 | `0.13.1 `_ (2022-02-22) 62 | -------------------------------------------------------------------------------------------------------------- 63 | 64 | Bug Fixes 65 | ^^^^^^^^^ 66 | 67 | 68 | * **ubuntu:** removed breaking wtmp btmp (\ `012bfef `_\ ) 69 | 70 | Continuous Integration 71 | ^^^^^^^^^^^^^^^^^^^^^^ 72 | 73 | 74 | * update linters to latest versions [skip ci] (\ `eb6d2ea `_\ ) 75 | * **gemfile:** allow rubygems proxy to be provided as an env var [skip ci] (\ `d545fb2 `_\ ) 76 | * **kitchen+gitlab:** update for new pre-salted images [skip ci] (\ `d71215b `_\ ) 77 | 78 | Tests 79 | ^^^^^ 80 | 81 | 82 | * **system:** add ``build_platform_codename`` [skip ci] (\ `4722110 `_\ ) 83 | 84 | `0.13.0 `_ (2022-01-14) 85 | -------------------------------------------------------------------------------------------------------------- 86 | 87 | Continuous Integration 88 | ^^^^^^^^^^^^^^^^^^^^^^ 89 | 90 | 91 | * **gemfile+lock:** use ``ssf`` customised ``inspec`` repo [skip ci] (\ `27829b8 `_\ ) 92 | * **kitchen:** move ``provisioner`` block & update ``run_command`` [skip ci] (\ `42bde9c `_\ ) 93 | * **kitchen:** use ``cron-formula`` dependency instead of ``cron`` state (\ `4cf2808 `_\ ) 94 | * **kitchen+ci:** update with ``3004`` pre-salted images/boxes [skip ci] (\ `bacce6e `_\ ) 95 | * **kitchen+ci:** update with latest ``3003.2`` pre-salted images [skip ci] (\ `e6ee323 `_\ ) 96 | * **kitchen+ci:** update with latest CVE pre-salted images [skip ci] (\ `a1dd441 `_\ ) 97 | * add Debian 11 Bullseye & update ``yamllint`` configuration [skip ci] (\ `0e63e18 `_\ ) 98 | 99 | Features 100 | ^^^^^^^^ 101 | 102 | 103 | * **hourly:** add configuration to enable hourly jobs (\ `7b5676b `_\ ) 104 | * **hourly:** add hourly job def to pillar.example (\ `cd4cd1d `_\ ) 105 | 106 | Tests 107 | ^^^^^ 108 | 109 | 110 | * **alma+rocky:** add platforms (finalise dc63042) [skip ci] (\ `e4ad016 `_\ ) 111 | * **base:** re-enable Arch Linux test (possible due to ``cron-formula``\ ) (\ `2136711 `_\ ) 112 | * **jobs:** add ``hourly`` test (\ `69677b0 `_\ ) 113 | 114 | `0.12.0 `_ (2021-07-07) 115 | -------------------------------------------------------------------------------------------------------------- 116 | 117 | Continuous Integration 118 | ^^^^^^^^^^^^^^^^^^^^^^ 119 | 120 | 121 | * **3003.1:** update inc. AlmaLinux, Rocky & ``rst-lint`` [skip ci] (\ `bb6bfac `_\ ) 122 | * **commitlint:** ensure ``upstream/master`` uses main repo URL [skip ci] (\ `ac5a57c `_\ ) 123 | * **gemfile+lock:** use ``ssf`` customised ``kitchen-docker`` repo [skip ci] (\ `7368305 `_\ ) 124 | * **kitchen+gitlab:** remove Ubuntu 16.04 & Fedora 32 (EOL) [skip ci] (\ `1f55b57 `_\ ) 125 | * add ``arch-master`` to matrix and update ``.travis.yml`` [skip ci] (\ `84b2f6a `_\ ) 126 | * **gitlab-ci:** add ``rubocop`` linter (with ``allow_failure``\ ) [skip ci] (\ `1fc52cd `_\ ) 127 | * **gitlab-ci:** use GitLab CI as Travis CI replacement (\ `94c2cf7 `_\ ) 128 | * **kitchen+ci:** use latest pre-salted images (after CVE) [skip ci] (\ `406dbbb `_\ ) 129 | * **kitchen+gitlab:** adjust matrix to add ``3003`` [skip ci] (\ `b198955 `_\ ) 130 | * **kitchen+gitlab-ci:** use latest pre-salted images [skip ci] (\ `ea66a0d `_\ ) 131 | * **pre-commit:** add to formula [skip ci] (\ `e506d69 `_\ ) 132 | * **pre-commit:** enable/disable ``rstcheck`` as relevant [skip ci] (\ `267bb94 `_\ ) 133 | * **pre-commit:** finalise ``rstcheck`` configuration [skip ci] (\ `bd1dc81 `_\ ) 134 | * **pre-commit:** update hook for ``rubocop`` [skip ci] (\ `2c964b0 `_\ ) 135 | 136 | Features 137 | ^^^^^^^^ 138 | 139 | 140 | * **jobs:** add ``jobs: {}`` to defaults and state to init (\ `c3b64d3 `_\ ), closes `#57 `_ 141 | 142 | Tests 143 | ^^^^^ 144 | 145 | 146 | * **alma+rocky:** add platforms (based on CentOS 8) [skip ci] (\ `dc63042 `_\ ) 147 | * standardise use of ``share`` suite & ``_mapdata`` state [skip ci] (\ `650cfad `_\ ) 148 | * **base:** update from ``template-formula`` and Arch Linux exclusion (\ `09d4f5a `_\ ) 149 | * **rubocop:** fix violation [skip ci] (\ `3f5edef `_\ ) 150 | 151 | `0.11.5 `_ (2020-06-29) 152 | -------------------------------------------------------------------------------------------------------------- 153 | 154 | Bug Fixes 155 | ^^^^^^^^^ 156 | 157 | 158 | * **debian-10:** disable login_records, they're managed by the package (\ `335c9e6 `_\ ) 159 | 160 | Continuous Integration 161 | ^^^^^^^^^^^^^^^^^^^^^^ 162 | 163 | 164 | * **kitchen:** use ``saltimages`` Docker Hub where available [skip ci] (\ `8f32221 `_\ ) 165 | * **kitchen+travis:** use latest pre-salted images [skip ci] (\ `e18246d `_\ ) 166 | * **travis:** add notifications => zulip [skip ci] (\ `d1c1a81 `_\ ) 167 | 168 | `0.11.4 `_ (2020-05-07) 169 | -------------------------------------------------------------------------------------------------------------- 170 | 171 | Bug Fixes 172 | ^^^^^^^^^ 173 | 174 | 175 | * make necessary modifications to get working on ``salt-ssh`` (\ `57c88a8 `_\ ), closes `/freenode.logbot.info/saltstack-formulas/20200506#c3811885-c3812572 `_ 176 | 177 | Continuous Integration 178 | ^^^^^^^^^^^^^^^^^^^^^^ 179 | 180 | 181 | * **gemfile.lock:** add to repo with updated ``Gemfile`` [skip ci] (\ `a5cf505 `_\ ) 182 | * **kitchen+travis:** remove ``master-py2-arch-base-latest`` [skip ci] (\ `bf6f940 `_\ ) 183 | * **workflows/commitlint:** add to repo [skip ci] (\ `4c2a90b `_\ ) 184 | 185 | `0.11.3 `_ (2020-03-22) 186 | -------------------------------------------------------------------------------------------------------------- 187 | 188 | Bug Fixes 189 | ^^^^^^^^^ 190 | 191 | 192 | * **release.config.js:** use full commit hash in commit link [skip ci] (\ `c79d42e `_\ ) 193 | 194 | Continuous Integration 195 | ^^^^^^^^^^^^^^^^^^^^^^ 196 | 197 | 198 | * **gemfile:** restrict ``train`` gem version until upstream fix [skip ci] (\ `e6a2d52 `_\ ) 199 | * **kitchen:** avoid using bootstrap for ``master`` instances [skip ci] (\ `6200869 `_\ ) 200 | * **kitchen:** ensure ``cron`` installed on ``Debian`` (\ `4401a20 `_\ ) 201 | * **kitchen:** use ``debian-10-master-py3`` instead of ``develop`` [skip ci] (\ `7ba188f `_\ ) 202 | * **kitchen:** use ``develop`` image until ``master`` is ready (\ ``amazonlinux``\ ) [skip ci] (\ `c4a1fa9 `_\ ) 203 | * **kitchen+travis:** upgrade matrix after ``2019.2.2`` release [skip ci] (\ `74ab7a1 `_\ ) 204 | * **travis:** apply changes from build config validation [skip ci] (\ `4e65a71 `_\ ) 205 | * **travis:** opt-in to ``dpl v2`` to complete build config validation [skip ci] (\ `05f9738 `_\ ) 206 | * **travis:** quote pathspecs used with ``git ls-files`` [skip ci] (\ `b7ff28d `_\ ) 207 | * **travis:** run ``shellcheck`` during lint job [skip ci] (\ `b60e2ab `_\ ) 208 | * **travis:** update ``salt-lint`` config for ``v0.0.10`` [skip ci] (\ `a75723c `_\ ) 209 | * **travis:** use ``major.minor`` for ``semantic-release`` version [skip ci] (\ `d08d9bf `_\ ) 210 | * **travis:** use build config validation (beta) [skip ci] (\ `ef455ff `_\ ) 211 | 212 | Documentation 213 | ^^^^^^^^^^^^^ 214 | 215 | 216 | * **contributing:** remove to use org-level file instead [skip ci] (\ `01493e9 `_\ ) 217 | * **readme:** update link to ``CONTRIBUTING`` [skip ci] (\ `d2ee252 `_\ ) 218 | 219 | Performance Improvements 220 | ^^^^^^^^^^^^^^^^^^^^^^^^ 221 | 222 | 223 | * **travis:** improve ``salt-lint`` invocation [skip ci] (\ `ebd94f0 `_\ ) 224 | 225 | `0.11.2 `_ (2019-10-11) 226 | -------------------------------------------------------------------------------------------------------------- 227 | 228 | Bug Fixes 229 | ^^^^^^^^^ 230 | 231 | 232 | * **rubocop:** add fixes using ``rubocop --safe-auto-correct`` (\ ` `_\ ) 233 | * **rubocop:** fix remaining errors manually (\ ` `_\ ) 234 | 235 | Continuous Integration 236 | ^^^^^^^^^^^^^^^^^^^^^^ 237 | 238 | 239 | * **kitchen:** change ``log_level`` to ``debug`` instead of ``info`` (\ ` `_\ ) 240 | * **kitchen:** install required packages to bootstrapped ``opensuse`` [skip ci] (\ ` `_\ ) 241 | * **kitchen:** use bootstrapped ``opensuse`` images until ``2019.2.2`` [skip ci] (\ ` `_\ ) 242 | * **platform:** add ``arch-base-latest`` (commented out for now) [skip ci] (\ ` `_\ ) 243 | * merge travis matrix, add ``salt-lint`` & ``rubocop`` to ``lint`` job (\ ` `_\ ) 244 | * merge travis matrix, add ``salt-lint`` & ``rubocop`` to ``lint`` job (\ ` `_\ ) 245 | * use ``dist: bionic`` & apply ``opensuse-leap-15`` SCP error workaround (\ ` `_\ ) 246 | * **travis:** merge ``rubocop`` linter into main ``lint`` job (\ ` `_\ ) 247 | * **yamllint:** add rule ``empty-values`` & use new ``yaml-files`` setting (\ ` `_\ ) 248 | 249 | `0.11.1 `_ (2019-09-01) 250 | -------------------------------------------------------------------------------------------------------------- 251 | 252 | Continuous Integration 253 | ^^^^^^^^^^^^^^^^^^^^^^ 254 | 255 | 256 | * **kitchen+travis:** replace EOL pre-salted images (\ `cc3fa62 `_\ ) 257 | 258 | Tests 259 | ^^^^^ 260 | 261 | 262 | * **inspec:** improve to work on ``amazon`` as well (\ `be09e0d `_\ ) 263 | 264 | `0.11.0 `_ (2019-08-10) 265 | -------------------------------------------------------------------------------------------------------------- 266 | 267 | Features 268 | ^^^^^^^^ 269 | 270 | 271 | * **yamllint:** include for this repo and apply rules throughout (\ `86aed1e `_\ ) 272 | 273 | `0.10.0 `_ (2019-06-25) 274 | ------------------------------------------------------------------------------------------------------------- 275 | 276 | Bug Fixes 277 | ^^^^^^^^^ 278 | 279 | 280 | * **test:** on suse using and additional kitchen state (\ `21a1866 `_\ ) 281 | 282 | Features 283 | ^^^^^^^^ 284 | 285 | 286 | * implement semantic release (\ `ef086b2 `_\ ) 287 | -------------------------------------------------------------------------------- /Gemfile.lock: -------------------------------------------------------------------------------- 1 | GIT 2 | remote: https://gitlab.com/saltstack-formulas/infrastructure/inspec 3 | revision: a0c6295303f7d7a4d2a6164b5e77868560b04945 4 | branch: ssf 5 | specs: 6 | inspec (5.21.15) 7 | cookstyle 8 | faraday_middleware (>= 0.12.2, < 1.1) 9 | inspec-core (= 5.21.15) 10 | mongo (= 2.13.2) 11 | progress_bar (~> 1.3.3) 12 | rake 13 | roo (~> 2.9.0) 14 | roo-xls 15 | train (~> 3.10) 16 | train-aws (~> 0.2) 17 | train-habitat (~> 0.1) 18 | train-winrm (~> 0.2) 19 | inspec-core (5.21.15) 20 | addressable (~> 2.4) 21 | chef-telemetry (~> 1.0, >= 1.0.8) 22 | faraday (>= 1, < 3) 23 | faraday-follow_redirects (~> 0.3) 24 | hashie (>= 3.4, < 5.0) 25 | license-acceptance (>= 0.2.13, < 3.0) 26 | method_source (>= 0.8, < 2.0) 27 | mixlib-log (~> 3.0) 28 | multipart-post (~> 2.0) 29 | parallel (~> 1.9) 30 | parslet (>= 1.5, < 2.0) 31 | pry (~> 0.13) 32 | rspec (>= 3.9, <= 3.11) 33 | rspec-its (~> 1.2) 34 | rubyzip (>= 1.2.2, < 3.0) 35 | semverse (~> 3.0) 36 | sslshake (~> 1.2) 37 | thor (>= 0.20, < 2.0) 38 | tomlrb (>= 1.2, < 2.1) 39 | train-core (~> 3.10) 40 | tty-prompt (~> 0.17) 41 | tty-table (~> 0.10) 42 | 43 | GIT 44 | remote: https://gitlab.com/saltstack-formulas/infrastructure/kitchen-docker 45 | revision: 104079a1d2fe34f5b076f4d316f6f837fa76e412 46 | branch: ssf 47 | specs: 48 | kitchen-docker (2.13.0) 49 | test-kitchen (>= 1.0.0) 50 | 51 | GEM 52 | remote: https://rubygems.org/ 53 | specs: 54 | activesupport (7.1.1) 55 | base64 56 | bigdecimal 57 | concurrent-ruby (~> 1.0, >= 1.0.2) 58 | connection_pool (>= 2.2.5) 59 | drb 60 | i18n (>= 1.6, < 2) 61 | minitest (>= 5.1) 62 | mutex_m 63 | tzinfo (~> 2.0) 64 | addressable (2.8.5) 65 | public_suffix (>= 2.0.2, < 6.0) 66 | ast (2.4.2) 67 | aws-eventstream (1.2.0) 68 | aws-partitions (1.836.0) 69 | aws-sdk-account (1.18.0) 70 | aws-sdk-core (~> 3, >= 3.184.0) 71 | aws-sigv4 (~> 1.1) 72 | aws-sdk-alexaforbusiness (1.65.0) 73 | aws-sdk-core (~> 3, >= 3.184.0) 74 | aws-sigv4 (~> 1.1) 75 | aws-sdk-amplify (1.32.0) 76 | aws-sdk-core (~> 3, >= 3.120.0) 77 | aws-sigv4 (~> 1.1) 78 | aws-sdk-apigateway (1.88.0) 79 | aws-sdk-core (~> 3, >= 3.184.0) 80 | aws-sigv4 (~> 1.1) 81 | aws-sdk-apigatewayv2 (1.51.0) 82 | aws-sdk-core (~> 3, >= 3.184.0) 83 | aws-sigv4 (~> 1.1) 84 | aws-sdk-applicationautoscaling (1.51.0) 85 | aws-sdk-core (~> 3, >= 3.112.0) 86 | aws-sigv4 (~> 1.1) 87 | aws-sdk-athena (1.75.0) 88 | aws-sdk-core (~> 3, >= 3.184.0) 89 | aws-sigv4 (~> 1.1) 90 | aws-sdk-autoscaling (1.92.0) 91 | aws-sdk-core (~> 3, >= 3.176.0) 92 | aws-sigv4 (~> 1.1) 93 | aws-sdk-batch (1.73.0) 94 | aws-sdk-core (~> 3, >= 3.176.0) 95 | aws-sigv4 (~> 1.1) 96 | aws-sdk-budgets (1.60.0) 97 | aws-sdk-core (~> 3, >= 3.184.0) 98 | aws-sigv4 (~> 1.1) 99 | aws-sdk-cloudformation (1.91.0) 100 | aws-sdk-core (~> 3, >= 3.184.0) 101 | aws-sigv4 (~> 1.1) 102 | aws-sdk-cloudfront (1.83.0) 103 | aws-sdk-core (~> 3, >= 3.184.0) 104 | aws-sigv4 (~> 1.1) 105 | aws-sdk-cloudhsm (1.48.0) 106 | aws-sdk-core (~> 3, >= 3.184.0) 107 | aws-sigv4 (~> 1.1) 108 | aws-sdk-cloudhsmv2 (1.51.0) 109 | aws-sdk-core (~> 3, >= 3.184.0) 110 | aws-sigv4 (~> 1.1) 111 | aws-sdk-cloudtrail (1.69.0) 112 | aws-sdk-core (~> 3, >= 3.184.0) 113 | aws-sigv4 (~> 1.1) 114 | aws-sdk-cloudwatch (1.81.0) 115 | aws-sdk-core (~> 3, >= 3.184.0) 116 | aws-sigv4 (~> 1.1) 117 | aws-sdk-cloudwatchevents (1.62.0) 118 | aws-sdk-core (~> 3, >= 3.176.0) 119 | aws-sigv4 (~> 1.1) 120 | aws-sdk-cloudwatchlogs (1.71.0) 121 | aws-sdk-core (~> 3, >= 3.184.0) 122 | aws-sigv4 (~> 1.1) 123 | aws-sdk-codecommit (1.60.0) 124 | aws-sdk-core (~> 3, >= 3.184.0) 125 | aws-sigv4 (~> 1.1) 126 | aws-sdk-codedeploy (1.60.0) 127 | aws-sdk-core (~> 3, >= 3.184.0) 128 | aws-sigv4 (~> 1.1) 129 | aws-sdk-codepipeline (1.62.0) 130 | aws-sdk-core (~> 3, >= 3.184.0) 131 | aws-sigv4 (~> 1.1) 132 | aws-sdk-cognitoidentity (1.45.0) 133 | aws-sdk-core (~> 3, >= 3.176.0) 134 | aws-sigv4 (~> 1.1) 135 | aws-sdk-cognitoidentityprovider (1.76.0) 136 | aws-sdk-core (~> 3, >= 3.176.0) 137 | aws-sigv4 (~> 1.1) 138 | aws-sdk-configservice (1.99.0) 139 | aws-sdk-core (~> 3, >= 3.184.0) 140 | aws-sigv4 (~> 1.1) 141 | aws-sdk-core (3.185.1) 142 | aws-eventstream (~> 1, >= 1.0.2) 143 | aws-partitions (~> 1, >= 1.651.0) 144 | aws-sigv4 (~> 1.5) 145 | jmespath (~> 1, >= 1.6.1) 146 | aws-sdk-costandusagereportservice (1.50.0) 147 | aws-sdk-core (~> 3, >= 3.184.0) 148 | aws-sigv4 (~> 1.1) 149 | aws-sdk-databasemigrationservice (1.80.0) 150 | aws-sdk-core (~> 3, >= 3.176.0) 151 | aws-sigv4 (~> 1.1) 152 | aws-sdk-dynamodb (1.95.0) 153 | aws-sdk-core (~> 3, >= 3.184.0) 154 | aws-sigv4 (~> 1.1) 155 | aws-sdk-ec2 (1.413.0) 156 | aws-sdk-core (~> 3, >= 3.184.0) 157 | aws-sigv4 (~> 1.1) 158 | aws-sdk-ecr (1.65.0) 159 | aws-sdk-core (~> 3, >= 3.184.0) 160 | aws-sigv4 (~> 1.1) 161 | aws-sdk-ecrpublic (1.23.0) 162 | aws-sdk-core (~> 3, >= 3.184.0) 163 | aws-sigv4 (~> 1.1) 164 | aws-sdk-ecs (1.130.0) 165 | aws-sdk-core (~> 3, >= 3.184.0) 166 | aws-sigv4 (~> 1.1) 167 | aws-sdk-efs (1.67.0) 168 | aws-sdk-core (~> 3, >= 3.184.0) 169 | aws-sigv4 (~> 1.1) 170 | aws-sdk-eks (1.90.0) 171 | aws-sdk-core (~> 3, >= 3.184.0) 172 | aws-sigv4 (~> 1.1) 173 | aws-sdk-elasticache (1.92.0) 174 | aws-sdk-core (~> 3, >= 3.184.0) 175 | aws-sigv4 (~> 1.1) 176 | aws-sdk-elasticbeanstalk (1.61.0) 177 | aws-sdk-core (~> 3, >= 3.184.0) 178 | aws-sigv4 (~> 1.1) 179 | aws-sdk-elasticloadbalancing (1.49.0) 180 | aws-sdk-core (~> 3, >= 3.184.0) 181 | aws-sigv4 (~> 1.1) 182 | aws-sdk-elasticloadbalancingv2 (1.93.0) 183 | aws-sdk-core (~> 3, >= 3.184.0) 184 | aws-sigv4 (~> 1.1) 185 | aws-sdk-elasticsearchservice (1.77.0) 186 | aws-sdk-core (~> 3, >= 3.184.0) 187 | aws-sigv4 (~> 1.1) 188 | aws-sdk-emr (1.53.0) 189 | aws-sdk-core (~> 3, >= 3.121.2) 190 | aws-sigv4 (~> 1.1) 191 | aws-sdk-eventbridge (1.46.0) 192 | aws-sdk-core (~> 3, >= 3.176.0) 193 | aws-sigv4 (~> 1.1) 194 | aws-sdk-firehose (1.58.0) 195 | aws-sdk-core (~> 3, >= 3.184.0) 196 | aws-sigv4 (~> 1.1) 197 | aws-sdk-glue (1.145.0) 198 | aws-sdk-core (~> 3, >= 3.176.0) 199 | aws-sigv4 (~> 1.1) 200 | aws-sdk-guardduty (1.80.0) 201 | aws-sdk-core (~> 3, >= 3.184.0) 202 | aws-sigv4 (~> 1.1) 203 | aws-sdk-iam (1.87.0) 204 | aws-sdk-core (~> 3, >= 3.184.0) 205 | aws-sigv4 (~> 1.1) 206 | aws-sdk-kafka (1.63.0) 207 | aws-sdk-core (~> 3, >= 3.184.0) 208 | aws-sigv4 (~> 1.1) 209 | aws-sdk-kinesis (1.52.0) 210 | aws-sdk-core (~> 3, >= 3.184.0) 211 | aws-sigv4 (~> 1.1) 212 | aws-sdk-kms (1.72.0) 213 | aws-sdk-core (~> 3, >= 3.184.0) 214 | aws-sigv4 (~> 1.1) 215 | aws-sdk-lambda (1.106.0) 216 | aws-sdk-core (~> 3, >= 3.184.0) 217 | aws-sigv4 (~> 1.1) 218 | aws-sdk-mq (1.40.0) 219 | aws-sdk-core (~> 3, >= 3.120.0) 220 | aws-sigv4 (~> 1.1) 221 | aws-sdk-networkfirewall (1.35.0) 222 | aws-sdk-core (~> 3, >= 3.184.0) 223 | aws-sigv4 (~> 1.1) 224 | aws-sdk-networkmanager (1.37.0) 225 | aws-sdk-core (~> 3, >= 3.184.0) 226 | aws-sigv4 (~> 1.1) 227 | aws-sdk-organizations (1.77.0) 228 | aws-sdk-core (~> 3, >= 3.176.0) 229 | aws-sigv4 (~> 1.1) 230 | aws-sdk-ram (1.26.0) 231 | aws-sdk-core (~> 3, >= 3.112.0) 232 | aws-sigv4 (~> 1.1) 233 | aws-sdk-rds (1.197.0) 234 | aws-sdk-core (~> 3, >= 3.184.0) 235 | aws-sigv4 (~> 1.1) 236 | aws-sdk-redshift (1.99.0) 237 | aws-sdk-core (~> 3, >= 3.184.0) 238 | aws-sigv4 (~> 1.1) 239 | aws-sdk-route53 (1.80.0) 240 | aws-sdk-core (~> 3, >= 3.184.0) 241 | aws-sigv4 (~> 1.1) 242 | aws-sdk-route53domains (1.52.0) 243 | aws-sdk-core (~> 3, >= 3.184.0) 244 | aws-sigv4 (~> 1.1) 245 | aws-sdk-route53resolver (1.49.0) 246 | aws-sdk-core (~> 3, >= 3.184.0) 247 | aws-sigv4 (~> 1.1) 248 | aws-sdk-s3 (1.136.0) 249 | aws-sdk-core (~> 3, >= 3.181.0) 250 | aws-sdk-kms (~> 1) 251 | aws-sigv4 (~> 1.6) 252 | aws-sdk-s3control (1.43.0) 253 | aws-sdk-core (~> 3, >= 3.122.0) 254 | aws-sigv4 (~> 1.1) 255 | aws-sdk-secretsmanager (1.46.0) 256 | aws-sdk-core (~> 3, >= 3.112.0) 257 | aws-sigv4 (~> 1.1) 258 | aws-sdk-securityhub (1.94.0) 259 | aws-sdk-core (~> 3, >= 3.184.0) 260 | aws-sigv4 (~> 1.1) 261 | aws-sdk-servicecatalog (1.60.0) 262 | aws-sdk-core (~> 3, >= 3.112.0) 263 | aws-sigv4 (~> 1.1) 264 | aws-sdk-ses (1.41.0) 265 | aws-sdk-core (~> 3, >= 3.120.0) 266 | aws-sigv4 (~> 1.1) 267 | aws-sdk-shield (1.58.0) 268 | aws-sdk-core (~> 3, >= 3.184.0) 269 | aws-sigv4 (~> 1.1) 270 | aws-sdk-signer (1.32.0) 271 | aws-sdk-core (~> 3, >= 3.120.0) 272 | aws-sigv4 (~> 1.1) 273 | aws-sdk-simpledb (1.29.0) 274 | aws-sdk-core (~> 3, >= 3.120.0) 275 | aws-sigv2 (~> 1.0) 276 | aws-sdk-sms (1.50.0) 277 | aws-sdk-core (~> 3, >= 3.184.0) 278 | aws-sigv4 (~> 1.1) 279 | aws-sdk-sns (1.67.0) 280 | aws-sdk-core (~> 3, >= 3.184.0) 281 | aws-sigv4 (~> 1.1) 282 | aws-sdk-sqs (1.64.0) 283 | aws-sdk-core (~> 3, >= 3.184.0) 284 | aws-sigv4 (~> 1.1) 285 | aws-sdk-ssm (1.158.0) 286 | aws-sdk-core (~> 3, >= 3.184.0) 287 | aws-sigv4 (~> 1.1) 288 | aws-sdk-states (1.39.0) 289 | aws-sdk-core (~> 3, >= 3.112.0) 290 | aws-sigv4 (~> 1.1) 291 | aws-sdk-synthetics (1.19.0) 292 | aws-sdk-core (~> 3, >= 3.121.2) 293 | aws-sigv4 (~> 1.1) 294 | aws-sdk-transfer (1.73.0) 295 | aws-sdk-core (~> 3, >= 3.176.0) 296 | aws-sigv4 (~> 1.1) 297 | aws-sdk-waf (1.43.0) 298 | aws-sdk-core (~> 3, >= 3.122.0) 299 | aws-sigv4 (~> 1.1) 300 | aws-sigv2 (1.1.0) 301 | aws-sigv4 (1.6.0) 302 | aws-eventstream (~> 1, >= 1.0.2) 303 | azure_graph_rbac (0.17.2) 304 | ms_rest_azure (~> 0.12.0) 305 | azure_mgmt_key_vault (0.17.7) 306 | ms_rest_azure (~> 0.12.0) 307 | azure_mgmt_resources (0.18.2) 308 | ms_rest_azure (~> 0.12.0) 309 | azure_mgmt_security (0.19.0) 310 | ms_rest_azure (~> 0.12.0) 311 | azure_mgmt_storage (0.23.0) 312 | ms_rest_azure (~> 0.12.0) 313 | base64 (0.1.1) 314 | bcrypt_pbkdf (1.1.0) 315 | bigdecimal (3.1.4) 316 | bson (4.15.0) 317 | builder (3.2.4) 318 | chef-config (18.3.0) 319 | addressable 320 | chef-utils (= 18.3.0) 321 | fuzzyurl 322 | mixlib-config (>= 2.2.12, < 4.0) 323 | mixlib-shellout (>= 2.0, < 4.0) 324 | tomlrb (~> 1.2) 325 | chef-telemetry (1.1.1) 326 | chef-config 327 | concurrent-ruby (~> 1.0) 328 | chef-utils (18.3.0) 329 | concurrent-ruby 330 | coderay (1.1.3) 331 | concurrent-ruby (1.2.2) 332 | connection_pool (2.4.1) 333 | cookstyle (7.32.2) 334 | rubocop (= 1.25.1) 335 | declarative (0.0.20) 336 | diff-lcs (1.5.0) 337 | docker-api (2.2.0) 338 | excon (>= 0.47.0) 339 | multi_json 340 | domain_name (0.5.20190701) 341 | unf (>= 0.0.5, < 1.0.0) 342 | drb (2.1.1) 343 | ruby2_keywords 344 | ed25519 (1.3.0) 345 | erubi (1.12.0) 346 | excon (0.104.0) 347 | faraday (1.10.3) 348 | faraday-em_http (~> 1.0) 349 | faraday-em_synchrony (~> 1.0) 350 | faraday-excon (~> 1.1) 351 | faraday-httpclient (~> 1.0) 352 | faraday-multipart (~> 1.0) 353 | faraday-net_http (~> 1.0) 354 | faraday-net_http_persistent (~> 1.0) 355 | faraday-patron (~> 1.0) 356 | faraday-rack (~> 1.0) 357 | faraday-retry (~> 1.0) 358 | ruby2_keywords (>= 0.0.4) 359 | faraday-cookie_jar (0.0.7) 360 | faraday (>= 0.8.0) 361 | http-cookie (~> 1.0.0) 362 | faraday-em_http (1.0.0) 363 | faraday-em_synchrony (1.0.0) 364 | faraday-excon (1.1.0) 365 | faraday-follow_redirects (0.3.0) 366 | faraday (>= 1, < 3) 367 | faraday-httpclient (1.0.1) 368 | faraday-multipart (1.0.4) 369 | multipart-post (~> 2) 370 | faraday-net_http (1.0.1) 371 | faraday-net_http_persistent (1.2.0) 372 | faraday-patron (1.0.0) 373 | faraday-rack (1.0.0) 374 | faraday-retry (1.0.3) 375 | faraday_middleware (1.0.0) 376 | faraday (~> 1.0) 377 | ffi (1.16.3) 378 | fuzzyurl (0.9.0) 379 | google-api-client (0.52.0) 380 | addressable (~> 2.5, >= 2.5.1) 381 | googleauth (~> 0.9) 382 | httpclient (>= 2.8.1, < 3.0) 383 | mini_mime (~> 1.0) 384 | representable (~> 3.0) 385 | retriable (>= 2.0, < 4.0) 386 | rexml 387 | signet (~> 0.12) 388 | googleauth (0.14.0) 389 | faraday (>= 0.17.3, < 2.0) 390 | jwt (>= 1.4, < 3.0) 391 | memoist (~> 0.16) 392 | multi_json (~> 1.11) 393 | os (>= 0.9, < 2.0) 394 | signet (~> 0.14) 395 | gssapi (1.3.1) 396 | ffi (>= 1.0.1) 397 | gyoku (1.4.0) 398 | builder (>= 2.1.2) 399 | rexml (~> 3.0) 400 | hashie (4.1.0) 401 | highline (2.1.0) 402 | http-cookie (1.0.5) 403 | domain_name (~> 0.5) 404 | httpclient (2.8.3) 405 | i18n (1.14.1) 406 | concurrent-ruby (~> 1.0) 407 | inifile (3.0.0) 408 | jmespath (1.6.2) 409 | json (2.6.3) 410 | jwt (2.7.1) 411 | kitchen-inspec (2.6.2) 412 | hashie (>= 3.4, <= 5.0) 413 | inspec (>= 2.2.64, < 6.0) 414 | test-kitchen (>= 2.7, < 4) 415 | kitchen-salt (0.7.2) 416 | hashie (>= 3.5) 417 | test-kitchen (>= 1.4) 418 | license-acceptance (2.1.13) 419 | pastel (~> 0.7) 420 | tomlrb (>= 1.2, < 3.0) 421 | tty-box (~> 0.6) 422 | tty-prompt (~> 0.20) 423 | little-plugger (1.1.4) 424 | logging (2.3.1) 425 | little-plugger (~> 1.1) 426 | multi_json (~> 1.14) 427 | memoist (0.16.2) 428 | method_source (1.0.0) 429 | mini_mime (1.1.5) 430 | mini_portile2 (2.8.4) 431 | minitest (5.20.0) 432 | mixlib-config (3.0.27) 433 | tomlrb 434 | mixlib-install (3.12.27) 435 | mixlib-shellout 436 | mixlib-versioning 437 | thor 438 | mixlib-log (3.0.9) 439 | mixlib-shellout (3.2.7) 440 | chef-utils 441 | mixlib-versioning (1.2.12) 442 | mongo (2.13.2) 443 | bson (>= 4.8.2, < 5.0.0) 444 | ms_rest (0.7.6) 445 | concurrent-ruby (~> 1.0) 446 | faraday (>= 0.9, < 2.0.0) 447 | timeliness (~> 0.3.10) 448 | ms_rest_azure (0.12.0) 449 | concurrent-ruby (~> 1.0) 450 | faraday (>= 0.9, < 2.0.0) 451 | faraday-cookie_jar (~> 0.0.6) 452 | ms_rest (~> 0.7.6) 453 | multi_json (1.15.0) 454 | multipart-post (2.3.0) 455 | mutex_m (0.1.2) 456 | net-scp (4.0.0) 457 | net-ssh (>= 2.6.5, < 8.0.0) 458 | net-ssh (7.2.0) 459 | net-ssh-gateway (2.0.0) 460 | net-ssh (>= 4.0.0) 461 | nokogiri (1.15.4) 462 | mini_portile2 (~> 2.8.2) 463 | racc (~> 1.4) 464 | nori (2.6.0) 465 | options (2.3.2) 466 | os (1.1.4) 467 | parallel (1.23.0) 468 | parser (3.2.2.4) 469 | ast (~> 2.4.1) 470 | racc 471 | parslet (1.8.2) 472 | pastel (0.8.0) 473 | tty-color (~> 0.5) 474 | progress_bar (1.3.3) 475 | highline (>= 1.6, < 3) 476 | options (~> 2.3.0) 477 | pry (0.14.2) 478 | coderay (~> 1.1) 479 | method_source (~> 1.0) 480 | public_suffix (5.0.3) 481 | racc (1.7.1) 482 | rainbow (3.1.1) 483 | rake (13.0.6) 484 | regexp_parser (2.8.2) 485 | representable (3.2.0) 486 | declarative (< 0.1.0) 487 | trailblazer-option (>= 0.1.1, < 0.2.0) 488 | uber (< 0.2.0) 489 | retriable (3.1.2) 490 | rexml (3.2.6) 491 | roo (2.9.0) 492 | nokogiri (~> 1) 493 | rubyzip (>= 1.3.0, < 3.0.0) 494 | roo-xls (1.2.0) 495 | nokogiri 496 | roo (>= 2.0.0, < 3) 497 | spreadsheet (> 0.9.0) 498 | rspec (3.11.0) 499 | rspec-core (~> 3.11.0) 500 | rspec-expectations (~> 3.11.0) 501 | rspec-mocks (~> 3.11.0) 502 | rspec-core (3.11.0) 503 | rspec-support (~> 3.11.0) 504 | rspec-expectations (3.11.1) 505 | diff-lcs (>= 1.2.0, < 2.0) 506 | rspec-support (~> 3.11.0) 507 | rspec-its (1.3.0) 508 | rspec-core (>= 3.0.0) 509 | rspec-expectations (>= 3.0.0) 510 | rspec-mocks (3.11.2) 511 | diff-lcs (>= 1.2.0, < 2.0) 512 | rspec-support (~> 3.11.0) 513 | rspec-support (3.11.1) 514 | rubocop (1.25.1) 515 | parallel (~> 1.10) 516 | parser (>= 3.1.0.0) 517 | rainbow (>= 2.2.2, < 4.0) 518 | regexp_parser (>= 1.8, < 3.0) 519 | rexml 520 | rubocop-ast (>= 1.15.1, < 2.0) 521 | ruby-progressbar (~> 1.7) 522 | unicode-display_width (>= 1.4.0, < 3.0) 523 | rubocop-ast (1.29.0) 524 | parser (>= 3.2.1.0) 525 | ruby-ole (1.2.12.2) 526 | ruby-progressbar (1.13.0) 527 | ruby2_keywords (0.0.5) 528 | rubyntlm (0.6.3) 529 | rubyzip (2.3.2) 530 | semverse (3.0.2) 531 | signet (0.18.0) 532 | addressable (~> 2.8) 533 | faraday (>= 0.17.5, < 3.a) 534 | jwt (>= 1.5, < 3.0) 535 | multi_json (~> 1.10) 536 | spreadsheet (1.3.0) 537 | ruby-ole 538 | sslshake (1.3.1) 539 | strings (0.2.1) 540 | strings-ansi (~> 0.2) 541 | unicode-display_width (>= 1.5, < 3.0) 542 | unicode_utils (~> 1.4) 543 | strings-ansi (0.2.0) 544 | test-kitchen (3.5.0) 545 | bcrypt_pbkdf (~> 1.0) 546 | chef-utils (>= 16.4.35) 547 | ed25519 (~> 1.2) 548 | license-acceptance (>= 1.0.11, < 3.0) 549 | mixlib-install (~> 3.6) 550 | mixlib-shellout (>= 1.2, < 4.0) 551 | net-scp (>= 1.1, < 5.0) 552 | net-ssh (>= 2.9, < 8.0) 553 | net-ssh-gateway (>= 1.2, < 3.0) 554 | thor (>= 0.19, < 2.0) 555 | winrm (~> 2.0) 556 | winrm-elevated (~> 1.0) 557 | winrm-fs (~> 1.1) 558 | thor (1.2.2) 559 | timeliness (0.3.10) 560 | tomlrb (1.3.0) 561 | trailblazer-option (0.1.2) 562 | train (3.10.8) 563 | activesupport (>= 6.0.3.1) 564 | azure_graph_rbac (~> 0.16) 565 | azure_mgmt_key_vault (~> 0.17) 566 | azure_mgmt_resources (~> 0.15) 567 | azure_mgmt_security (~> 0.18) 568 | azure_mgmt_storage (~> 0.18) 569 | docker-api (>= 1.26, < 3.0) 570 | google-api-client (>= 0.23.9, <= 0.52.0) 571 | googleauth (>= 0.6.6, <= 0.14.0) 572 | inifile (~> 3.0) 573 | train-core (= 3.10.8) 574 | train-winrm (~> 0.2) 575 | train-aws (0.2.36) 576 | aws-sdk-account (~> 1.14) 577 | aws-sdk-alexaforbusiness (~> 1.0) 578 | aws-sdk-amplify (~> 1.32.0) 579 | aws-sdk-apigateway (~> 1.0) 580 | aws-sdk-apigatewayv2 (~> 1.0) 581 | aws-sdk-applicationautoscaling (>= 1.46, < 1.52) 582 | aws-sdk-athena (~> 1.0) 583 | aws-sdk-autoscaling (>= 1.22, < 1.93) 584 | aws-sdk-batch (>= 1.36, < 1.74) 585 | aws-sdk-budgets (~> 1.0) 586 | aws-sdk-cloudformation (~> 1.0) 587 | aws-sdk-cloudfront (~> 1.0) 588 | aws-sdk-cloudhsm (~> 1.0) 589 | aws-sdk-cloudhsmv2 (~> 1.0) 590 | aws-sdk-cloudtrail (~> 1.8) 591 | aws-sdk-cloudwatch (~> 1.13) 592 | aws-sdk-cloudwatchevents (>= 1.36, < 1.63) 593 | aws-sdk-cloudwatchlogs (~> 1.13) 594 | aws-sdk-codecommit (~> 1.0) 595 | aws-sdk-codedeploy (~> 1.0) 596 | aws-sdk-codepipeline (~> 1.0) 597 | aws-sdk-cognitoidentity (>= 1.26, < 1.46) 598 | aws-sdk-cognitoidentityprovider (>= 1.46, < 1.77) 599 | aws-sdk-configservice (~> 1.21) 600 | aws-sdk-core (~> 3.0) 601 | aws-sdk-costandusagereportservice (~> 1.6) 602 | aws-sdk-databasemigrationservice (>= 1.42, < 1.81) 603 | aws-sdk-dynamodb (~> 1.31) 604 | aws-sdk-ec2 (~> 1.70) 605 | aws-sdk-ecr (~> 1.18) 606 | aws-sdk-ecrpublic (~> 1.3) 607 | aws-sdk-ecs (~> 1.30) 608 | aws-sdk-efs (~> 1.0) 609 | aws-sdk-eks (~> 1.9) 610 | aws-sdk-elasticache (~> 1.0) 611 | aws-sdk-elasticbeanstalk (~> 1.0) 612 | aws-sdk-elasticloadbalancing (~> 1.8) 613 | aws-sdk-elasticloadbalancingv2 (~> 1.0) 614 | aws-sdk-elasticsearchservice (~> 1.0) 615 | aws-sdk-emr (~> 1.53.0) 616 | aws-sdk-eventbridge (>= 1.24, < 1.47) 617 | aws-sdk-firehose (~> 1.0) 618 | aws-sdk-glue (>= 1.71, < 1.146) 619 | aws-sdk-guardduty (~> 1.31) 620 | aws-sdk-iam (~> 1.13) 621 | aws-sdk-kafka (~> 1.0) 622 | aws-sdk-kinesis (~> 1.0) 623 | aws-sdk-kms (~> 1.13) 624 | aws-sdk-lambda (~> 1.0) 625 | aws-sdk-mq (~> 1.40.0) 626 | aws-sdk-networkfirewall (>= 1.6.0) 627 | aws-sdk-networkmanager (>= 1.13.0) 628 | aws-sdk-organizations (>= 1.17, < 1.78) 629 | aws-sdk-ram (>= 1.21, < 1.27) 630 | aws-sdk-rds (~> 1.43) 631 | aws-sdk-redshift (~> 1.0) 632 | aws-sdk-route53 (~> 1.0) 633 | aws-sdk-route53domains (~> 1.0) 634 | aws-sdk-route53resolver (~> 1.0) 635 | aws-sdk-s3 (~> 1.30) 636 | aws-sdk-s3control (~> 1.43.0) 637 | aws-sdk-secretsmanager (>= 1.42, < 1.47) 638 | aws-sdk-securityhub (~> 1.0) 639 | aws-sdk-servicecatalog (>= 1.48, < 1.61) 640 | aws-sdk-ses (~> 1.41.0) 641 | aws-sdk-shield (~> 1.30) 642 | aws-sdk-signer (~> 1.32.0) 643 | aws-sdk-simpledb (~> 1.29.0) 644 | aws-sdk-sms (~> 1.0) 645 | aws-sdk-sns (~> 1.9) 646 | aws-sdk-sqs (~> 1.10) 647 | aws-sdk-ssm (~> 1.0) 648 | aws-sdk-states (>= 1.35, < 1.40) 649 | aws-sdk-synthetics (~> 1.19.0) 650 | aws-sdk-transfer (>= 1.26, < 1.74) 651 | aws-sdk-waf (~> 1.43.0) 652 | train-core (3.10.8) 653 | addressable (~> 2.5) 654 | ffi (!= 1.13.0) 655 | json (>= 1.8, < 3.0) 656 | mixlib-shellout (>= 2.0, < 4.0) 657 | net-scp (>= 1.2, < 5.0) 658 | net-ssh (>= 2.9, < 8.0) 659 | train-habitat (0.2.22) 660 | train-winrm (0.2.13) 661 | winrm (>= 2.3.6, < 3.0) 662 | winrm-elevated (~> 1.2.2) 663 | winrm-fs (~> 1.0) 664 | tty-box (0.7.0) 665 | pastel (~> 0.8) 666 | strings (~> 0.2.0) 667 | tty-cursor (~> 0.7) 668 | tty-color (0.6.0) 669 | tty-cursor (0.7.1) 670 | tty-prompt (0.23.1) 671 | pastel (~> 0.8) 672 | tty-reader (~> 0.8) 673 | tty-reader (0.9.0) 674 | tty-cursor (~> 0.7) 675 | tty-screen (~> 0.8) 676 | wisper (~> 2.0) 677 | tty-screen (0.8.1) 678 | tty-table (0.12.0) 679 | pastel (~> 0.8) 680 | strings (~> 0.2.0) 681 | tty-screen (~> 0.8) 682 | tzinfo (2.0.6) 683 | concurrent-ruby (~> 1.0) 684 | uber (0.1.0) 685 | unf (0.1.4) 686 | unf_ext 687 | unf_ext (0.0.8.2) 688 | unicode-display_width (2.5.0) 689 | unicode_utils (1.4.0) 690 | winrm (2.3.6) 691 | builder (>= 2.1.2) 692 | erubi (~> 1.8) 693 | gssapi (~> 1.2) 694 | gyoku (~> 1.0) 695 | httpclient (~> 2.2, >= 2.2.0.2) 696 | logging (>= 1.6.1, < 3.0) 697 | nori (~> 2.0) 698 | rubyntlm (~> 0.6.0, >= 0.6.3) 699 | winrm-elevated (1.2.3) 700 | erubi (~> 1.8) 701 | winrm (~> 2.0) 702 | winrm-fs (~> 1.0) 703 | winrm-fs (1.3.5) 704 | erubi (~> 1.8) 705 | logging (>= 1.6.1, < 3.0) 706 | rubyzip (~> 2.0) 707 | winrm (~> 2.0) 708 | wisper (2.0.1) 709 | 710 | PLATFORMS 711 | ruby 712 | 713 | DEPENDENCIES 714 | inspec! 715 | kitchen-docker! 716 | kitchen-inspec (>= 2.5.0) 717 | kitchen-salt (>= 0.7.2) 718 | net-ssh (>= 7.0.0) 719 | 720 | BUNDLED WITH 721 | 2.1.2 722 | --------------------------------------------------------------------------------