mirror of
https://github.com/saltstack-formulas/packages-formula.git
synced 2025-04-17 10:10:27 +00:00
commit
4c82563160
44 changed files with 1305 additions and 433 deletions
18
.gitignore
vendored
18
.gitignore
vendored
|
@ -48,6 +48,7 @@ coverage.xml
|
|||
.kitchen
|
||||
.kitchen.local.yml
|
||||
kitchen.local.yml
|
||||
junit-*.xml
|
||||
|
||||
# Translations
|
||||
*.mo
|
||||
|
@ -102,3 +103,20 @@ ENV/
|
|||
|
||||
# mypy
|
||||
.mypy_cache/
|
||||
|
||||
# Bundler
|
||||
Gemfile.lock
|
||||
|
||||
# copied `.md` files used for conversion to `.rst` using `m2r`
|
||||
docs/*.md
|
||||
|
||||
# Vim
|
||||
*.sw?
|
||||
|
||||
## Collected when centralising formulas (check and sort)
|
||||
# `collectd-formula`
|
||||
.pytest_cache/
|
||||
/.idea/
|
||||
Dockerfile.*_*
|
||||
ignore/
|
||||
tmp/
|
||||
|
|
10
.rubocop.yml
Normal file
10
.rubocop.yml
Normal file
|
@ -0,0 +1,10 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# vim: ft=yaml
|
||||
---
|
||||
# General overrides used across formulas in the org
|
||||
Metrics/LineLength:
|
||||
# Increase from default of `80`
|
||||
# Based on https://github.com/PyCQA/flake8-bugbear#opinionated-warnings (`B950`)
|
||||
Max: 88
|
||||
|
||||
# Any offenses that should be fixed, e.g. collected via. `rubocop --auto-gen-config`
|
14
.salt-lint
Normal file
14
.salt-lint
Normal file
|
@ -0,0 +1,14 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# vim: ft=yaml
|
||||
---
|
||||
exclude_paths: []
|
||||
rules: {}
|
||||
skip_list:
|
||||
# Using `salt-lint` for linting other files as well, such as Jinja macros/templates
|
||||
- 205 # Use ".sls" as a Salt State file extension
|
||||
# Skipping `207` and `208` because `210` is sufficient, at least for the time-being
|
||||
# I.e. Allows 3-digit unquoted codes to still be used, such as `644` and `755`
|
||||
- 207 # File modes should always be encapsulated in quotation marks
|
||||
- 208 # File modes should always contain a leading zero
|
||||
tags: []
|
||||
verbosity: 1
|
127
.travis.yml
127
.travis.yml
|
@ -1,21 +1,116 @@
|
|||
sudo: required
|
||||
cache: bundler
|
||||
language: ruby
|
||||
# -*- coding: utf-8 -*-
|
||||
# vim: ft=yaml
|
||||
---
|
||||
## Machine config
|
||||
os: 'linux'
|
||||
arch: 'amd64'
|
||||
dist: 'bionic'
|
||||
version: '~> 1.0'
|
||||
|
||||
## Language and cache config
|
||||
language: 'ruby'
|
||||
cache: 'bundler'
|
||||
|
||||
## Services config
|
||||
services:
|
||||
- docker
|
||||
|
||||
before_install:
|
||||
- bundle install
|
||||
|
||||
env:
|
||||
matrix:
|
||||
- INSTANCE: deb-debian-9
|
||||
- INSTANCE: ubu16-ubuntu-1604
|
||||
- INSTANCE: ubu18-ubuntu-1804
|
||||
- INSTANCE: rpm-centos-7
|
||||
- INSTANCE: fed-fedora
|
||||
- INSTANCE: sus-opensuse-leap-salt-minion
|
||||
|
||||
## Script to run for the test stage
|
||||
script:
|
||||
- bundle exec kitchen verify ${INSTANCE}
|
||||
- bin/kitchen verify "${INSTANCE}"
|
||||
|
||||
## Stages and jobs matrix
|
||||
stages:
|
||||
- test
|
||||
- name: 'release'
|
||||
if: 'branch = master AND type != pull_request'
|
||||
jobs:
|
||||
include:
|
||||
## Define the test stage that runs the linters (and testing matrix, if applicable)
|
||||
|
||||
# Run all of the linters in a single job
|
||||
- language: 'node_js'
|
||||
node_js: 'lts/*'
|
||||
env: 'Lint'
|
||||
name: 'Lint: salt-lint, yamllint, rubocop, shellcheck & commitlint'
|
||||
before_install: 'skip'
|
||||
script:
|
||||
# Install and run `salt-lint`
|
||||
- pip install --user salt-lint
|
||||
- git ls-files -- '*.sls' '*.jinja' '*.j2' '*.tmpl' '*.tst'
|
||||
| xargs salt-lint
|
||||
# Install and run `yamllint`
|
||||
# Need at least `v1.17.0` for the `yaml-files` setting
|
||||
- pip install --user yamllint>=1.17.0
|
||||
- yamllint -s .
|
||||
# Install and run `rubocop`
|
||||
- gem install rubocop
|
||||
- rubocop -d
|
||||
# Run `shellcheck` (already pre-installed in Travis)
|
||||
- shellcheck --version
|
||||
- git ls-files -- '*.sh' '*.bash' '*.ksh'
|
||||
| xargs shellcheck
|
||||
# Install and run `commitlint`
|
||||
- npm i -D @commitlint/config-conventional
|
||||
@commitlint/travis-cli
|
||||
- commitlint-travis
|
||||
|
||||
## Define the rest of the matrix based on Kitchen testing
|
||||
# Make sure the instances listed below match up with
|
||||
# the `platforms` defined in `kitchen.yml`
|
||||
- env: INSTANCE=debian-debian-10-master-py3
|
||||
# - env: INSTANCE=ubuntu-ubuntu-1804-master-py3
|
||||
# - env: INSTANCE=centos-centos-8-master-py3
|
||||
# - env: INSTANCE=fedora-fedora-31-master-py3
|
||||
# - env: INSTANCE=suse-opensuse-leap-151-master-py3
|
||||
# - env: INSTANCE=amazon-amazonlinux-2-master-py2
|
||||
# - env: INSTANCE=arch-arch-base-latest-master-py2
|
||||
# - env: INSTANCE=debian-debian-10-2019-2-py3
|
||||
# - env: INSTANCE=debian-debian-9-2019-2-py3
|
||||
- env: INSTANCE=ubuntu-ubuntu-1804-2019-2-py3
|
||||
# - env: INSTANCE=centos-centos-8-2019-2-py3
|
||||
# - env: INSTANCE=fedora-fedora-31-2019-2-py3
|
||||
- env: INSTANCE=suse-opensuse-leap-151-2019-2-py3
|
||||
# - env: INSTANCE=centos-centos-7-2019-2-py2
|
||||
- env: INSTANCE=amazon-amazonlinux-2-2019-2-py2
|
||||
# - env: INSTANCE=arch-arch-base-latest-2019-2-py2
|
||||
- env: INSTANCE=fedora-fedora-30-2018-3-py3
|
||||
# - env: INSTANCE=debian-debian-9-2018-3-py2
|
||||
# - env: INSTANCE=ubuntu-ubuntu-1604-2018-3-py2
|
||||
- env: INSTANCE=centos-centos-7-2018-3-py2
|
||||
# - env: INSTANCE=suse-opensuse-leap-151-2018-3-py2
|
||||
# - env: INSTANCE=amazon-amazonlinux-2-2018-3-py2
|
||||
# - env: INSTANCE=arch-arch-base-latest-2018-3-py2
|
||||
# - env: INSTANCE=debian-debian-8-2017-7-py2
|
||||
# - env: INSTANCE=ubuntu-ubuntu-1604-2017-7-py2
|
||||
# - env: INSTANCE=centos-centos-6-2017-7-py2
|
||||
# - env: INSTANCE=fedora-fedora-30-2017-7-py2
|
||||
# - env: INSTANCE=suse-opensuse-leap-151-2017-7-py2
|
||||
# - env: INSTANCE=amazon-amazonlinux-2-2017-7-py2
|
||||
- env: INSTANCE=arch-arch-base-latest-2017-7-py2
|
||||
|
||||
## Define the release stage that runs `semantic-release`
|
||||
- stage: 'release'
|
||||
language: 'node_js'
|
||||
node_js: 'lts/*'
|
||||
env: 'Release'
|
||||
name: 'Run semantic-release inc. file updates to AUTHORS, CHANGELOG & FORMULA'
|
||||
before_install: 'skip'
|
||||
script:
|
||||
# Update `AUTHORS.md`
|
||||
- export MAINTAINER_TOKEN=${GH_TOKEN}
|
||||
- go get github.com/myii/maintainer
|
||||
- maintainer contributor
|
||||
|
||||
# Install all dependencies required for `semantic-release`
|
||||
- npm i -D @semantic-release/changelog@3
|
||||
@semantic-release/exec@3
|
||||
@semantic-release/git@7
|
||||
deploy:
|
||||
provider: 'script'
|
||||
# Opt-in to `dpl v2` to complete the Travis build config validation (beta)
|
||||
# * https://docs.travis-ci.com/user/build-config-validation
|
||||
# Deprecated `skip_cleanup` can now be avoided, `cleanup: false` is by default
|
||||
edge: true
|
||||
# Run `semantic-release`
|
||||
script: 'npx semantic-release@15.14'
|
||||
|
|
36
.yamllint
Normal file
36
.yamllint
Normal file
|
@ -0,0 +1,36 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# vim: ft=yaml
|
||||
---
|
||||
# Extend the `default` configuration provided by `yamllint`
|
||||
extends: default
|
||||
|
||||
# Files to ignore completely
|
||||
# 1. All YAML files under directory `node_modules/`, introduced during the Travis run
|
||||
# 2. Any SLS files under directory `test/`, which are actually state files
|
||||
# 3. Any YAML files under directory `.kitchen/`, introduced during local testing
|
||||
ignore: |
|
||||
node_modules/
|
||||
test/**/states/**/*.sls
|
||||
.kitchen/
|
||||
|
||||
yaml-files:
|
||||
# Default settings
|
||||
- '*.yaml'
|
||||
- '*.yml'
|
||||
- .salt-lint
|
||||
- .yamllint
|
||||
# SaltStack Formulas additional settings
|
||||
- '*.example'
|
||||
- test/**/*.sls
|
||||
|
||||
rules:
|
||||
empty-values:
|
||||
forbid-in-block-mappings: true
|
||||
forbid-in-flow-mappings: true
|
||||
line-length:
|
||||
# Increase from default of `80`
|
||||
# Based on https://github.com/PyCQA/flake8-bugbear#opinionated-warnings (`B950`)
|
||||
max: 88
|
||||
octal-values:
|
||||
forbid-implicit-octal: true
|
||||
forbid-explicit-octal: true
|
9
FORMULA
Normal file
9
FORMULA
Normal file
|
@ -0,0 +1,9 @@
|
|||
name: packages
|
||||
os: Debian, Ubuntu, Raspbian, RedHat, Fedora, CentOS, Suse, openSUSE
|
||||
os_family: Debian, RedHat, Suse
|
||||
version: 3.2.1
|
||||
release: 1
|
||||
minimum_version: 2017.7
|
||||
summary: packages formula
|
||||
description: Formula to install packages
|
||||
top_level_dir: packages
|
14
Gemfile
14
Gemfile
|
@ -1,7 +1,11 @@
|
|||
source "https://rubygems.org"
|
||||
# frozen_string_literal: true
|
||||
|
||||
gem "test-kitchen"
|
||||
gem "kitchen-docker"
|
||||
gem "kitchen-salt"
|
||||
gem "kitchen-inspec"
|
||||
source 'https://rubygems.org'
|
||||
|
||||
gem 'kitchen-docker', '>= 2.9'
|
||||
gem 'kitchen-inspec', '>= 1.1'
|
||||
gem 'kitchen-salt', '>= 0.6.0'
|
||||
# Latest versions of `train` cause failure when running `kitchen verify`
|
||||
# Downgrading to `3.2.0` until this is fixed upstream
|
||||
# https://github.com/inspec/train/pull/544#issuecomment-566055052
|
||||
gem 'train', '3.2.0'
|
||||
|
|
32
bin/kitchen
Executable file
32
bin/kitchen
Executable file
|
@ -0,0 +1,32 @@
|
|||
#!/usr/bin/env ruby
|
||||
# frozen_string_literal: true
|
||||
|
||||
#
|
||||
# This file was generated by Bundler.
|
||||
#
|
||||
# The application 'kitchen' is installed as part of a gem, and
|
||||
# this file is here to facilitate running it.
|
||||
#
|
||||
|
||||
require 'pathname'
|
||||
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile',
|
||||
Pathname.new(__FILE__).realpath)
|
||||
|
||||
bundle_binstub = File.expand_path('bundle', __dir__)
|
||||
|
||||
if File.file?(bundle_binstub)
|
||||
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
|
||||
load(bundle_binstub)
|
||||
else
|
||||
abort(
|
||||
'Your `bin/bundle` was not generated by Bundler, '\
|
||||
'so this binstub cannot run. Replace `bin/bundle` by running '\
|
||||
'`bundle binstubs bundler --force`, then run this command again.'
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
require 'rubygems'
|
||||
require 'bundler/setup'
|
||||
|
||||
load Gem.bin_path('test-kitchen', 'kitchen')
|
3
commitlint.config.js
Normal file
3
commitlint.config.js
Normal file
|
@ -0,0 +1,3 @@
|
|||
module.exports = {
|
||||
extends: ['@commitlint/config-conventional'],
|
||||
};
|
|
@ -1,11 +1,47 @@
|
|||
================
|
||||
.. _readme:
|
||||
|
||||
packages-formula
|
||||
================
|
||||
|
||||
A simple 'packages manager' formula, to install/remove packages without further
|
||||
ado.
|
||||
|img_travis| |img_sr|
|
||||
|
||||
.. |img_travis| image:: https://travis-ci.com/saltstack-formulas/template-formula.svg?branch=master
|
||||
:alt: Travis CI Build Status
|
||||
:scale: 100%
|
||||
:target: https://travis-ci.com/saltstack-formulas/template-formula
|
||||
.. |img_sr| image:: https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg
|
||||
:alt: Semantic Release
|
||||
:scale: 100%
|
||||
:target: https://github.com/semantic-release/semantic-release
|
||||
|
||||
A simple 'packages manager' formula, to install/remove packages without further
|
||||
|
||||
.. contents:: **Table of Contents**
|
||||
|
||||
General notes
|
||||
-------------
|
||||
|
||||
See the full `SaltStack Formulas installation and usage instructions
|
||||
<https://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html>`_.
|
||||
|
||||
If you are interested in writing or contributing to formulas, please pay attention to the `Writing Formula Section
|
||||
<https://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html#writing-formulas>`_.
|
||||
|
||||
If you want to use this formula, please pay attention to the ``FORMULA`` file and/or ``git tag``,
|
||||
which contains the currently released version. This formula is versioned according to `Semantic Versioning <http://semver.org/>`_.
|
||||
|
||||
See `Formula Versioning Section <https://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html#versioning>`_ for more details.
|
||||
|
||||
Contributing to this repo
|
||||
-------------------------
|
||||
|
||||
**Commit message formatting is significant!!**
|
||||
|
||||
Please see :ref:`How to contribute <CONTRIBUTING>` for more details.
|
||||
|
||||
Available states
|
||||
----------------
|
||||
|
||||
.. image:: https://travis-ci.org/saltstack-formulas/packages-formula.svg?branch=master
|
||||
|
||||
What this formula can do
|
||||
========================
|
||||
|
@ -28,24 +64,18 @@ This formula is not intended to configure packages, nor setup services or daemon
|
|||
When you need to do that for a package, you should probably be using another
|
||||
formula.
|
||||
|
||||
.. note::
|
||||
|
||||
See the full `Salt Formulas installation and usage instructions
|
||||
<http://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html>`_.
|
||||
|
||||
Available states
|
||||
================
|
||||
|
||||
.. contents::
|
||||
:local:
|
||||
:local:
|
||||
|
||||
``packages``
|
||||
------------
|
||||
^^^^^^^^^^^^
|
||||
|
||||
*Meta-state (This is a state that includes other states)*.
|
||||
|
||||
Runs all the other states in the formula.
|
||||
|
||||
``packages.pkgs``
|
||||
-----------------
|
||||
^^^^^^^^^^^^^^^^^
|
||||
|
||||
Allows you to manage system's packages. You can specify:
|
||||
|
||||
|
@ -98,7 +128,7 @@ Allows you to manage system's packages. You can specify:
|
|||
correct installation.
|
||||
|
||||
``packages.pips``
|
||||
-----------------
|
||||
^^^^^^^^^^^^^^^^^
|
||||
|
||||
You can specify:
|
||||
|
||||
|
@ -113,7 +143,7 @@ You can specify:
|
|||
correct installation (ie, ``epel`` for RedHat families).
|
||||
|
||||
``packages.gems``
|
||||
-----------------
|
||||
^^^^^^^^^^^^^^^^^
|
||||
|
||||
You can specify:
|
||||
|
||||
|
@ -128,7 +158,7 @@ You can specify:
|
|||
correct installation (ie, ``epel`` for RedHat families).
|
||||
|
||||
``packages.npms``
|
||||
-----------------
|
||||
^^^^^^^^^^^^^^^^^
|
||||
|
||||
This formula **DOES NOT** install ``nodejs/npm``, as it's outside of its scope:
|
||||
nodejs/npm that comes with the distros is usually outdated, so it's required to add
|
||||
|
@ -150,7 +180,7 @@ You can specify:
|
|||
correct installation (ie, ``epel`` for RedHat families).
|
||||
|
||||
``packages.archives``
|
||||
-------------------
|
||||
^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
'Archive file` handler for common 'download' and 'checksum' states. All formats recognized by `salt.states.archive.extracted` (tar, rar, zip, etc) will be extracted. Alternatively `raw` formats are supported (`raw`, `bin`,) for standard and binary executable files.
|
||||
|
||||
|
@ -160,7 +190,7 @@ You can specify:
|
|||
|
||||
|
||||
``packages.snaps``
|
||||
-----------------
|
||||
^^^^^^^^^^^^^^^^^^
|
||||
|
||||
You can specify:
|
||||
|
||||
|
@ -187,7 +217,7 @@ You can specify:
|
|||
|
||||
|
||||
``packages.remote_pkgs``
|
||||
------------------------
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
You can specify a dictionary of remote system packages (deb/rpm) that you want
|
||||
to install, in the format:
|
||||
|
@ -195,18 +225,47 @@ to install, in the format:
|
|||
``name: url``
|
||||
|
||||
Testing
|
||||
=======
|
||||
-------
|
||||
|
||||
Testing is done with `Test Kitchen <http://kitchen.ci/>`_
|
||||
for machine setup and `inspec <https://www.inspec.io/docs/>`_
|
||||
for integration tests.
|
||||
Linux testing is done with ``kitchen-salt``.
|
||||
|
||||
Tested on
|
||||
Requirements
|
||||
^^^^^^^^^^^^
|
||||
|
||||
* Ruby
|
||||
* Docker
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ gem install bundler
|
||||
$ bundle install
|
||||
$ bin/kitchen test [platform]
|
||||
|
||||
Where ``[platform]`` is the platform name defined in ``kitchen.yml``,
|
||||
e.g. ``debian-9-2019-2-py3``.
|
||||
|
||||
``bin/kitchen converge``
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Creates the docker instance and runs the ``template`` main state, ready for testing.
|
||||
|
||||
``bin/kitchen verify``
|
||||
^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Runs the ``inspec`` tests on the actual instance.
|
||||
|
||||
``bin/kitchen destroy``
|
||||
^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Removes the docker instance.
|
||||
|
||||
``bin/kitchen test``
|
||||
^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Runs all of the stages above in one go: i.e. ``destroy`` + ``converge`` + ``verify`` + ``destroy``.
|
||||
|
||||
``bin/kitchen login``
|
||||
^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Gives you SSH access to the instance for manual testing.
|
||||
|
||||
* Debian/9
|
||||
* Debian/8 (with backports)
|
||||
* Centos/7
|
||||
* Fedora/27
|
||||
* Ubuntu/16.04
|
||||
* Ubuntu/18.04
|
||||
* Opensuse/leap
|
426
kitchen.yml
426
kitchen.yml
|
@ -4,207 +4,351 @@
|
|||
# For help on this file's format, see https://kitchen.ci/
|
||||
driver:
|
||||
name: docker
|
||||
|
||||
driver_config:
|
||||
use_sudo: false
|
||||
privileged: true
|
||||
provision_command: mkdir -p /run/sshd
|
||||
run_command: /lib/systemd/systemd
|
||||
|
||||
# Make sure the platforms listed below match up with
|
||||
# the `env.matrix` instances defined in `.travis.yml`
|
||||
platforms:
|
||||
# The `run_command` used for each platform is required to
|
||||
# test `systemd` services in docker
|
||||
- name: debian-9
|
||||
driver_config:
|
||||
image: debian:9
|
||||
run_command: /lib/systemd/systemd
|
||||
## SALT `master`
|
||||
- name: debian-10-master-py3
|
||||
driver:
|
||||
image: netmanagers/salt-master-py3:debian-10
|
||||
provision_command:
|
||||
- apt-get update && apt-get install -y udev locales git
|
||||
- echo 'export PATH=${PATH}:/usr/local/go/bin' >/etc/default/golang.sh
|
||||
- export PATH="${PATH}:/usr/local/go/bin"
|
||||
- name: ubuntu-18.04
|
||||
driver_config:
|
||||
image: ubuntu:18.04
|
||||
run_command: /lib/systemd/systemd
|
||||
- curl -o bootstrap-salt.sh -L https://bootstrap.saltstack.com
|
||||
- sh bootstrap-salt.sh -XdPbfrq -x python3 git master
|
||||
- apt-get install -y snapd
|
||||
- name: ubuntu-1804-master-py3
|
||||
driver:
|
||||
image: netmanagers/salt-master-py3:ubuntu-18.04
|
||||
provision_command:
|
||||
- apt-get update && apt-get install -y udev locales git
|
||||
- echo 'export PATH=${PATH}:/usr/local/go/bin' >/etc/default/golang.sh
|
||||
- export PATH="${PATH}:/usr/local/go/bin"
|
||||
- name: ubuntu-16.04
|
||||
driver_config:
|
||||
image: ubuntu:16.04
|
||||
run_command: /lib/systemd/systemd
|
||||
- curl -o bootstrap-salt.sh -L https://bootstrap.saltstack.com
|
||||
- sh bootstrap-salt.sh -XdPbfrq -x python3 git master
|
||||
- name: centos-8-master-py3
|
||||
driver:
|
||||
image: netmanagers/salt-master-py3:centos-8
|
||||
provision_command:
|
||||
- apt-get update && apt-get install -y udev locales git
|
||||
- locale-gen en_US.UTF-8
|
||||
- update-locale LANG=en_US.UTF-8
|
||||
- echo 'export PATH=${PATH}:/usr/local/go/bin' >/etc/default/golang.sh
|
||||
- export PATH="${PATH}:/usr/local/go/bin"
|
||||
- name: centos-7
|
||||
driver_config:
|
||||
image: centos:7
|
||||
- curl -o bootstrap-salt.sh -L https://bootstrap.saltstack.com
|
||||
- sh bootstrap-salt.sh -XdPbfrq -x python3 git master
|
||||
- name: fedora-31-master-py3
|
||||
driver:
|
||||
image: netmanagers/salt-master-py3:fedora-31
|
||||
provision_command:
|
||||
- curl -o bootstrap-salt.sh -L https://bootstrap.saltstack.com
|
||||
- sh bootstrap-salt.sh -XdPbfrq -x python3 git master
|
||||
- name: opensuse-leap-151-master-py3
|
||||
driver:
|
||||
image: netmanagers/salt-master-py3:opensuse-leap-15.1
|
||||
provision_command:
|
||||
- curl -o bootstrap-salt.sh -L https://bootstrap.saltstack.com
|
||||
- sh bootstrap-salt.sh -XdPbfrq -x python3 git master
|
||||
run_command: /usr/lib/systemd/systemd
|
||||
# Workaround to avoid intermittent failures on `opensuse-leap-15.1`:
|
||||
# => SCP did not finish successfully (255): (Net::SCP::Error)
|
||||
transport:
|
||||
max_ssh_sessions: 1
|
||||
# Use the `develop` image temporarily until the `master` image is available
|
||||
# Not changing the name to minimise disruption across all of the formulas
|
||||
- name: amazonlinux-2-master-py2
|
||||
driver:
|
||||
image: netmanagers/salt-develop-py2:amazonlinux-2
|
||||
provision_command:
|
||||
- yum -y update && yum -y install udev git
|
||||
# To test remote packages in RPM envs
|
||||
- rpm --import https://zoom.us/linux/download/pubkey
|
||||
- name: fedora
|
||||
driver_config:
|
||||
image: fedora
|
||||
- curl -o bootstrap-salt.sh -L https://bootstrap.saltstack.com
|
||||
- sh bootstrap-salt.sh -XdPbfrq -x python2 git develop
|
||||
- name: arch-base-latest-master-py2
|
||||
driver:
|
||||
image: netmanagers/salt-master-py2:arch-base-latest
|
||||
provision_command:
|
||||
- curl -o bootstrap-salt.sh -L https://bootstrap.saltstack.com
|
||||
- sh bootstrap-salt.sh -XdPbfrq -x python2 git master
|
||||
run_command: /usr/lib/systemd/systemd
|
||||
|
||||
## SALT `2019.2`
|
||||
- name: debian-10-2019-2-py3
|
||||
driver:
|
||||
image: netmanagers/salt-2019.2-py3:debian-10
|
||||
provision_command:
|
||||
- yum -y update && yum -y install udev git
|
||||
# To test remote packages in RPM envs
|
||||
- rpm --import https://zoom.us/linux/download/pubkey
|
||||
# As of February 2019, there have been problems getting `opensuse` to work:
|
||||
# * `opensuse` is deprecated
|
||||
# * `opensuse/leap` grabs `15.x`, which doesn't run the `inspec` tests
|
||||
# * `opensuse/tumbleweed` doesn't install `salt-minion`
|
||||
# * `opensuse/leap:42.3` does work
|
||||
# * `opensuse/salt-minion` uses `42.3` with `salt-minion` pre-installed
|
||||
- name: opensuse-leap-salt-minion
|
||||
driver_config:
|
||||
image: opensuse/salt-minion
|
||||
- apt-get install -y snapd
|
||||
- name: debian-9-2019-2-py3
|
||||
driver:
|
||||
image: netmanagers/salt-2019.2-py3:debian-9
|
||||
provision_command:
|
||||
- apt-get install -y snapd
|
||||
- name: ubuntu-1804-2019-2-py3
|
||||
driver:
|
||||
image: netmanagers/salt-2019.2-py3:ubuntu-18.04
|
||||
- name: centos-8-2019-2-py3
|
||||
driver:
|
||||
image: netmanagers/salt-2019.2-py3:centos-8
|
||||
- name: fedora-31-2019-2-py3
|
||||
driver:
|
||||
image: netmanagers/salt-2019.2-py3:fedora-31
|
||||
- name: opensuse-leap-151-2019-2-py3
|
||||
driver:
|
||||
image: netmanagers/salt-2019.2-py3:opensuse-leap-15.1
|
||||
run_command: /usr/lib/systemd/systemd
|
||||
# Workaround to avoid intermittent failures on `opensuse-leap-15.1`:
|
||||
# => SCP did not finish successfully (255): (Net::SCP::Error)
|
||||
transport:
|
||||
max_ssh_sessions: 1
|
||||
- name: centos-7-2019-2-py2
|
||||
driver:
|
||||
image: netmanagers/salt-2019.2-py2:centos-7
|
||||
- name: amazonlinux-2-2019-2-py2
|
||||
driver:
|
||||
image: netmanagers/salt-2019.2-py2:amazonlinux-2
|
||||
- name: arch-base-latest-2019-2-py2
|
||||
driver:
|
||||
image: netmanagers/salt-2019.2-py2:arch-base-latest
|
||||
run_command: /usr/lib/systemd/systemd
|
||||
|
||||
## SALT `2018.3`
|
||||
- name: fedora-30-2018-3-py3
|
||||
driver:
|
||||
image: netmanagers/salt-2018.3-py3:fedora-30
|
||||
- name: debian-9-2018-3-py2
|
||||
driver:
|
||||
image: netmanagers/salt-2018.3-py2:debian-9
|
||||
provision_command:
|
||||
- zypper refresh && zypper install -y udev git glibc-locale
|
||||
- systemctl enable sshd.service
|
||||
- cat /etc/os-release
|
||||
# To test remote packages in RPM envs
|
||||
- rpm --import https://zoom.us/linux/download/pubkey
|
||||
- apt-get install -y snapd
|
||||
- name: ubuntu-1604-2018-3-py2
|
||||
driver:
|
||||
image: netmanagers/salt-2018.3-py2:ubuntu-16.04
|
||||
- name: centos-7-2018-3-py2
|
||||
driver:
|
||||
image: netmanagers/salt-2018.3-py2:centos-7
|
||||
- name: opensuse-leap-151-2018-3-py2
|
||||
driver:
|
||||
image: netmanagers/salt-2018.3-py2:opensuse-leap-15.1
|
||||
run_command: /usr/lib/systemd/systemd
|
||||
# Workaround to avoid intermittent failures on `opensuse-leap-15.1`:
|
||||
# => SCP did not finish successfully (255): (Net::SCP::Error)
|
||||
transport:
|
||||
max_ssh_sessions: 1
|
||||
- name: amazonlinux-2-2018-3-py2
|
||||
driver:
|
||||
image: netmanagers/salt-2018.3-py2:amazonlinux-2
|
||||
- name: arch-base-latest-2018-3-py2
|
||||
driver:
|
||||
image: netmanagers/salt-2018.3-py2:arch-base-latest
|
||||
run_command: /usr/lib/systemd/systemd
|
||||
|
||||
## SALT `2017.7`
|
||||
- name: debian-8-2017-7-py2
|
||||
driver:
|
||||
image: netmanagers/salt-2017.7-py2:debian-8
|
||||
- name: ubuntu-1604-2017-7-py2
|
||||
driver:
|
||||
image: netmanagers/salt-2017.7-py2:ubuntu-16.04
|
||||
- name: centos-6-2017-7-py2
|
||||
driver:
|
||||
image: netmanagers/salt-2017.7-py2:centos-6
|
||||
run_command: /sbin/init
|
||||
- name: fedora-30-2017-7-py2
|
||||
driver:
|
||||
image: netmanagers/salt-2017.7-py2:fedora-30
|
||||
- name: opensuse-leap-151-2017-7-py2
|
||||
driver:
|
||||
image: netmanagers/salt-2017.7-py2:opensuse-leap-15.1
|
||||
run_command: /usr/lib/systemd/systemd
|
||||
# Workaround to avoid intermittent failures on `opensuse-leap-15.1`:
|
||||
# => SCP did not finish successfully (255): (Net::SCP::Error)
|
||||
transport:
|
||||
max_ssh_sessions: 1
|
||||
- name: amazonlinux-2-2017-7-py2
|
||||
driver:
|
||||
image: netmanagers/salt-2017.7-py2:amazonlinux-2
|
||||
- name: arch-base-latest-2017-7-py2
|
||||
driver:
|
||||
image: netmanagers/salt-2017.7-py2:arch-base-latest
|
||||
run_command: /usr/lib/systemd/systemd
|
||||
|
||||
provisioner:
|
||||
name: salt_solo
|
||||
log_level: info
|
||||
log_level: debug
|
||||
salt_install: none
|
||||
require_chef: false
|
||||
salt_version: latest
|
||||
formula: packages
|
||||
salt_copy_filter:
|
||||
- .kitchen
|
||||
- .git
|
||||
pillars_from_files:
|
||||
packages.sls: pillar.example
|
||||
pillars:
|
||||
top.sls:
|
||||
base:
|
||||
'*':
|
||||
- packages
|
||||
state_top:
|
||||
base:
|
||||
'*':
|
||||
- packages
|
||||
|
||||
verifier:
|
||||
# https://www.inspec.io/
|
||||
name: inspec
|
||||
sudo: true
|
||||
# cli, documentation, html, progress, json, json-min, json-rspec, junit
|
||||
reporter:
|
||||
- cli
|
||||
inspec_tests:
|
||||
- path: test/integration/default
|
||||
|
||||
suites:
|
||||
- name: deb
|
||||
excludes:
|
||||
- ubuntu-16.04
|
||||
- ubuntu-18.04
|
||||
- centos-7
|
||||
- fedora
|
||||
- opensuse-leap-salt-minion
|
||||
- name: debian
|
||||
includes:
|
||||
- debian-10-master-py3
|
||||
- debian-10-2019-2-py3
|
||||
- debian-9-2019-2-py3
|
||||
- debian-9-2018-3-py2
|
||||
- debian-8-2017-7-py2
|
||||
provisioner:
|
||||
state_top:
|
||||
base:
|
||||
'*':
|
||||
- node
|
||||
- packages
|
||||
pillars:
|
||||
top.sls:
|
||||
base:
|
||||
'*':
|
||||
- packages
|
||||
pillars_from_files:
|
||||
packages.sls: test/salt/pillar/debian.sls
|
||||
dependencies:
|
||||
- name: node
|
||||
repo: git
|
||||
source: https://github.com/saltstack-formulas/node-formula.git
|
||||
verifier:
|
||||
inspec_tests:
|
||||
- path: test/integration/default
|
||||
- name: ubuntu
|
||||
includes:
|
||||
- ubuntu-1804-master-py3
|
||||
- ubuntu-1804-2019-2-py3
|
||||
- ubuntu-1604-2018-3-py2
|
||||
- ubuntu-1604-2017-7-py2
|
||||
provisioner:
|
||||
state_top:
|
||||
base:
|
||||
'*':
|
||||
- node
|
||||
- golang.package
|
||||
- packages
|
||||
pillars_from_files:
|
||||
packages.sls: pillar.example
|
||||
pillars:
|
||||
top.sls:
|
||||
base:
|
||||
'*':
|
||||
- node
|
||||
- packages
|
||||
pillars_from_files:
|
||||
packages.sls: test/salt/pillar/ubuntu.sls
|
||||
dependencies:
|
||||
- name: golang
|
||||
repo: git
|
||||
source: https://github.com/saltstack-formulas/golang-formula.git
|
||||
verifier:
|
||||
inspec_tests:
|
||||
- path: test/integration/default
|
||||
- name: fedora
|
||||
includes:
|
||||
- fedora-31-master-py3
|
||||
- fedora-31-2019-2-py3
|
||||
- fedora-30-2018-3-py3
|
||||
- fedora-30-2017-7-py2
|
||||
provisioner:
|
||||
state_top:
|
||||
base:
|
||||
'*':
|
||||
- packages
|
||||
node.sls:
|
||||
node:
|
||||
version: 11.11.0-1nodesource1
|
||||
install_from_ppa: True
|
||||
ppa:
|
||||
repository_url: https://deb.nodesource.com/node_11.x
|
||||
|
||||
- name: ubu18
|
||||
excludes:
|
||||
- debian-9
|
||||
- ubuntu-16.04
|
||||
- centos-7
|
||||
- fedora
|
||||
- opensuse-leap-salt-minion
|
||||
provisioner:
|
||||
pillars:
|
||||
top.sls:
|
||||
base:
|
||||
'*':
|
||||
- packages
|
||||
pillars_from_files:
|
||||
packages.sls: test/integration/default/pillar.example.ubuntu.1804
|
||||
|
||||
- name: ubu16
|
||||
excludes:
|
||||
- debian-9
|
||||
- ubuntu-18.04
|
||||
- centos-7
|
||||
- fedora
|
||||
- opensuse-leap-salt-minion
|
||||
packages.sls: test/salt/pillar/fedora.sls
|
||||
verifier:
|
||||
inspec_tests:
|
||||
- path: test/integration/default
|
||||
- name: centos
|
||||
includes:
|
||||
- centos-8-master-py3
|
||||
- centos-8-2019-2-py3
|
||||
- centos-7-2019-2-py2
|
||||
- centos-7-2018-3-py2
|
||||
- centos-6-2017-7-py2
|
||||
provisioner:
|
||||
state_top:
|
||||
base:
|
||||
'*':
|
||||
- epel
|
||||
- packages
|
||||
pillars:
|
||||
top.sls:
|
||||
base:
|
||||
'*':
|
||||
- packages
|
||||
pillars_from_files:
|
||||
packages.sls: test/integration/default/pillar.example.ubuntu.1604
|
||||
|
||||
- name: fed
|
||||
excludes:
|
||||
- debian-9
|
||||
- ubuntu-16.04
|
||||
- ubuntu-18.04
|
||||
- centos-7
|
||||
- opensuse-leap-salt-minion
|
||||
provisioner:
|
||||
pillars_from_files:
|
||||
packages.sls: test/integration/default/pillar.example.fedora
|
||||
|
||||
- name: sus
|
||||
excludes:
|
||||
- debian-9
|
||||
- ubuntu-16.04
|
||||
- ubuntu-18.04
|
||||
- centos-7
|
||||
- fedora
|
||||
provisioner:
|
||||
pillars_from_files:
|
||||
packages.sls: test/integration/default/pillar.example.opensuse
|
||||
|
||||
- name: rpm
|
||||
excludes:
|
||||
- debian-9
|
||||
- ubuntu-16.04
|
||||
- ubuntu-18.04
|
||||
- fedora
|
||||
- opensuse-leap-salt-minion
|
||||
provisioner:
|
||||
packages.sls: test/salt/pillar/redhat.sls
|
||||
dependencies:
|
||||
- name: epel
|
||||
repo: git
|
||||
source: https://github.com/saltstack-formulas/epel-formula.git
|
||||
verifier:
|
||||
inspec_tests:
|
||||
- path: test/integration/default
|
||||
- name: amazon
|
||||
includes:
|
||||
- amazonlinux-2-master-py2
|
||||
- amazonlinux-2-2019-2-py2
|
||||
- amazonlinux-2-2018-3-py2
|
||||
- amazonlinux-2-2017-7-py2
|
||||
provisioner:
|
||||
state_top:
|
||||
base:
|
||||
'*':
|
||||
- epel
|
||||
- packages
|
||||
pillars_from_files:
|
||||
packages.sls: test/integration/default/pillar.example.redhat
|
||||
pillars:
|
||||
top.sls:
|
||||
base:
|
||||
'*':
|
||||
- epel
|
||||
- packages
|
||||
pillars_from_files:
|
||||
packages.sls: test/salt/pillar/amazon.sls
|
||||
dependencies:
|
||||
- name: epel
|
||||
repo: git
|
||||
source: https://github.com/saltstack-formulas/epel-formula.git
|
||||
verifier:
|
||||
inspec_tests:
|
||||
- path: test/integration/default
|
||||
- name: suse
|
||||
includes:
|
||||
- opensuse-leap-151-master-py3
|
||||
- opensuse-leap-151-2019-2-py3
|
||||
- opensuse-leap-151-2018-3-py2
|
||||
- opensuse-leap-151-2017-7-py2
|
||||
provisioner:
|
||||
state_top:
|
||||
base:
|
||||
'*':
|
||||
- packages
|
||||
epel.sls:
|
||||
disabled: false
|
||||
pillars:
|
||||
top.sls:
|
||||
base:
|
||||
'*':
|
||||
- packages
|
||||
pillars_from_files:
|
||||
packages.sls: test/salt/pillar/opensuse.sls
|
||||
verifier:
|
||||
inspec_tests:
|
||||
- path: test/integration/default
|
||||
- name: arch
|
||||
includes:
|
||||
- arch-base-latest-master-py2
|
||||
- arch-base-latest-2019-2-py2
|
||||
- arch-base-latest-2018-3-py2
|
||||
- arch-base-latest-2017-7-py2
|
||||
provisioner:
|
||||
state_top:
|
||||
base:
|
||||
'*':
|
||||
- packages
|
||||
pillars:
|
||||
top.sls:
|
||||
base:
|
||||
'*':
|
||||
- packages
|
||||
pillars_from_files:
|
||||
packages.sls: test/salt/pillar/arch.sls
|
||||
verifier:
|
||||
inspec_tests:
|
||||
- path: test/integration/default
|
||||
|
|
|
@ -94,5 +94,5 @@ packages-archive-wanted-download-{{ package }}:
|
|||
{%- endif %}
|
||||
- retry: {{ packages.retry_options|json }}
|
||||
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{%- endfor %}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# vim: ft=yaml
|
||||
---
|
||||
packages:
|
||||
tmpdir: /tmp/saltstack-packages-formula-archives
|
||||
rootuser: root
|
||||
|
@ -31,10 +32,10 @@ packages:
|
|||
states: []
|
||||
pkgs: []
|
||||
snaps:
|
||||
packages: ['snapd', 'fuse',]
|
||||
packages: ['snapd', 'fuse']
|
||||
collides: []
|
||||
symlink: False
|
||||
service: ['snapd',]
|
||||
symlink: false
|
||||
service: ['snapd']
|
||||
wanted: []
|
||||
classic: []
|
||||
unwanted: []
|
||||
|
@ -48,13 +49,13 @@ packages:
|
|||
pkgs:
|
||||
required: ['curl', 'bzip2', 'gzip']
|
||||
types: ['tar', 'zip', 'rar']
|
||||
wanted: {} #note: dict
|
||||
wanted: {} # note: dict
|
||||
unwanted: []
|
||||
required:
|
||||
archives: {} #note: dict
|
||||
archives: {} # note: dict
|
||||
retry_options:
|
||||
# https://docs.saltstack.com/en/latest/ref/states/requisites.html#retrying-states
|
||||
attempts: 3
|
||||
until: True
|
||||
until: true
|
||||
interval: 60
|
||||
splay: 10
|
||||
|
|
|
@ -34,6 +34,11 @@ gem_req_pkgs:
|
|||
{% endfor %}
|
||||
{% endif %}
|
||||
- retry: {{ packages.retry_options|json }}
|
||||
{#- Not specific to Arch but needed for the newest versions of Ruby #}
|
||||
{%- if grains.os_family == 'Arch' %}
|
||||
- rdoc: True
|
||||
- ri: True
|
||||
{%- endif %}
|
||||
{% endfor %}
|
||||
|
||||
{% for ugm in unwanted_gems %}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
{#- Get the `tplroot` from `tpldir` #}
|
||||
{%- set tplroot = tpldir.split('/')[0] %}
|
||||
{%- from tplroot ~ "/map.jinja" import packages with context %}
|
||||
|
||||
|
||||
{%- for package in packages.golang.clean %}
|
||||
|
||||
packages-golang-clean-{{ package }}-cmd-run:
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
{#- Get the `tplroot` from `tpldir` #}
|
||||
{%- set tplroot = tpldir.split('/')[0] %}
|
||||
{%- from tplroot ~ "/map.jinja" import packages with context %}
|
||||
|
||||
|
||||
{%- for package in packages.golang.goget %}
|
||||
|
||||
packages-golang-goget-{{ package }}-cmd-run:
|
||||
|
|
|
@ -9,3 +9,4 @@ include:
|
|||
- packages.npms
|
||||
- packages.archives
|
||||
- packages.snaps
|
||||
- packages.golang
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# vim: ft=yaml
|
||||
---
|
||||
Suse:
|
||||
pips:
|
||||
required:
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# vim: ft=yaml
|
||||
---
|
||||
Fedora:
|
||||
pkgs:
|
||||
required:
|
||||
|
@ -11,9 +14,9 @@ Fedora:
|
|||
- python2-pip
|
||||
- python2-devel
|
||||
snaps:
|
||||
collides: ['snap',]
|
||||
symlink: True
|
||||
collides: ['snap']
|
||||
symlink: true
|
||||
|
||||
Centos:
|
||||
CentOS:
|
||||
snaps:
|
||||
package:
|
||||
packages: []
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# vim: ft=sls
|
||||
{% from "packages/map.jinja" import packages with context %}
|
||||
|
||||
{#- Get the `tplroot` from `tpldir` #}
|
||||
{%- set tplroot = tpldir.split('/')[0] %}
|
||||
{%- from tplroot ~ "/map.jinja" import packages with context %}
|
||||
|
||||
{% set req_states = packages.pips.required.states %}
|
||||
{% set req_pkgs = packages.pips.required.pkgs %}
|
||||
|
@ -24,7 +27,7 @@ pip_req_pkgs:
|
|||
pip_config:
|
||||
file.managed:
|
||||
- name: /etc/pip.conf
|
||||
- source: salt://{{ slspath }}/files/pip.conf
|
||||
- source: salt://{{ tplroot }}/files/pip.conf
|
||||
- template: jinja
|
||||
- makedirs: True
|
||||
- context:
|
||||
|
|
|
@ -24,7 +24,7 @@ include:
|
|||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
extend:
|
||||
extend:
|
||||
unwanted_pkgs:
|
||||
pkg.purged:
|
||||
- pkgs: {{ unwanted_packages | json }}
|
||||
|
|
|
@ -1,9 +1,12 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# vim: ft=yaml
|
||||
---
|
||||
packages:
|
||||
pkgs:
|
||||
# A dict of "package: version" pairs:
|
||||
held:
|
||||
alien: 8.95
|
||||
iotop: 0.6-2
|
||||
iotop: 0.6-24
|
||||
|
||||
# Alternativelly, held packages can also be specified as a list with
|
||||
# no versions. In this case, the package will be held in the installed
|
||||
|
@ -23,6 +26,7 @@ packages:
|
|||
pkgs:
|
||||
- wget
|
||||
- git
|
||||
|
||||
pips:
|
||||
required:
|
||||
pkgs:
|
||||
|
@ -70,13 +74,15 @@ packages:
|
|||
- github.com/golang/example/outyet
|
||||
|
||||
npms:
|
||||
dir: /home/kitchen/npms # The target directory in which to install the package, or None for global installation
|
||||
user: kitchen # The user to run NPM with (and to assign to `dir`)
|
||||
group: kitchen # The group to assign to `dir`
|
||||
mode: 0755 # The permissions to assign to `dir`
|
||||
# registry: None # The NPM registry from which to install the package
|
||||
# env: None # A list of environment variables to be set prior to execution
|
||||
# force_reinstall: False # Install the package even if it is already installed
|
||||
# yamllint disable rule:line-length
|
||||
dir: /home/kitchen/npms # The target directory in which to install the package, or None for global installation
|
||||
user: kitchen # The user to run NPM with (and to assign to `dir`)
|
||||
group: kitchen # The group to assign to `dir`
|
||||
mode: '0755' # The permissions to assign to `dir`
|
||||
# registry: None # The NPM registry from which to install the package
|
||||
# env: None # A list of environment variables to be set prior to execution
|
||||
# force_reinstall: False # Install the package even if it is already installed
|
||||
# yamllint enable rule:line-length
|
||||
required:
|
||||
states:
|
||||
- node.pkg
|
||||
|
@ -99,30 +105,36 @@ packages:
|
|||
wanted:
|
||||
terminator:
|
||||
dest: /usr/local/terminator/
|
||||
options: '--strip-components=1' #recommended option, but beware tarbombs
|
||||
options: '--strip-components=1' # recommended option, but beware tarbombs
|
||||
dl:
|
||||
format: tar
|
||||
# yamllint disable rule:line-length
|
||||
source: https://launchpad.net/terminator/gtk3/1.91/+download/terminator-1.91.tar.gz
|
||||
#hashurl: https://launchpad.net/terminator/gtk3/1.91/+download/terminator-1.91.tar.gz/+md5
|
||||
# hashurl: https://launchpad.net/terminator/gtk3/1.91/+download/terminator-1.91.tar.gz/+md5
|
||||
# yamllint enable rule:line-length
|
||||
hashsum: md5=2eed999d7a41f2e18eaa511bbbf80f58
|
||||
phantomjs:
|
||||
dest: /usr/local/src/ #beware tarbombs
|
||||
dest: /usr/local/src/ # beware tarbombs
|
||||
user: root
|
||||
mode: '0700'
|
||||
dl:
|
||||
format: tar
|
||||
# yamllint disable rule:line-length
|
||||
source: https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2
|
||||
hashsum: md5=1c947d57fce2f21ce0b43fe2ed7cd361
|
||||
# yamllint enable rule:line-length
|
||||
blockbox:
|
||||
dest: /usr/local/src/
|
||||
dl:
|
||||
format: raw
|
||||
# yamllint disable-line rule:line-length
|
||||
source: https://raw.githubusercontent.com/openstack/cinder/master/contrib/block-box/docker-compose.yml
|
||||
hashsum: 1751f8e4f6b4cddd8c4843a0f4473274
|
||||
kubectl:
|
||||
dest: /usr/local/bin
|
||||
dl:
|
||||
format: bin
|
||||
# yamllint disable-line rule:line-length
|
||||
source: https://storage.googleapis.com/kubernetes-release/release/v1.12.0/bin/darwin/amd64/kubectl
|
||||
unwanted:
|
||||
- /usr/local/boring_archive_software
|
||||
|
@ -133,6 +145,6 @@ packages:
|
|||
retry_options:
|
||||
# https://docs.saltstack.com/en/latest/ref/states/requisites.html#retrying-states
|
||||
attempts: 5
|
||||
until: True
|
||||
until: true
|
||||
interval: 30
|
||||
splay: 20
|
||||
|
|
30
pre-commit_semantic-release.sh
Executable file
30
pre-commit_semantic-release.sh
Executable file
|
@ -0,0 +1,30 @@
|
|||
#!/bin/sh
|
||||
|
||||
###############################################################################
|
||||
# (A) Update `FORMULA` with `${nextRelease.version}`
|
||||
###############################################################################
|
||||
sed -i -e "s_^\(version:\).*_\1 ${1}_" FORMULA
|
||||
|
||||
|
||||
###############################################################################
|
||||
# (B) Use `m2r` to convert automatically produced `.md` docs to `.rst`
|
||||
###############################################################################
|
||||
|
||||
# Install `m2r`
|
||||
sudo -H pip install m2r
|
||||
|
||||
# Copy and then convert the `.md` docs
|
||||
cp ./*.md docs/
|
||||
cd docs/ || exit
|
||||
m2r --overwrite ./*.md
|
||||
|
||||
# Change excess `H1` headings to `H2` in converted `CHANGELOG.rst`
|
||||
sed -i -e '/^=.*$/s/=/-/g' CHANGELOG.rst
|
||||
sed -i -e '1,4s/-/=/g' CHANGELOG.rst
|
||||
|
||||
# Use for debugging output, when required
|
||||
# cat AUTHORS.rst
|
||||
# cat CHANGELOG.rst
|
||||
|
||||
# Return back to the main directory
|
||||
cd ..
|
18
release-rules.js
Normal file
18
release-rules.js
Normal file
|
@ -0,0 +1,18 @@
|
|||
// No release is triggered for the types commented out below.
|
||||
// Commits using these types will be incorporated into the next release.
|
||||
//
|
||||
// NOTE: Any changes here must be reflected in `CONTRIBUTING.md`.
|
||||
module.exports = [
|
||||
{breaking: true, release: 'major'},
|
||||
// {type: 'build', release: 'patch'},
|
||||
// {type: 'chore', release: 'patch'},
|
||||
// {type: 'ci', release: 'patch'},
|
||||
{type: 'docs', release: 'patch'},
|
||||
{type: 'feat', release: 'minor'},
|
||||
{type: 'fix', release: 'patch'},
|
||||
{type: 'perf', release: 'patch'},
|
||||
{type: 'refactor', release: 'patch'},
|
||||
{type: 'revert', release: 'patch'},
|
||||
{type: 'style', release: 'patch'},
|
||||
{type: 'test', release: 'patch'},
|
||||
];
|
106
release.config.js
Normal file
106
release.config.js
Normal file
|
@ -0,0 +1,106 @@
|
|||
module.exports = {
|
||||
branch: 'master',
|
||||
plugins: [
|
||||
['@semantic-release/commit-analyzer', {
|
||||
preset: 'angular',
|
||||
releaseRules: './release-rules.js',
|
||||
}],
|
||||
'@semantic-release/release-notes-generator',
|
||||
['@semantic-release/changelog', {
|
||||
changelogFile: 'CHANGELOG.md',
|
||||
changelogTitle: '# Changelog',
|
||||
}],
|
||||
['@semantic-release/exec', {
|
||||
prepareCmd: 'sh ./pre-commit_semantic-release.sh ${nextRelease.version}',
|
||||
}],
|
||||
['@semantic-release/git', {
|
||||
assets: ['*.md', 'docs/*.rst', 'FORMULA'],
|
||||
}],
|
||||
'@semantic-release/github',
|
||||
],
|
||||
generateNotes: {
|
||||
preset: 'angular',
|
||||
writerOpts: {
|
||||
// Required due to upstream bug preventing all types being displayed.
|
||||
// Bug: https://github.com/conventional-changelog/conventional-changelog/issues/317
|
||||
// Fix: https://github.com/conventional-changelog/conventional-changelog/pull/410
|
||||
transform: (commit, context) => {
|
||||
const issues = []
|
||||
|
||||
commit.notes.forEach(note => {
|
||||
note.title = `BREAKING CHANGES`
|
||||
})
|
||||
|
||||
// NOTE: Any changes here must be reflected in `CONTRIBUTING.md`.
|
||||
if (commit.type === `feat`) {
|
||||
commit.type = `Features`
|
||||
} else if (commit.type === `fix`) {
|
||||
commit.type = `Bug Fixes`
|
||||
} else if (commit.type === `perf`) {
|
||||
commit.type = `Performance Improvements`
|
||||
} else if (commit.type === `revert`) {
|
||||
commit.type = `Reverts`
|
||||
} else if (commit.type === `docs`) {
|
||||
commit.type = `Documentation`
|
||||
} else if (commit.type === `style`) {
|
||||
commit.type = `Styles`
|
||||
} else if (commit.type === `refactor`) {
|
||||
commit.type = `Code Refactoring`
|
||||
} else if (commit.type === `test`) {
|
||||
commit.type = `Tests`
|
||||
} else if (commit.type === `build`) {
|
||||
commit.type = `Build System`
|
||||
// } else if (commit.type === `chore`) {
|
||||
// commit.type = `Maintenance`
|
||||
} else if (commit.type === `ci`) {
|
||||
commit.type = `Continuous Integration`
|
||||
} else {
|
||||
return
|
||||
}
|
||||
|
||||
if (commit.scope === `*`) {
|
||||
commit.scope = ``
|
||||
}
|
||||
|
||||
if (typeof commit.hash === `string`) {
|
||||
commit.shortHash = commit.hash.substring(0, 7)
|
||||
}
|
||||
|
||||
if (typeof commit.subject === `string`) {
|
||||
let url = context.repository
|
||||
? `${context.host}/${context.owner}/${context.repository}`
|
||||
: context.repoUrl
|
||||
if (url) {
|
||||
url = `${url}/issues/`
|
||||
// Issue URLs.
|
||||
commit.subject = commit.subject.replace(/#([0-9]+)/g, (_, issue) => {
|
||||
issues.push(issue)
|
||||
return `[#${issue}](${url}${issue})`
|
||||
})
|
||||
}
|
||||
if (context.host) {
|
||||
// User URLs.
|
||||
commit.subject = commit.subject.replace(/\B@([a-z0-9](?:-?[a-z0-9/]){0,38})/g, (_, username) => {
|
||||
if (username.includes('/')) {
|
||||
return `@${username}`
|
||||
}
|
||||
|
||||
return `[@${username}](${context.host}/${username})`
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// remove references that already appear in the subject
|
||||
commit.references = commit.references.filter(reference => {
|
||||
if (issues.indexOf(reference.issue) === -1) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
})
|
||||
|
||||
return commit
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
50
test/integration/default/README.md
Normal file
50
test/integration/default/README.md
Normal file
|
@ -0,0 +1,50 @@
|
|||
# InSpec Profile: `default`
|
||||
|
||||
This shows the implementation of the `default` InSpec [profile](https://github.com/inspec/inspec/blob/master/docs/profiles.md).
|
||||
|
||||
## Verify a profile
|
||||
|
||||
InSpec ships with built-in features to verify a profile structure.
|
||||
|
||||
```bash
|
||||
$ inspec check default
|
||||
Summary
|
||||
-------
|
||||
Location: default
|
||||
Profile: profile
|
||||
Controls: 4
|
||||
Timestamp: 2019-06-24T23:09:01+00:00
|
||||
Valid: true
|
||||
|
||||
Errors
|
||||
------
|
||||
|
||||
Warnings
|
||||
--------
|
||||
```
|
||||
|
||||
## Execute a profile
|
||||
|
||||
To run all **supported** controls on a local machine use `inspec exec /path/to/profile`.
|
||||
|
||||
```bash
|
||||
$ inspec exec default
|
||||
..
|
||||
|
||||
Finished in 0.0025 seconds (files took 0.12449 seconds to load)
|
||||
8 examples, 0 failures
|
||||
```
|
||||
|
||||
## Execute a specific control from a profile
|
||||
|
||||
To run one control from the profile use `inspec exec /path/to/profile --controls name`.
|
||||
|
||||
```bash
|
||||
$ inspec exec default --controls package
|
||||
.
|
||||
|
||||
Finished in 0.0025 seconds (files took 0.12449 seconds to load)
|
||||
1 examples, 0 failures
|
||||
```
|
||||
|
||||
See an [example control here](https://github.com/inspec/inspec/blob/master/examples/profile/controls/example.rb).
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
### ARCHIVE PKGS
|
||||
control 'Archive packages' do
|
||||
title 'should be downloaded and installed'
|
||||
|
@ -7,15 +9,12 @@ control 'Archive packages' do
|
|||
os.debian?
|
||||
end
|
||||
|
||||
%w(
|
||||
%w[
|
||||
docker-compose.yml
|
||||
phantomjs-2.1.1-linux-x86_64/bin
|
||||
).each do |f|
|
||||
].each do |f|
|
||||
describe file("/usr/local/src/#{f}") do
|
||||
it { should exist }
|
||||
end
|
||||
end
|
||||
describe file('/usr/local/go/bin/go') do
|
||||
it { should be_executable }
|
||||
end
|
||||
end
|
|
@ -1,11 +1,19 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
### WANTED/REQUIRED
|
||||
control 'Wanted/Required gems' do
|
||||
title 'should be installed'
|
||||
|
||||
%w{
|
||||
wanted = %w[
|
||||
progressbar
|
||||
minitest
|
||||
}.each do |p|
|
||||
]
|
||||
case platform[:name]
|
||||
when 'centos', 'amazon'
|
||||
wanted.delete('minitest')
|
||||
end
|
||||
|
||||
wanted.each do |p|
|
||||
describe gem(p) do
|
||||
it { should be_installed }
|
||||
end
|
||||
|
@ -15,11 +23,11 @@ end
|
|||
### UNWANTED
|
||||
control 'Unwanted gems' do
|
||||
title 'should be uninstalled'
|
||||
%w{
|
||||
%w[
|
||||
diff-lcs
|
||||
kwalify
|
||||
kitchen-vagrant
|
||||
}.each do |p|
|
||||
].each do |p|
|
||||
describe gem(p) do
|
||||
it { should_not be_installed }
|
||||
end
|
|
@ -16,7 +16,7 @@ control 'Wanted/Required npm packages' do
|
|||
desc '(only testing in the Debian platform, as the node-formula dependency is too specific)'
|
||||
|
||||
only_if do
|
||||
os.name == 'debian'
|
||||
platform.name == 'debian'
|
||||
end
|
||||
|
||||
describe directory(npms_path) do
|
||||
|
@ -39,7 +39,7 @@ control 'Unwanted npm packages' do
|
|||
desc '(only testing in the Debian platform, as the node-formula dependency is too specific)'
|
||||
|
||||
only_if do
|
||||
os.name == 'debian'
|
||||
platform.name == 'debian'
|
||||
end
|
||||
|
||||
%w{
|
|
@ -1,6 +1,6 @@
|
|||
### WANTED/REQUIRED
|
||||
case os[:name]
|
||||
when 'fedora', 'opensuse'
|
||||
case platform[:family]
|
||||
when 'fedora', 'suse'
|
||||
wanted_pips = []
|
||||
else
|
||||
wanted_pips = %w{
|
|
@ -1,15 +1,23 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
## Some vars
|
||||
common_packages = %w(
|
||||
common_packages = %w[
|
||||
git
|
||||
less
|
||||
bc
|
||||
curl
|
||||
fail2ban
|
||||
)
|
||||
]
|
||||
|
||||
case os[:name]
|
||||
when 'redhat', 'centos'
|
||||
os_packages = %w(yum-plugin-versionlock)
|
||||
case platform[:family]
|
||||
when 'redhat'
|
||||
platform_packages =
|
||||
case platform[:name]
|
||||
when 'amazon'
|
||||
%w[git]
|
||||
else
|
||||
%w[yum-plugin-versionlock]
|
||||
end
|
||||
held_packages = {
|
||||
# We use this test for held packages in a list,
|
||||
# with no version (current version).
|
||||
|
@ -18,10 +26,7 @@ when 'redhat', 'centos'
|
|||
}
|
||||
lock_file = '/etc/yum/pluginconf.d/versionlock.list'
|
||||
when 'fedora'
|
||||
os_packages = %w(
|
||||
python2-dnf-plugin-versionlock
|
||||
python3-dnf-plugin-versionlock
|
||||
)
|
||||
platform_packages = ['python3-dnf-plugin-versionlock']
|
||||
held_packages = {
|
||||
'alien': '8.95-8.fc29',
|
||||
'iotop': '0.6-18.fc29'
|
||||
|
@ -29,22 +34,32 @@ when 'fedora'
|
|||
lock_file = '/etc/dnf/plugins/versionlock.list'
|
||||
# Adding empty Suse entries, to get tests passing
|
||||
# Don't know the correct values to add here.
|
||||
when 'opensuse'
|
||||
os_packages = %w()
|
||||
when 'suse'
|
||||
platform_packages = %w[]
|
||||
held_packages = {}
|
||||
lock_file = ''
|
||||
when 'debian', 'ubuntu'
|
||||
os_packages = %w()
|
||||
when 'debian'
|
||||
platform_packages = %w[]
|
||||
held_packages = {
|
||||
'alien': '8.95',
|
||||
# To match also ubuntu16's
|
||||
'iotop': '0.6-'
|
||||
}
|
||||
lock_file = '/var/lib/dpkg/status'
|
||||
when 'linux'
|
||||
case platform[:name]
|
||||
when 'arch'
|
||||
platform_packages = %w[ruby]
|
||||
held_packages = {}
|
||||
lock_file = ''
|
||||
end
|
||||
end
|
||||
|
||||
unheld_packages = (common_packages + os_packages).flatten.uniq
|
||||
all_packages = (unheld_packages + held_packages.keys.map { |k| k.to_s }).flatten.uniq
|
||||
# FIXME: - not testing Held packages
|
||||
held_packages = {}
|
||||
|
||||
unheld_packages = (common_packages + platform_packages).flatten.uniq
|
||||
all_packages = (unheld_packages + held_packages.keys.map(&:to_s)).flatten.uniq
|
||||
|
||||
### WANTED/REQUIRED/HELD
|
||||
control 'Wanted/Required/Held packages' do
|
||||
|
@ -61,14 +76,14 @@ end
|
|||
control 'Wanted packages' do
|
||||
title 'should NOT be marked as hold'
|
||||
|
||||
unheld_packages.each do |p,v|
|
||||
case os[:name]
|
||||
when 'redhat', 'centheld_packagesheld_packagesos', 'fedora'
|
||||
unheld_packages.each do |p, v|
|
||||
case platform[:family]
|
||||
when 'redhat', 'fedora'
|
||||
match_string = "#{p}-.*#{v}"
|
||||
describe file(lock_file) do
|
||||
its('content') { should_not match(match_string) }
|
||||
end
|
||||
when 'debian', 'ubuntu'
|
||||
when 'debian'
|
||||
match_string = "^Package: #{p}\nStatus: install ok installed"
|
||||
describe file(lock_file) do
|
||||
its('content') { should match(match_string) }
|
||||
|
@ -81,26 +96,27 @@ end
|
|||
control 'Held packages' do
|
||||
title 'should be marked as hold'
|
||||
|
||||
held_packages.each do |p,v|
|
||||
case os[:name]
|
||||
when 'redhat', 'centos', 'fedora'
|
||||
held_packages.each do |p, v|
|
||||
case platform[:family]
|
||||
when 'redhat', 'fedora'
|
||||
match_string = "#{p}-.*#{v}"
|
||||
when 'debian', 'ubuntu'
|
||||
match_string = "^Package: #{p}\nStatus: hold ok installed\nP.*\nS.*\nI.*\nM.*\nA.*\nVersion: #{v}"
|
||||
when 'debian'
|
||||
match_string = "^Package: #{p}\nStatus: hold ok "\
|
||||
"installed\nP.*\nS.*\nI.*\nM.*\nA.*\nVersion: #{v}"
|
||||
end
|
||||
|
||||
|
||||
describe file(lock_file) do
|
||||
its('content') { should match(match_string) }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
### UNWANTED
|
||||
control 'Unwanted packages' do
|
||||
title 'should be uninstalled'
|
||||
%w{
|
||||
%w[
|
||||
avahi-daemon
|
||||
}.each do |p|
|
||||
].each do |p|
|
||||
describe package(p) do
|
||||
it { should_not be_installed }
|
||||
end
|
20
test/integration/default/controls/remote_pkgs_spec.rb
Normal file
20
test/integration/default/controls/remote_pkgs_spec.rb
Normal file
|
@ -0,0 +1,20 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
### REMOTE PKGS
|
||||
remote_pkgs = ['zoom']
|
||||
|
||||
case platform[:family]
|
||||
# `linux` here is sufficient for `arch`
|
||||
when 'suse', 'linux'
|
||||
remote_pkgs = []
|
||||
end
|
||||
|
||||
control 'Remote packages' do
|
||||
title 'should be downloaded and installed'
|
||||
|
||||
remote_pkgs.each do |p|
|
||||
describe package(p) do
|
||||
it { should be_installed }
|
||||
end
|
||||
end
|
||||
end
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
go_path = '/home/kitchen/go'
|
||||
|
||||
# GO GET
|
||||
|
@ -13,10 +15,11 @@ control 'go get github.com/golang/example/hello' do
|
|||
it { should be_executable }
|
||||
end
|
||||
|
||||
%w(
|
||||
%w[
|
||||
github.com/golang/example/hello
|
||||
).each do |f|
|
||||
].each do |f|
|
||||
describe file("#{go_path}/src/#{f}") do
|
||||
it { should exist }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
18
test/integration/default/inspec.yml
Normal file
18
test/integration/default/inspec.yml
Normal file
|
@ -0,0 +1,18 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# vim: ft=yaml
|
||||
---
|
||||
name: default
|
||||
title: packages formula
|
||||
maintainer: SaltStack Formulas
|
||||
license: Apache-2.0
|
||||
summary: Verify that the packages formula is setup and configured correctly
|
||||
supports:
|
||||
- platform-name: debian
|
||||
- platform-name: ubuntu
|
||||
- platform-name: centos
|
||||
- platform-name: fedora
|
||||
- platform-name: opensuse
|
||||
- platform-name: suse
|
||||
- platform-name: freebsd
|
||||
- platform-name: amazon
|
||||
- platform-name: arch
|
|
@ -1,38 +0,0 @@
|
|||
packages:
|
||||
pkgs:
|
||||
held:
|
||||
alien: 8.95-8.fc29
|
||||
iotop: 0.6-18.fc29
|
||||
wanted:
|
||||
- git
|
||||
- less
|
||||
- bc
|
||||
- curl
|
||||
- fail2ban
|
||||
unwanted:
|
||||
- avahi-daemon
|
||||
required:
|
||||
pkgs:
|
||||
- git
|
||||
- python2-dnf-plugin-versionlock
|
||||
- python3-dnf-plugin-versionlock
|
||||
# Not testing pips in FC29 because it still ships 2018.3.3
|
||||
# which breaks with pip > 18 (https://github.com/saltstack/salt/issues/49967)
|
||||
# pips:
|
||||
# wanted:
|
||||
# - dxpy
|
||||
# - attrs
|
||||
# unwanted:
|
||||
# - campbel
|
||||
# - reverse_geocode
|
||||
# - indy-crypto
|
||||
gems:
|
||||
wanted:
|
||||
- progressbar
|
||||
- minitest
|
||||
unwanted:
|
||||
- diff-lcs
|
||||
- kitchen-vagrant
|
||||
- kwalify
|
||||
remote_pkgs:
|
||||
zoom: 'https://zoom.us/client/latest/zoom_x86_64.rpm'
|
|
@ -1,100 +0,0 @@
|
|||
packages:
|
||||
pkgs:
|
||||
# A dict of "package: version" pairs:
|
||||
held:
|
||||
alien: 8.95
|
||||
iotop: 0.6-1
|
||||
|
||||
# Alternativelly, held packages can also be specified as a list with
|
||||
# no versions. In this case, the package will be held in the installed
|
||||
# version.
|
||||
# held:
|
||||
# - alien
|
||||
# - iotop
|
||||
wanted:
|
||||
- git
|
||||
- less
|
||||
- bc
|
||||
- curl
|
||||
- fail2ban
|
||||
unwanted:
|
||||
- avahi-daemon
|
||||
required:
|
||||
pkgs:
|
||||
- wget
|
||||
- git
|
||||
pips:
|
||||
required:
|
||||
pkgs:
|
||||
- libpython2.7-dev
|
||||
- python-pip
|
||||
wanted:
|
||||
- dxpy
|
||||
- attrs
|
||||
unwanted:
|
||||
- campbel
|
||||
- reverse_geocode
|
||||
- indy-crypto
|
||||
config:
|
||||
global:
|
||||
timeout: 120
|
||||
default-timeout: 120
|
||||
# proxy: http://proxy.example.com:3128
|
||||
gems:
|
||||
wanted:
|
||||
- progressbar
|
||||
- minitest
|
||||
unwanted:
|
||||
- diff-lcs
|
||||
- kitchen-vagrant
|
||||
- kwalify
|
||||
snaps:
|
||||
wanted:
|
||||
- hello-world
|
||||
classic:
|
||||
- test-snapd-hello-classic
|
||||
unwanted:
|
||||
- goodbye-world
|
||||
archives:
|
||||
wanted:
|
||||
terminator:
|
||||
dest: /usr/local/terminator/
|
||||
options: '--strip-components=1' #recommended option, but beware tarbombs
|
||||
dl:
|
||||
format: tar
|
||||
source: https://launchpad.net/terminator/gtk3/1.91/+download/terminator-1.91.tar.gz
|
||||
#hashurl: https://launchpad.net/terminator/gtk3/1.91/+download/terminator-1.91.tar.gz/+md5
|
||||
hashsum: md5=2eed999d7a41f2e18eaa511bbbf80f58
|
||||
phantomjs:
|
||||
dest: /usr/local/src/ #beware tarbombs
|
||||
user: root
|
||||
mode: '0700'
|
||||
dl:
|
||||
format: tar
|
||||
source: https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2
|
||||
hashsum: md5=1c947d57fce2f21ce0b43fe2ed7cd361
|
||||
blockbox:
|
||||
dest: /usr/local/src/
|
||||
dl:
|
||||
format: raw
|
||||
source: https://raw.githubusercontent.com/openstack/cinder/master/contrib/block-box/docker-compose.yml
|
||||
hashsum: 1751f8e4f6b4cddd8c4843a0f4473274
|
||||
golang:
|
||||
dest: /usr/local
|
||||
dl:
|
||||
format: tar
|
||||
source: https://dl.google.com/go/go1.12.7.linux-amd64.tar.gz
|
||||
hashsum: 66d83bfb5a9ede000e33c6579a91a29e6b101829ad41fffb5c5bb6c900e109d9
|
||||
unwanted:
|
||||
- /usr/local/boring_archive_software
|
||||
|
||||
remote_pkgs:
|
||||
zoom: 'https://zoom.us/client/latest/zoom_amd64.deb'
|
||||
|
||||
golang:
|
||||
goget:
|
||||
- github.com/golang/example/hello
|
||||
- github.com/golang/example/outyet
|
||||
clean:
|
||||
- github.com/golang/example/hello
|
||||
- github.com/golang/example/outyet
|
|
@ -1,12 +0,0 @@
|
|||
### REMOTE PKGS
|
||||
control 'Remote packages' do
|
||||
title 'should be downloaded and installed'
|
||||
|
||||
%w{
|
||||
zoom
|
||||
}.each do |p|
|
||||
describe package(p) do
|
||||
it { should be_installed }
|
||||
end
|
||||
end
|
||||
end
|
45
test/salt/pillar/amazon.sls
Normal file
45
test/salt/pillar/amazon.sls
Normal file
|
@ -0,0 +1,45 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# vim: ft=yaml
|
||||
---
|
||||
packages:
|
||||
pkgs:
|
||||
# held:
|
||||
# - alien
|
||||
# - iotop
|
||||
wanted:
|
||||
- git
|
||||
- less
|
||||
- bc
|
||||
- curl
|
||||
- fail2ban
|
||||
unwanted:
|
||||
- avahi-daemon
|
||||
required:
|
||||
pkgs:
|
||||
- git
|
||||
- yum-plugin-versionlock
|
||||
pips:
|
||||
wanted:
|
||||
- attrs
|
||||
unwanted:
|
||||
- campbel
|
||||
- reverse_geocode
|
||||
- indy-crypto
|
||||
gems:
|
||||
wanted:
|
||||
- progressbar
|
||||
# minitest requires Ruby version ~> 2.2.
|
||||
# ruby 2.0.0p648 (2015-12-16) [x86_64-linux]
|
||||
# https://stackoverflow.com/a/50931910
|
||||
# $ sudo amazon-linux-extras install ruby2.6
|
||||
# - minitest
|
||||
unwanted:
|
||||
- diff-lcs
|
||||
- kitchen-vagrant
|
||||
- kwalify
|
||||
remote_pkgs:
|
||||
zoom: 'https://zoom.us/client/latest/zoom_x86_64.rpm'
|
||||
|
||||
# Override the default setting to prevent wasteful delays in Travis
|
||||
retry_options:
|
||||
attempts: 1
|
41
test/salt/pillar/arch.sls
Normal file
41
test/salt/pillar/arch.sls
Normal file
|
@ -0,0 +1,41 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# vim: ft=yaml
|
||||
---
|
||||
packages:
|
||||
pkgs:
|
||||
held:
|
||||
# - alien
|
||||
- iotop
|
||||
wanted:
|
||||
- ruby
|
||||
- git
|
||||
- less
|
||||
- bc
|
||||
- curl
|
||||
- fail2ban
|
||||
unwanted:
|
||||
- avahi-daemon
|
||||
required:
|
||||
pkgs:
|
||||
- git
|
||||
pips:
|
||||
wanted:
|
||||
- attrs
|
||||
unwanted:
|
||||
- campbel
|
||||
- reverse_geocode
|
||||
- indy-crypto
|
||||
gems:
|
||||
wanted:
|
||||
- progressbar
|
||||
- minitest
|
||||
unwanted:
|
||||
- diff-lcs
|
||||
- kitchen-vagrant
|
||||
- kwalify
|
||||
# remote_pkgs:
|
||||
# zoom: 'https://zoom.us/client/latest/zoom_x86_64.tar.xz'
|
||||
|
||||
# Override the default setting to prevent wasteful delays in Travis
|
||||
retry_options:
|
||||
attempts: 1
|
146
test/salt/pillar/debian.sls
Normal file
146
test/salt/pillar/debian.sls
Normal file
|
@ -0,0 +1,146 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# vim: ft=yaml
|
||||
---
|
||||
# Dependency (node)
|
||||
node:
|
||||
version: 12.14.1-1nodesource1
|
||||
install_from_ppa: true
|
||||
ppa:
|
||||
repository_url: https://deb.nodesource.com/node_12.x
|
||||
|
||||
packages:
|
||||
pkgs:
|
||||
# A dict of "package: version" pairs:
|
||||
# held:
|
||||
# alien: 8.95
|
||||
# iotop: 0.6-2
|
||||
|
||||
# Alternativelly, held packages can also be specified as a list with
|
||||
# no versions. In this case, the package will be held in the installed
|
||||
# version.
|
||||
held:
|
||||
- alien
|
||||
- iotop
|
||||
wanted:
|
||||
- git
|
||||
- less
|
||||
- bc
|
||||
- curl
|
||||
- fail2ban
|
||||
unwanted:
|
||||
- avahi-daemon
|
||||
required:
|
||||
pkgs:
|
||||
- wget
|
||||
- git
|
||||
|
||||
pips:
|
||||
required:
|
||||
pkgs:
|
||||
# Pillar parameters have precedence so, if you add a package here, you
|
||||
# should also add the python pip package you want. Otherwise, the formula
|
||||
# will take care of getting it if needed.
|
||||
- libpython2.7-dev
|
||||
- python-pip
|
||||
wanted:
|
||||
- dxpy
|
||||
- attrs
|
||||
unwanted:
|
||||
- campbel
|
||||
- reverse_geocode
|
||||
- indy-crypto
|
||||
config:
|
||||
global:
|
||||
timeout: 120
|
||||
default-timeout: 120
|
||||
# proxy: http://proxy.example.com:3128
|
||||
|
||||
gems:
|
||||
wanted:
|
||||
- progressbar
|
||||
- minitest
|
||||
unwanted:
|
||||
- diff-lcs
|
||||
- kitchen-vagrant
|
||||
- kwalify
|
||||
|
||||
snaps:
|
||||
wanted:
|
||||
- hello-world
|
||||
classic:
|
||||
- test-snapd-hello-classic
|
||||
unwanted:
|
||||
- bare
|
||||
|
||||
# yamllint disable rule:line-length
|
||||
npms:
|
||||
dir: /home/kitchen/npms # The target directory in which to install the package, or None for global installation
|
||||
user: kitchen # The user to run NPM with (and to assign to `dir`)
|
||||
group: kitchen # The group to assign to `dir`
|
||||
mode: '0755' # The permissions to assign to `dir`
|
||||
# registry: None # The NPM registry from which to install the package
|
||||
# env: None # A list of environment variables to be set prior to execution
|
||||
# force_reinstall: False # Install the package even if it is already installed
|
||||
required:
|
||||
states:
|
||||
- node.pkg
|
||||
wanted:
|
||||
# Valid formats:
|
||||
#
|
||||
# @google-cloud/bigquery@^0.9.6
|
||||
# @foobar
|
||||
# buffer-equal-constant-time@1.0.1
|
||||
# coffee-script
|
||||
# You need to quote the package if it starts with '@'
|
||||
- '@davidodio/hello@2.3.0'
|
||||
- hello-world-npm
|
||||
- sax
|
||||
- coffee-script@1.0.1
|
||||
unwanted:
|
||||
- gist
|
||||
# yamllint enable rule:line-length
|
||||
|
||||
archives:
|
||||
wanted:
|
||||
terminator:
|
||||
dest: /usr/local/terminator/
|
||||
options: '--strip-components=1' # recommended option, but beware tarbombs
|
||||
dl:
|
||||
format: tar
|
||||
# yamllint disable rule:line-length
|
||||
source: https://launchpad.net/terminator/gtk3/1.91/+download/terminator-1.91.tar.gz
|
||||
# hashurl: https://launchpad.net/terminator/gtk3/1.91/+download/terminator-1.91.tar.gz/+md5
|
||||
# yamllint enable rule:line-length
|
||||
hashsum: md5=2eed999d7a41f2e18eaa511bbbf80f58
|
||||
phantomjs:
|
||||
dest: /usr/local/src/ # beware tarbombs
|
||||
user: root
|
||||
mode: '0700'
|
||||
dl:
|
||||
format: tar
|
||||
# yamllint disable rule:line-length
|
||||
source: https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2
|
||||
hashsum: md5=1c947d57fce2f21ce0b43fe2ed7cd361
|
||||
# yamllint enable rule:line-length
|
||||
blockbox:
|
||||
dest: /usr/local/src/
|
||||
dl:
|
||||
format: raw
|
||||
# yamllint disable-line rule:line-length
|
||||
source: https://raw.githubusercontent.com/openstack/cinder/master/contrib/block-box/docker-compose.yml
|
||||
hashsum: 1751f8e4f6b4cddd8c4843a0f4473274
|
||||
kubectl:
|
||||
dest: /usr/local/bin
|
||||
dl:
|
||||
format: bin
|
||||
# yamllint disable-line rule:line-length
|
||||
source: https://storage.googleapis.com/kubernetes-release/release/v1.12.0/bin/darwin/amd64/kubectl
|
||||
unwanted:
|
||||
- /usr/local/boring_archive_software
|
||||
|
||||
remote_pkgs:
|
||||
zoom: 'https://zoom.us/client/latest/zoom_amd64.deb'
|
||||
|
||||
# Override the default setting to prevent wasteful delays in Travis
|
||||
retry_options:
|
||||
attempts: 1
|
|
@ -1,8 +1,11 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# vim: ft=yaml
|
||||
---
|
||||
packages:
|
||||
pkgs:
|
||||
held:
|
||||
- alien
|
||||
- iotop
|
||||
# held:
|
||||
# alien: 8.95-8.fc29
|
||||
# iotop: 0.6-18.fc29
|
||||
wanted:
|
||||
- git
|
||||
- less
|
||||
|
@ -14,10 +17,10 @@ packages:
|
|||
required:
|
||||
pkgs:
|
||||
- git
|
||||
- yum-plugin-versionlock
|
||||
- python3-dnf-plugin-versionlock
|
||||
pips:
|
||||
wanted:
|
||||
- dxpy
|
||||
# - dxpy
|
||||
- attrs
|
||||
unwanted:
|
||||
- campbel
|
||||
|
@ -33,3 +36,7 @@ packages:
|
|||
- kwalify
|
||||
remote_pkgs:
|
||||
zoom: 'https://zoom.us/client/latest/zoom_x86_64.rpm'
|
||||
|
||||
# Override the default setting to prevent wasteful delays in Travis
|
||||
retry_options:
|
||||
attempts: 1
|
|
@ -1,3 +1,6 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# vim: ft=yaml
|
||||
---
|
||||
packages:
|
||||
pkgs:
|
||||
wanted:
|
||||
|
@ -23,5 +26,9 @@ packages:
|
|||
- diff-lcs
|
||||
- kitchen-vagrant
|
||||
- kwalify
|
||||
remote_pkgs:
|
||||
zoom: 'https://zoom.us/client/latest/zoom_openSUSE_x86_64.rpm'
|
||||
# remote_pkgs:
|
||||
# zoom: 'https://zoom.us/client/latest/zoom_openSUSE_x86_64.rpm'
|
||||
|
||||
# Override the default setting to prevent wasteful delays in Travis
|
||||
retry_options:
|
||||
attempts: 1
|
45
test/salt/pillar/redhat.sls
Normal file
45
test/salt/pillar/redhat.sls
Normal file
|
@ -0,0 +1,45 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# vim: ft=yaml
|
||||
---
|
||||
packages:
|
||||
pkgs:
|
||||
held:
|
||||
- alien
|
||||
- iotop
|
||||
wanted:
|
||||
- git
|
||||
- less
|
||||
- bc
|
||||
- curl
|
||||
- fail2ban
|
||||
unwanted:
|
||||
- avahi-daemon
|
||||
required:
|
||||
pkgs:
|
||||
- git
|
||||
- yum-plugin-versionlock
|
||||
pips:
|
||||
wanted:
|
||||
- attrs
|
||||
unwanted:
|
||||
- campbel
|
||||
- reverse_geocode
|
||||
- indy-crypto
|
||||
gems:
|
||||
wanted:
|
||||
- progressbar
|
||||
# minitest requires Ruby version ~> 2.2.
|
||||
# ruby 2.0.0p648 (2015-12-16) [x86_64-linux]
|
||||
# https://stackoverflow.com/a/50931910
|
||||
# $ sudo amazon-linux-extras install ruby2.6
|
||||
# - minitest
|
||||
unwanted:
|
||||
- diff-lcs
|
||||
- kitchen-vagrant
|
||||
- kwalify
|
||||
remote_pkgs:
|
||||
zoom: 'https://zoom.us/client/latest/zoom_x86_64.rpm'
|
||||
|
||||
# Override the default setting to prevent wasteful delays in Travis
|
||||
retry_options:
|
||||
attempts: 1
|
|
@ -1,3 +1,13 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# vim: ft=yaml
|
||||
---
|
||||
# Dependency (golang)
|
||||
golang:
|
||||
pkg:
|
||||
name: golang
|
||||
use_upstream_repo: false
|
||||
use_upstream_archive: false
|
||||
|
||||
packages:
|
||||
pkgs:
|
||||
# A dict of "package: version" pairs:
|
||||
|
@ -48,7 +58,7 @@ packages:
|
|||
- diff-lcs
|
||||
- kitchen-vagrant
|
||||
- kwalify
|
||||
# Disable Snaps testing in Ubuntu 18 due to
|
||||
# Disable Snaps testing in Ubuntu 18 due to
|
||||
# https://github.com/saltstack-formulas/packages-formula/issues/44
|
||||
# snaps:
|
||||
# wanted:
|
||||
|
@ -61,32 +71,31 @@ packages:
|
|||
wanted:
|
||||
terminator:
|
||||
dest: /usr/local/terminator/
|
||||
options: '--strip-components=1' #recommended option, but beware tarbombs
|
||||
options: '--strip-components=1' # recommended option, but beware tarbombs
|
||||
dl:
|
||||
format: tar
|
||||
# yamllint disable rule:line-length
|
||||
source: https://launchpad.net/terminator/gtk3/1.91/+download/terminator-1.91.tar.gz
|
||||
#hashurl: https://launchpad.net/terminator/gtk3/1.91/+download/terminator-1.91.tar.gz/+md5
|
||||
# hashurl: https://launchpad.net/terminator/gtk3/1.91/+download/terminator-1.91.tar.gz/+md5
|
||||
# yamllint enable rule:line-length
|
||||
hashsum: md5=2eed999d7a41f2e18eaa511bbbf80f58
|
||||
phantomjs:
|
||||
dest: /usr/local/src/ #beware tarbombs
|
||||
dest: /usr/local/src/ # beware tarbombs
|
||||
user: root
|
||||
mode: '0700'
|
||||
dl:
|
||||
format: tar
|
||||
# yamllint disable rule:line-length
|
||||
source: https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2
|
||||
hashsum: md5=1c947d57fce2f21ce0b43fe2ed7cd361
|
||||
# yamllint enable rule:line-length
|
||||
blockbox:
|
||||
dest: /usr/local/src/
|
||||
dl:
|
||||
format: raw
|
||||
# yamllint disable-line rule:line-length
|
||||
source: https://raw.githubusercontent.com/openstack/cinder/master/contrib/block-box/docker-compose.yml
|
||||
hashsum: 1751f8e4f6b4cddd8c4843a0f4473274
|
||||
golang:
|
||||
dest: /usr/local
|
||||
dl:
|
||||
format: tar
|
||||
source: https://dl.google.com/go/go1.12.7.linux-amd64.tar.gz
|
||||
hashsum: 66d83bfb5a9ede000e33c6579a91a29e6b101829ad41fffb5c5bb6c900e109d9
|
||||
unwanted:
|
||||
- /usr/local/boring_archive_software
|
||||
|
||||
|
@ -100,3 +109,7 @@ packages:
|
|||
clean:
|
||||
- github.com/golang/example/hello
|
||||
- github.com/golang/example/outyet
|
||||
|
||||
# Override the default setting to prevent wasteful delays in Travis
|
||||
retry_options:
|
||||
attempts: 1
|
Loading…
Add table
Reference in a new issue