Merge pull request #502 from myii/ci/add-vagrant-testing-via-github-actions

ci: enable Vagrant-based testing using GitHub Actions
This commit is contained in:
Imran Iqbal 2021-03-30 14:03:32 +01:00 committed by GitHub
commit 5523523213
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
77 changed files with 1223 additions and 124 deletions

36
.github/workflows/kitchen.vagrant.yml vendored Normal file
View File

@ -0,0 +1,36 @@
# -*- coding: utf-8 -*-
# vim: ft=yaml
---
name: 'Kitchen Vagrant (FreeBSD, OpenBSD & Windows)'
'on': ['push', 'pull_request']
env:
KITCHEN_LOCAL_YAML: 'kitchen.vagrant.yml'
jobs:
test:
runs-on: 'macos-10.15'
strategy:
fail-fast: false
matrix:
instance:
- v3002-py3-freebsd-122-latest-py3
- v3002-py3-freebsd-114-latest-py3
- v3001-py3-openbsd-68-latest-py3
- v3002-py3-windows-81-latest-py3
steps:
- name: 'Check out code'
uses: 'actions/checkout@v2'
- name: 'Set up Bundler cache'
uses: 'actions/cache@v1'
with:
path: 'vendor/bundle'
key: "${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}"
restore-keys: "${{ runner.os }}-gems-"
- name: 'Run Bundler'
run: |
ruby --version
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
- name: 'Run Test Kitchen'
run: 'bundle exec kitchen verify ${{ matrix.instance }}'

View File

@ -1,39 +1,101 @@
# -*- coding: utf-8 -*-
# vim: ft=yaml
---
name: 'Kitchen (Windows)'
'on': [push, pull_request]
'on': ['push', 'pull_request']
env:
machine_user: kitchen
machine_pass: Pass@word1
machine_port: 5985
KITCHEN_LOCAL_YAML: kitchen.windows.yml
KITCHEN_LOCAL_YAML: 'kitchen.windows.yml'
jobs:
build:
runs-on: windows-latest
test-2019:
runs-on: 'windows-2019'
strategy:
fail-fast: false
matrix:
instance:
- v3002-py3-windows-2019-latest-py3
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v1
- name: 'Check out code'
uses: 'actions/checkout@v2'
- name: 'Install Chef'
uses: 'actionshub/chef-install@1.1.0'
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gems-
- shell: powershell
project: 'chef'
version: '16.10.8'
- name: 'Add Chef bindir to PATH'
uses: 'myci-actions/export-env-var-powershell@1'
with:
name: 'PATH'
value: "C:\\opscode\\chef\\bin;\
C:\\opscode\\chef\\embedded\\bin;$env:PATH"
- name: 'Set up Bundler cache'
uses: 'actions/cache@v1'
with:
path: 'vendor/bundle'
key: "${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}"
restore-keys: "${{ runner.os }}-gems-"
- name: 'Set up test user'
run: |
$password = ConvertTo-SecureString $env:machine_pass -AsPlainText -Force
New-LocalUser $env:machine_user -Password $password
Add-LocalGroupMember -Group "Administrators" -Member $env:machine_user
- shell: powershell
- name: 'Set up WinRM'
run: >
Set-WSManQuickConfig -Force;
Set-WSManInstance -ResourceURI winrm/config/service
-ValueSet @{AllowUnencrypted="true"}
- run: gem install bundler --quiet --no-document
- name: Bundle install
- name: 'Run Bundler'
run: |
ruby --version
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
- run: bundle exec kitchen test
- name: 'Run Test Kitchen'
run: 'bundle exec kitchen verify ${{ matrix.instance }}'
test-2016:
runs-on: 'windows-2016'
strategy:
fail-fast: false
matrix:
instance:
- v3002-py3-windows-2016-latest-py3
steps:
- name: 'Check out code'
uses: 'actions/checkout@v2'
- name: 'Install Chef'
uses: 'actionshub/chef-install@1.1.0'
with:
project: 'chef'
version: '16.10.8'
- name: 'Add Chef bindir to PATH'
uses: 'myci-actions/export-env-var-powershell@1'
with:
name: 'PATH'
value: "C:\\opscode\\chef\\bin;\
C:\\opscode\\chef\\embedded\\bin;$env:PATH"
- name: 'Set up Bundler cache'
uses: 'actions/cache@v1'
with:
path: 'vendor/bundle'
key: "${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}"
restore-keys: "${{ runner.os }}-gems-"
- name: 'Set up test user'
run: |
$password = ConvertTo-SecureString $env:machine_pass -AsPlainText -Force
New-LocalUser $env:machine_user -Password $password
Add-LocalGroupMember -Group "Administrators" -Member $env:machine_user
- name: 'Set up WinRM'
run: >
Set-WSManQuickConfig -Force;
Set-WSManInstance -ResourceURI winrm/config/service
-ValueSet @{AllowUnencrypted="true"}
- name: 'Run Bundler'
run: |
ruby --version
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
- name: 'Run Test Kitchen'
run: 'bundle exec kitchen verify ${{ matrix.instance }}'

View File

@ -135,7 +135,7 @@ v3002-py3-fedora-33-3002-5-py3: {extends: '.test_instance'}
v3002-py3-amazonlinux-2-3002-5-py3: {extends: '.test_instance'}
v3002-py3-oraclelinux-8-3002-5-py3: {extends: '.test_instance'}
v3002-py3-oraclelinux-7-3002-5-py3: {extends: '.test_instance'}
# v3002-py3-arch-base-latest-3002-5-py3: {extends: '.test_instance'}
v3002-py3-arch-base-latest-3002-5-py3: {extends: '.test_instance'}
v3002-py3-gentoo-stage3-latest-3002-5-py3: {extends: '.test_instance'}
v3002-py3-gentoo-stage3-systemd-3002-5-py3: {extends: '.test_instance'}
v3001-py3-debian-10-3001-6-py3: {extends: '.test_instance'}

View File

@ -95,7 +95,7 @@ jobs:
- env: INSTANCE=v3002-py3-amazonlinux-2-3002-5-py3
- env: INSTANCE=v3002-py3-oraclelinux-8-3002-5-py3
- env: INSTANCE=v3002-py3-oraclelinux-7-3002-5-py3
# - env: INSTANCE=v3002-py3-arch-base-latest-3002-5-py3
- env: INSTANCE=v3002-py3-arch-base-latest-3002-5-py3
- env: INSTANCE=v3002-py3-gentoo-stage3-latest-3002-5-py3
- env: INSTANCE=v3002-py3-gentoo-stage3-systemd-3002-5-py3
- env: INSTANCE=v3001-py3-debian-10-3001-6-py3

View File

@ -255,7 +255,7 @@ Gives you SSH access to the instance for manual testing.
Testing with Vagrant
--------------------
Windows testing is done with ``kitchen-salt``.
Windows/FreeBSD/OpenBSD testing is done with ``kitchen-salt``.
Requirements
^^^^^^^^^^^^
@ -273,8 +273,8 @@ Setup
$ bundle install --with=vagrant
$ bin/kitchen test [platform]
Where ``[platform]`` is the platform name defined in ``kitchen.yml``,
e.g. ``windows``.
Where ``[platform]`` is the platform name defined in ``kitchen.vagrant.yml``,
e.g. ``windows-81-latest-py3``.
Note
^^^^
@ -292,7 +292,7 @@ Then run the following commands as needed.
``bin/kitchen converge``
^^^^^^^^^^^^^^^^^^^^^^^^
Creates the Vagrant instance and runs the ``salt.minion`` main state, ready for testing.
Creates the Vagrant instance and runs the ``salt`` main states, ready for testing.
``bin/kitchen verify``
^^^^^^^^^^^^^^^^^^^^^^
@ -312,4 +312,4 @@ Runs all of the stages above in one go: i.e. ``destroy`` + ``converge`` + ``veri
``bin/kitchen login``
^^^^^^^^^^^^^^^^^^^^^
Gives you RDP access to the instance for manual testing.
Gives you RDP/SSH access to the instance for manual testing.

View File

@ -3,37 +3,48 @@
---
driver:
name: vagrant
cache_directory: false
customize:
usbxhci: 'off'
gui: false
linked_clone: true
ssh:
shell: /bin/sh
platforms:
- name: windows-81
- name: freebsd-122-latest-py3
driver:
box: bento/freebsd-12.2
- name: freebsd-114-latest-py3
driver:
box: bento/freebsd-11.4
- name: openbsd-68-latest-py3
driver:
box: generic/openbsd6
ssh:
shell: /bin/ksh
- name: windows-81-latest-py3
driver:
box: techneg/win81x64-pro-salt
gui: false
linked_clone: true
cache_directory: "/omnibus/cache"
customize: {}
ssh: {}
provisioner:
init_environment: >
salt-call --local state.single file.managed
C:\Users\vagrant\AppData\Local\Temp\kitchen\srv\salt\win\repo-ng\salt-minion-py3.sls
source=https://github.com/saltstack/salt-winrepo-ng/raw/master/salt-minion-py3.sls
skip_verify=True makedirs=True
salt_install: none
# yamllint disable rule:line-length
init_environment: |
# Workaround to allow `kitchen converge` to be used multiple times
# without having to `kitchen destroy` first: remove state files cached by
# Salt during the previous `converge` (if present)
rm -recurse `
C:\Users\vagrant\AppData\Local\Temp\kitchen\var\cache\salt\minion\files\base `
-ErrorAction SilentlyContinue
salt-call --local state.single file.managed `
C:\Users\vagrant\AppData\Local\Temp\kitchen\srv\salt\win\repo-ng\salt-minion-py3.sls `
source=https://github.com/saltstack/salt-winrepo-ng/raw/master/salt-minion-py3.sls `
skip_verify=True makedirs=True
exit 0
# yamllint enable rule:line-length
suites:
- name: v3000-py3
provisioner:
state_top:
base:
'*':
- salt._mapdata
- salt.minion
pillars:
top.sls:
base:
'*':
- salt
- v3000-py3
pillars_from_files:
salt.sls: test/salt/pillar/salt.sls
v3000-py3.sls: test/salt/pillar/v3000-py3.sls
verifier:
inspec_tests:
- path: test/integration/v3000-py3
provisioner:
salt_install: bootstrap

View File

@ -1,3 +1,5 @@
# -*- coding: utf-8 -*-
# vim: ft=yaml
---
driver:
name: proxy
@ -8,34 +10,16 @@ driver:
password: Pass@word1
platforms:
- name: windows
- name: windows-2019-latest-py3
- name: windows-2016-latest-py3
provisioner:
salt_install: bootstrap
salt_bootstrap_options: -pythonVersion 3 -version 3000.3
init_environment: >
C:\salt\salt-call --local state.single file.managed
C:\Users\kitchen\AppData\Local\Temp\kitchen\srv\salt\win\repo-ng\salt-minion-py3.sls
source=https://github.com/saltstack/salt-winrepo-ng/raw/master/salt-minion-py3.sls
skip_verify=True makedirs=True
suites:
- name: v3000-py3
provisioner:
state_top:
base:
'*':
- salt._mapdata
- salt.minion
pillars:
top.sls:
base:
'*':
- salt
- v3000-py3
pillars_from_files:
salt.sls: test/salt/pillar/salt.sls
v3000-py3.sls: test/salt/pillar/v3000-py3.sls
verifier:
inspec_tests:
- path: test/integration/v3000-py3
salt_bootstrap_options: -pythonVersion 3 -version 3002.5
# yamllint disable rule:line-length
init_environment: |
C:\salt\salt-call --local state.single file.managed `
C:\Users\kitchen\AppData\Local\Temp\kitchen\srv\salt\win\repo-ng\salt-minion-py3.sls `
source=https://github.com/saltstack/salt-winrepo-ng/raw/master/salt-minion-py3.sls `
skip_verify=True makedirs=True
# yamllint enable rule:line-length

View File

@ -324,6 +324,11 @@ suites:
- arch-base-latest-3002-5-py3
- gentoo-stage3-latest-3002-5-py3
- gentoo-stage3-systemd-3002-5-py3
- freebsd-122-latest-py3
- freebsd-114-latest-py3
- windows-81-latest-py3
- windows-2019-latest-py3
- windows-2016-latest-py3
provisioner:
state_top:
base:
@ -363,6 +368,7 @@ suites:
- arch-base-latest-3001-6-py3
- gentoo-stage3-latest-3001-6-py3
- gentoo-stage3-systemd-3001-6-py3
- openbsd-68-latest-py3
provisioner:
state_top:
base:

View File

@ -369,6 +369,13 @@ salt:
- 'deploy':
- /srv/salt/reactors/deploy.sls
# https://docs.saltstack.com/en/latest/ref/states/requisites.html#retrying-states
retry_options:
attempts: 2
until: true
interval: 10
splay: 10
salt_cloud_certs:
aws:
pem: |

View File

@ -85,6 +85,13 @@ salt:
profiles: salt://salt/files/cloud.profiles.d
maps: salt://salt/files/cloud.maps.d
# https://docs.saltstack.com/en/latest/ref/states/requisites.html#retrying-states
retry_options:
attempts: 2
until: true
interval: 10
splay: 10
salt_formulas:
list: {} # via pillar data
checkout_orig_branch: false

View File

@ -15,11 +15,7 @@ salt-master-macos:
- name: /Library/LaunchDaemons/com.saltstack.salt.master.plist
- source: https://raw.githubusercontent.com/saltstack/salt/master/pkg/osx/scripts/com.saltstack.salt.master.plist
- source_hash: {{ salt_settings.salt_master_macos_plist_hash }}
- retry:
attempts: 2
until: True
interval: 10
splay: 10
- retry: {{ salt_settings.retry_options | json }}
- require_in:
- service: salt-master
{%- endif %}
@ -31,6 +27,9 @@ salt-master:
{%- if salt_settings.version is defined %}
- version: {{ salt_settings.version }}
{%- endif %}
{%- if grains.os_family == 'FreeBSD' %}
- unless: pkg info | grep {{ salt_settings.salt_master }}
{%- endif %}
{% if salt_settings.master_service_details.state != 'ignore' %}
- require_in:
- service: salt-master

View File

@ -27,11 +27,7 @@ download-salt-minion:
- test -n "{{ salt_settings.version }}" && '/opt/salt/bin/salt-minion --version=.*{{ salt_settings.version }}.*'
- require_in:
- macpackage: salt-minion
- retry:
attempts: 2
until: True
interval: 10
splay: 10
- retry: {{ salt_settings.retry_options | json }}
{%- elif "workaround https://github.com/saltstack/salt/issues/49348" %}
cmd.run:
- name: /usr/local/bin/brew install {{ salt_settings.salt_minion }}
@ -45,11 +41,7 @@ salt-minion-macos:
- name: /Library/LaunchDaemons/com.saltstack.salt.minion.plist
- source: https://raw.githubusercontent.com/saltstack/salt/master/pkg/osx/scripts/com.saltstack.salt.master.plist
- source_hash: {{ salt_settings.salt_minion_macos_plist_hash }}
- retry:
attempts: 2
until: True
interval: 10
splay: 10
- retry: {{ salt_settings.retry_options | json }}
- require_in:
- service: salt-minion
- watch_in:
@ -79,6 +71,9 @@ salt-minion:
{%- if salt_settings.version %}
- version: {{ salt_settings.version }}
{%- endif %}
{%- if grains.os_family == 'FreeBSD' %}
- unless: pkg info | grep {{ salt_settings.salt_master }}
{%- endif %}
{% if salt_settings.minion_service_details.state != 'ignore' %}
- require_in:
- service: salt-minion
@ -105,6 +100,9 @@ salt-minion:
service.{{ salt_settings.minion_service_details.state }}:
- enable: {{ salt_settings.minion_service_details.enabled }}
- name: {{ salt_settings.minion_service }}
{%- if grains.os_family == 'FreeBSD' %}
- retry: {{ salt_settings.retry_options | json }}
{%- endif %}
- watch:
- file: remove-old-minion-conf-file
- order: last

View File

@ -20,7 +20,7 @@
{%- set rootuser = salt['cmd.run']("stat -f '%Su' /dev/console") %}
{%- set rootgroup = salt['cmd.run']("stat -f '%Sg' /dev/console") %}
{%- elif grains.os_family == 'Windows' %}
{%- set rootuser = salt['cmd.run']("id -un") %}
{%- set rootuser = salt['cmd.run']("whoami").split("\\")[1] %}
{%- endif %}

View File

@ -63,5 +63,22 @@ MacOS:
salt_master_macos_plist_hash: 8435331b2d48ca8f0759f216e5b15ec9171a4216b1441328c732c6906728b7c9
salt_minion_macos_plist_hash: 26b33da12e0d8960ee96b488c8352002c22a377c19bf3df3f986a1e49eca8b20
FreeBSD:
salt_master: py37-salt-3002.6
salt_minion: py37-salt-3002.6
salt_syndic: py37-salt-3002.6
salt_cloud: py37-salt-3002.6
salt_api: py37-salt-3002.6
salt_ssh: py37-salt-3002.6
python_git: py37-GitPython-3.1.11
pygit2: py37-pygit2-1.3.0
python_dulwich: py37-dulwich-0.19.16
# If `osfingermap.yaml` is introduced in the future, perhaps better to move to there,
# since this is probably specific to `OpenBSD-6`
OpenBSD:
python_git: py3-GitPython
python_dulwich: py3-dulwich
Windows:
parallel: false # not supported on windows/cygwin

View File

@ -1,14 +1,23 @@
# frozen_string_literal: true
pkgs =
case system.platform[:name]
when 'arch'
%w[salt]
when /bsd$/
%w[py37-salt-3002.6]
when 'windows'
%w[Salt\ Minion]
else
%w[salt-master salt-minion]
end
control 'salt packages' do
title 'should be installed'
version = '3000'
%w[
salt-master
salt-minion
].each do |p|
pkgs.each do |p|
describe package(p) do
it { should be_installed }
its('version') { should match(/^#{version}/) }

View File

@ -1,12 +1,19 @@
# frozen_string_literal: true
services =
case system.platform[:family]
when 'bsd'
%w[salt_master salt_minion]
when 'windows'
%w[salt-minion]
else
%w[salt-master salt-minion]
end
control 'salt services' do
title 'should be running'
%w[
salt-master
salt-minion
].each do |p|
services.each do |p|
describe service(p) do
it { should be_installed }
it { should be_enabled }

View File

@ -94,6 +94,11 @@ values:
python_git: python-git
release: '3000'
restart_via_at: false
retry_options:
attempts: 2
interval: 10
splay: 10
until: true
rootgroup: root
rootuser: root
salt_api: salt-api

View File

@ -94,6 +94,11 @@ values:
python_git: python-git
release: '3000'
restart_via_at: false
retry_options:
attempts: 2
interval: 10
splay: 10
until: true
rootgroup: root
rootuser: root
salt_api: salt-api

View File

@ -1,7 +1,11 @@
# frozen_string_literal: true
pkgs =
case platform[:family]
case system.platform[:name]
when 'arch'
%w[salt]
when /bsd$/
%w[py37-salt-3002.6]
when 'windows'
%w[Salt\ Minion]
else

View File

@ -1,7 +1,9 @@
# frozen_string_literal: true
services =
case platform[:family]
case system.platform[:family]
when 'bsd'
%w[salt_master salt_minion]
when 'windows'
%w[salt-minion]
else

View File

@ -94,6 +94,11 @@ values:
python_git: GitPython
release: '3000'
restart_via_at: false
retry_options:
attempts: 2
interval: 10
splay: 10
until: true
rootgroup: root
rootuser: root
salt_api: salt-api

View File

@ -94,6 +94,11 @@ values:
python_git: GitPython
release: '3000'
restart_via_at: false
retry_options:
attempts: 2
interval: 10
splay: 10
until: true
rootgroup: root
rootuser: root
salt_api: salt-api

View File

@ -94,6 +94,11 @@ values:
python_git: GitPython
release: '3000'
restart_via_at: false
retry_options:
attempts: 2
interval: 10
splay: 10
until: true
rootgroup: root
rootuser: root
salt_api: salt-api

View File

@ -93,6 +93,11 @@ values:
python_git: python-git
release: '3000'
restart_via_at: false
retry_options:
attempts: 2
interval: 10
splay: 10
until: true
rootgroup: root
rootuser: root
salt_api: salt-api

View File

@ -93,6 +93,11 @@ values:
python_git: python-git
release: '3000'
restart_via_at: false
retry_options:
attempts: 2
interval: 10
splay: 10
until: true
rootgroup: root
rootuser: root
salt_api: salt-api

View File

@ -91,6 +91,11 @@ values:
python_git: python-git
release: '3000'
restart_via_at: false
retry_options:
attempts: 2
interval: 10
splay: 10
until: true
rootgroup: root
rootuser: root
salt_api: app-admin/salt

View File

@ -91,6 +91,11 @@ values:
python_git: python-git
release: '3000'
restart_via_at: false
retry_options:
attempts: 2
interval: 10
splay: 10
until: true
rootgroup: root
rootuser: root
salt_api: app-admin/salt

View File

@ -94,6 +94,11 @@ values:
python_git: python-git
release: '3000'
restart_via_at: false
retry_options:
attempts: 2
interval: 10
splay: 10
until: true
rootgroup: root
rootuser: root
salt_api: salt-api

View File

@ -94,6 +94,11 @@ values:
python_git: GitPython
release: '3000'
restart_via_at: false
retry_options:
attempts: 2
interval: 10
splay: 10
until: true
rootgroup: root
rootuser: root
salt_api: salt-api

View File

@ -94,6 +94,11 @@ values:
python_git: GitPython
release: '3000'
restart_via_at: false
retry_options:
attempts: 2
interval: 10
splay: 10
until: true
rootgroup: root
rootuser: root
salt_api: salt-api

View File

@ -94,6 +94,11 @@ values:
python_git: python-git
release: '3000'
restart_via_at: false
retry_options:
attempts: 2
interval: 10
splay: 10
until: true
rootgroup: root
rootuser: root
salt_api: salt-api

View File

@ -94,6 +94,11 @@ values:
python_git: python-git
release: '3000'
restart_via_at: false
retry_options:
attempts: 2
interval: 10
splay: 10
until: true
rootgroup: root
rootuser: root
salt_api: salt-api

View File

@ -90,6 +90,11 @@ values:
python_git: python-git
release: '3000'
restart_via_at: false
retry_options:
attempts: 2
interval: 10
splay: 10
until: true
rootgroup: root
rootuser: kitchen
salt_api: salt-api

View File

@ -1,14 +1,23 @@
# frozen_string_literal: true
pkgs =
case system.platform[:name]
when 'arch'
%w[salt]
when /bsd$/
%w[py37-salt-3002.6]
when 'windows'
%w[Salt\ Minion]
else
%w[salt-master salt-minion]
end
control 'salt packages' do
title 'should be installed'
version = '3001'
%w[
salt-master
salt-minion
].each do |p|
pkgs.each do |p|
describe package(p) do
it { should be_installed }
its('version') { should match(/^#{version}/) }

View File

@ -1,12 +1,19 @@
# frozen_string_literal: true
services =
case system.platform[:family]
when 'bsd'
%w[salt_master salt_minion]
when 'windows'
%w[salt-minion]
else
%w[salt-master salt-minion]
end
control 'salt services' do
title 'should be running'
%w[
salt-master
salt-minion
].each do |p|
services.each do |p|
describe service(p) do
it { should be_installed }
it { should be_enabled }

View File

@ -94,6 +94,11 @@ values:
python_git: GitPython
release: '3001'
restart_via_at: false
retry_options:
attempts: 2
interval: 10
splay: 10
until: true
rootgroup: root
rootuser: root
salt_api: salt-api

View File

@ -94,6 +94,11 @@ values:
python_git: GitPython
release: '3001'
restart_via_at: false
retry_options:
attempts: 2
interval: 10
splay: 10
until: true
rootgroup: root
rootuser: root
salt_api: salt-api

View File

@ -94,6 +94,11 @@ values:
python_git: GitPython
release: '3001'
restart_via_at: false
retry_options:
attempts: 2
interval: 10
splay: 10
until: true
rootgroup: root
rootuser: root
salt_api: salt-api

View File

@ -93,6 +93,11 @@ values:
python_git: python-git
release: '3001'
restart_via_at: false
retry_options:
attempts: 2
interval: 10
splay: 10
until: true
rootgroup: root
rootuser: root
salt_api: salt-api

View File

@ -93,6 +93,11 @@ values:
python_git: python-git
release: '3001'
restart_via_at: false
retry_options:
attempts: 2
interval: 10
splay: 10
until: true
rootgroup: root
rootuser: root
salt_api: salt-api

View File

@ -94,6 +94,11 @@ values:
python_git: GitPython
release: '3001'
restart_via_at: false
retry_options:
attempts: 2
interval: 10
splay: 10
until: true
rootgroup: root
rootuser: root
salt_api: salt-api

View File

@ -94,6 +94,11 @@ values:
python_git: GitPython
release: '3001'
restart_via_at: false
retry_options:
attempts: 2
interval: 10
splay: 10
until: true
rootgroup: root
rootuser: root
salt_api: salt-api

View File

@ -91,6 +91,11 @@ values:
python_git: python-git
release: '3001'
restart_via_at: false
retry_options:
attempts: 2
interval: 10
splay: 10
until: true
rootgroup: root
rootuser: root
salt_api: app-admin/salt

View File

@ -91,6 +91,11 @@ values:
python_git: python-git
release: '3001'
restart_via_at: false
retry_options:
attempts: 2
interval: 10
splay: 10
until: true
rootgroup: root
rootuser: root
salt_api: app-admin/salt

View File

@ -0,0 +1,111 @@
# yamllint disable rule:indentation rule:line-length
# OpenBSD-6
---
values:
formulas_settings:
checkout_orig_branch: false
git_opts:
default:
basedir: /srv/formulas
baseurl: https://github.com/saltstack-formulas
options:
output_loglevel: quiet
rev: master
update: false
list: {}
salt_settings:
api_service: salt-api
api_service_details:
enabled: true
state: running
clean_config_d_dir: true
cloud:
template_sources:
maps: salt://salt/files/cloud.maps.d
profiles: salt://salt/files/cloud.profiles.d
providers: salt://salt/files/cloud.providers.d
config_path: /etc/salt
gitfs:
dulwich:
install_from_source: true
gitpython:
install_from_source: false
pygit2:
git:
install_from_package: git
require_state: false
install_from_source: true
libgit2:
build_parent_dir: /usr/src/
download_hash: 683d1164e361e2a0a8d52652840e2340
install_from_source: true
version: 0.23.0
version: 0.23.0
install_packages: true
master:
ext_pillar:
- cmd_yaml: cat /etc/salt/yaml
- stack:
- /path/to/stack1.cfg
- /path/to/stack2.cfg
- reclass:
inventory_base_uri: /etc/reclass
file_roots:
base:
- /srv/salt
fileserver_backend:
- rootfs
gitfs_provider: gitpython
pillar_roots:
base:
- /srv/pillar
master_config_use_TOFS: false
master_remove_config: false
master_service: salt_master
master_service_details:
enabled: true
state: running
minion:
file_roots:
base:
- /srv/salt
fileserver_backend:
- rootfs
master: localhost
master_type: true
pillar_roots:
base:
- /srv/pillar
minion_config_use_TOFS: false
minion_remove_config: false
minion_service: salt_minion
minion_service_details:
enabled: true
state: running
parallel: true
pin_version: false
pkgrepo: ''
py_ver: py3
python_dulwich: py3-dulwich
python_git: py3-GitPython
release: '3001'
restart_via_at: false
retry_options:
attempts: 2
interval: 10
splay: 10
until: true
rootgroup: root
rootuser: root
salt_api: salt
salt_cloud: salt
salt_master: salt
salt_master_macos_plist_hash: ''
salt_minion: salt
salt_minion_macos_plist_hash: ''
salt_ssh: salt
salt_syndic: salt
ssh_roster: {}
syndic_service: salt-syndic
use_pip: false
version: ''

View File

@ -94,6 +94,11 @@ values:
python_git: python-git
release: '3001'
restart_via_at: false
retry_options:
attempts: 2
interval: 10
splay: 10
until: true
rootgroup: root
rootuser: root
salt_api: salt-api

View File

@ -94,6 +94,11 @@ values:
python_git: python-git
release: '3001'
restart_via_at: false
retry_options:
attempts: 2
interval: 10
splay: 10
until: true
rootgroup: root
rootuser: root
salt_api: salt-api

View File

@ -94,6 +94,11 @@ values:
python_git: GitPython
release: '3001'
restart_via_at: false
retry_options:
attempts: 2
interval: 10
splay: 10
until: true
rootgroup: root
rootuser: root
salt_api: salt-api

View File

@ -94,6 +94,11 @@ values:
python_git: GitPython
release: '3001'
restart_via_at: false
retry_options:
attempts: 2
interval: 10
splay: 10
until: true
rootgroup: root
rootuser: root
salt_api: salt-api

View File

@ -94,6 +94,11 @@ values:
python_git: python-git
release: '3001'
restart_via_at: false
retry_options:
attempts: 2
interval: 10
splay: 10
until: true
rootgroup: root
rootuser: root
salt_api: salt-api

View File

@ -94,6 +94,11 @@ values:
python_git: python-git
release: '3001'
restart_via_at: false
retry_options:
attempts: 2
interval: 10
splay: 10
until: true
rootgroup: root
rootuser: root
salt_api: salt-api

View File

@ -94,6 +94,11 @@ values:
python_git: python-git
release: '3001'
restart_via_at: false
retry_options:
attempts: 2
interval: 10
splay: 10
until: true
rootgroup: root
rootuser: root
salt_api: salt-api

View File

@ -1,14 +1,23 @@
# frozen_string_literal: true
pkgs =
case system.platform[:name]
when 'arch'
%w[salt]
when /bsd$/
%w[py37-salt-3002.6]
when 'windows'
%w[Salt\ Minion]
else
%w[salt-master salt-minion]
end
control 'salt packages' do
title 'should be installed'
version = '3002'
%w[
salt-master
salt-minion
].each do |p|
pkgs.each do |p|
describe package(p) do
it { should be_installed }
its('version') { should match(/^#{version}/) }

View File

@ -1,12 +1,19 @@
# frozen_string_literal: true
services =
case system.platform[:family]
when 'bsd'
%w[salt_master salt_minion]
when 'windows'
%w[salt-minion]
else
%w[salt-master salt-minion]
end
control 'salt services' do
title 'should be running'
%w[
salt-master
salt-minion
].each do |p|
services.each do |p|
describe service(p) do
it { should be_installed }
it { should be_enabled }

View File

@ -94,6 +94,11 @@ values:
python_git: GitPython
release: '3002'
restart_via_at: false
retry_options:
attempts: 5
interval: 10
splay: 10
until: true
rootgroup: root
rootuser: root
salt_api: salt-api

View File

@ -0,0 +1,114 @@
# yamllint disable rule:indentation rule:line-length
# Arch
---
values:
formulas_settings:
checkout_orig_branch: false
git_opts:
default:
basedir: /srv/formulas
baseurl: https://github.com/saltstack-formulas
options:
output_loglevel: quiet
rev: master
update: false
list: {}
salt_settings:
api_service: salt-api
api_service_details:
enabled: true
state: running
clean_config_d_dir: true
cloud:
template_sources:
maps: salt://salt/files/cloud.maps.d
profiles: salt://salt/files/cloud.profiles.d
providers: salt://salt/files/cloud.providers.d
config_path: /etc/salt
gitfs:
dulwich:
install_from_source: true
gitpython:
install_from_source: false
pygit2:
git:
install_from_package: git
require_state: false
install_from_source: true
libgit2:
build_parent_dir: /usr/src/
download_hash: 683d1164e361e2a0a8d52652840e2340
install_from_source: true
version: 0.23.0
version: 0.23.0
install_packages: true
libgit2: libgit2
master:
ext_pillar:
- cmd_yaml: cat /etc/salt/yaml
- stack:
- /path/to/stack1.cfg
- /path/to/stack2.cfg
- reclass:
inventory_base_uri: /etc/reclass
file_roots:
base:
- /srv/salt
fileserver_backend:
- rootfs
gitfs_provider: gitpython
pillar_roots:
base:
- /srv/pillar
master_config_use_TOFS: false
master_remove_config: false
master_service: salt-master
master_service_details:
enabled: true
state: running
minion:
file_roots:
base:
- /srv/salt
fileserver_backend:
- rootfs
master: localhost
master_type: true
pillar_roots:
base:
- /srv/pillar
minion_config_use_TOFS: false
minion_remove_config: false
minion_service: salt-minion
minion_service_details:
enabled: true
state: running
parallel: true
pin_version: false
pkgrepo: ''
py_ver: py3
pygit2: python2-pygit2
pyinotify: python2-pyinotify
python_dulwich: python-dulwich
python_git: python2-gitpython
release: '3002'
restart_via_at: false
retry_options:
attempts: 5
interval: 10
splay: 10
until: true
rootgroup: root
rootuser: root
salt_api: salt
salt_cloud: salt
salt_master: salt
salt_master_macos_plist_hash: ''
salt_minion: salt
salt_minion_macos_plist_hash: ''
salt_ssh: salt
salt_syndic: salt
ssh_roster: {}
syndic_service: salt-syndic
use_pip: false
version: ''

View File

@ -94,6 +94,11 @@ values:
python_git: GitPython
release: '3002'
restart_via_at: false
retry_options:
attempts: 5
interval: 10
splay: 10
until: true
rootgroup: root
rootuser: root
salt_api: salt-api

View File

@ -94,6 +94,11 @@ values:
python_git: GitPython
release: '3002'
restart_via_at: false
retry_options:
attempts: 5
interval: 10
splay: 10
until: true
rootgroup: root
rootuser: root
salt_api: salt-api

View File

@ -93,6 +93,11 @@ values:
python_git: python-git
release: '3002'
restart_via_at: false
retry_options:
attempts: 5
interval: 10
splay: 10
until: true
rootgroup: root
rootuser: root
salt_api: salt-api

View File

@ -93,6 +93,11 @@ values:
python_git: python-git
release: '3002'
restart_via_at: false
retry_options:
attempts: 5
interval: 10
splay: 10
until: true
rootgroup: root
rootuser: root
salt_api: salt-api

View File

@ -94,6 +94,11 @@ values:
python_git: GitPython
release: '3002'
restart_via_at: false
retry_options:
attempts: 5
interval: 10
splay: 10
until: true
rootgroup: root
rootuser: root
salt_api: salt-api

View File

@ -94,6 +94,11 @@ values:
python_git: GitPython
release: '3002'
restart_via_at: false
retry_options:
attempts: 5
interval: 10
splay: 10
until: true
rootgroup: root
rootuser: root
salt_api: salt-api

View File

@ -0,0 +1,112 @@
# yamllint disable rule:indentation rule:line-length
# FreeBSD-12
---
values:
formulas_settings:
checkout_orig_branch: false
git_opts:
default:
basedir: /srv/formulas
baseurl: https://github.com/saltstack-formulas
options:
output_loglevel: quiet
rev: master
update: false
list: {}
salt_settings:
api_service: salt_api
api_service_details:
enabled: true
state: running
clean_config_d_dir: true
cloud:
template_sources:
maps: salt://salt/files/cloud.maps.d
profiles: salt://salt/files/cloud.profiles.d
providers: salt://salt/files/cloud.providers.d
config_path: /usr/local/etc/salt
gitfs:
dulwich:
install_from_source: true
gitpython:
install_from_source: false
pygit2:
git:
install_from_package: git
require_state: false
install_from_source: true
libgit2:
build_parent_dir: /usr/src/
download_hash: 683d1164e361e2a0a8d52652840e2340
install_from_source: true
version: 0.23.0
version: 0.23.0
install_packages: true
master:
ext_pillar:
- cmd_yaml: cat /etc/salt/yaml
- stack:
- /path/to/stack1.cfg
- /path/to/stack2.cfg
- reclass:
inventory_base_uri: /etc/reclass
file_roots:
base:
- /srv/salt
fileserver_backend:
- rootfs
gitfs_provider: gitpython
pillar_roots:
base:
- /srv/pillar
master_config_use_TOFS: false
master_remove_config: false
master_service: salt_master
master_service_details:
enabled: true
state: running
minion:
file_roots:
base:
- /srv/salt
fileserver_backend:
- rootfs
master: localhost
master_type: true
pillar_roots:
base:
- /srv/pillar
minion_config_use_TOFS: false
minion_remove_config: false
minion_service: salt_minion
minion_service_details:
enabled: true
state: running
parallel: true
pin_version: false
pkgrepo: ''
py_ver: py3
pygit2: py37-pygit2-1.3.0
python_dulwich: py37-dulwich-0.19.16
python_git: py37-GitPython-3.1.11
release: '3002'
restart_via_at: false
retry_options:
attempts: 5
interval: 10
splay: 10
until: true
rootgroup: wheel
rootuser: root
salt_api: py37-salt-3002.6
salt_cloud: py37-salt-3002.6
salt_master: py37-salt-3002.6
salt_master_macos_plist_hash: ''
salt_minion: py37-salt-3002.6
salt_minion_macos_plist_hash: ''
salt_ssh: py37-salt-3002.6
salt_syndic: py37-salt-3002.6
ssh_roster: {}
syndic_service: salt_syndic
use_pip: false
version: ''

View File

@ -0,0 +1,112 @@
# yamllint disable rule:indentation rule:line-length
# FreeBSD-12
---
values:
formulas_settings:
checkout_orig_branch: false
git_opts:
default:
basedir: /srv/formulas
baseurl: https://github.com/saltstack-formulas
options:
output_loglevel: quiet
rev: master
update: false
list: {}
salt_settings:
api_service: salt_api
api_service_details:
enabled: true
state: running
clean_config_d_dir: true
cloud:
template_sources:
maps: salt://salt/files/cloud.maps.d
profiles: salt://salt/files/cloud.profiles.d
providers: salt://salt/files/cloud.providers.d
config_path: /usr/local/etc/salt
gitfs:
dulwich:
install_from_source: true
gitpython:
install_from_source: false
pygit2:
git:
install_from_package: git
require_state: false
install_from_source: true
libgit2:
build_parent_dir: /usr/src/
download_hash: 683d1164e361e2a0a8d52652840e2340
install_from_source: true
version: 0.23.0
version: 0.23.0
install_packages: true
master:
ext_pillar:
- cmd_yaml: cat /etc/salt/yaml
- stack:
- /path/to/stack1.cfg
- /path/to/stack2.cfg
- reclass:
inventory_base_uri: /etc/reclass
file_roots:
base:
- /srv/salt
fileserver_backend:
- rootfs
gitfs_provider: gitpython
pillar_roots:
base:
- /srv/pillar
master_config_use_TOFS: false
master_remove_config: false
master_service: salt_master
master_service_details:
enabled: true
state: running
minion:
file_roots:
base:
- /srv/salt
fileserver_backend:
- rootfs
master: localhost
master_type: true
pillar_roots:
base:
- /srv/pillar
minion_config_use_TOFS: false
minion_remove_config: false
minion_service: salt_minion
minion_service_details:
enabled: true
state: running
parallel: true
pin_version: false
pkgrepo: ''
py_ver: py3
pygit2: py37-pygit2-1.3.0
python_dulwich: py37-dulwich-0.19.16
python_git: py37-GitPython-3.1.11
release: '3002'
restart_via_at: false
retry_options:
attempts: 5
interval: 10
splay: 10
until: true
rootgroup: wheel
rootuser: root
salt_api: py37-salt-3002.6
salt_cloud: py37-salt-3002.6
salt_master: py37-salt-3002.6
salt_master_macos_plist_hash: ''
salt_minion: py37-salt-3002.6
salt_minion_macos_plist_hash: ''
salt_ssh: py37-salt-3002.6
salt_syndic: py37-salt-3002.6
ssh_roster: {}
syndic_service: salt_syndic
use_pip: false
version: ''

View File

@ -91,6 +91,11 @@ values:
python_git: python-git
release: '3002'
restart_via_at: false
retry_options:
attempts: 5
interval: 10
splay: 10
until: true
rootgroup: root
rootuser: root
salt_api: app-admin/salt

View File

@ -91,6 +91,11 @@ values:
python_git: python-git
release: '3002'
restart_via_at: false
retry_options:
attempts: 5
interval: 10
splay: 10
until: true
rootgroup: root
rootuser: root
salt_api: app-admin/salt

View File

@ -94,6 +94,11 @@ values:
python_git: python-git
release: '3002'
restart_via_at: false
retry_options:
attempts: 5
interval: 10
splay: 10
until: true
rootgroup: root
rootuser: root
salt_api: salt-api

View File

@ -94,6 +94,11 @@ values:
python_git: python-git
release: '3002'
restart_via_at: false
retry_options:
attempts: 5
interval: 10
splay: 10
until: true
rootgroup: root
rootuser: root
salt_api: salt-api

View File

@ -94,6 +94,11 @@ values:
python_git: GitPython
release: '3002'
restart_via_at: false
retry_options:
attempts: 5
interval: 10
splay: 10
until: true
rootgroup: root
rootuser: root
salt_api: salt-api

View File

@ -94,6 +94,11 @@ values:
python_git: GitPython
release: '3002'
restart_via_at: false
retry_options:
attempts: 5
interval: 10
splay: 10
until: true
rootgroup: root
rootuser: root
salt_api: salt-api

View File

@ -94,6 +94,11 @@ values:
python_git: python-git
release: '3002'
restart_via_at: false
retry_options:
attempts: 5
interval: 10
splay: 10
until: true
rootgroup: root
rootuser: root
salt_api: salt-api

View File

@ -94,6 +94,11 @@ values:
python_git: python-git
release: '3002'
restart_via_at: false
retry_options:
attempts: 5
interval: 10
splay: 10
until: true
rootgroup: root
rootuser: root
salt_api: salt-api

View File

@ -94,6 +94,11 @@ values:
python_git: python-git
release: '3002'
restart_via_at: false
retry_options:
attempts: 5
interval: 10
splay: 10
until: true
rootgroup: root
rootuser: root
salt_api: salt-api

View File

@ -0,0 +1,111 @@
# yamllint disable rule:indentation rule:line-length
# Windows-2016Server
---
values:
formulas_settings:
checkout_orig_branch: false
git_opts:
default:
basedir: "/srv/formulas"
baseurl: https://github.com/saltstack-formulas
options:
output_loglevel: quiet
rev: master
update: false
list: {}
salt_settings:
api_service: salt-api
api_service_details:
enabled: true
state: running
clean_config_d_dir: true
cloud:
template_sources:
maps: salt://salt/files/cloud.maps.d
profiles: salt://salt/files/cloud.profiles.d
providers: salt://salt/files/cloud.providers.d
config_path: C:\salt\conf
gitfs:
dulwich:
install_from_source: true
gitpython:
install_from_source: false
pygit2:
git:
install_from_package: git
require_state: false
install_from_source: true
libgit2:
build_parent_dir: "/usr/src/"
download_hash: 683d1164e361e2a0a8d52652840e2340
install_from_source: true
version: 0.23.0
version: 0.23.0
install_packages: true
master:
ext_pillar:
- cmd_yaml: cat /etc/salt/yaml
- stack:
- /path/to/stack1.cfg
- /path/to/stack2.cfg
- reclass:
inventory_base_uri: /etc/reclass
file_roots:
base:
- "/srv/salt"
fileserver_backend:
- rootfs
gitfs_provider: gitpython
pillar_roots:
base:
- "/srv/pillar"
master_config_use_TOFS: false
master_remove_config: false
master_service: salt-master
master_service_details:
enabled: true
state: running
minion:
file_roots:
base:
- "/srv/salt"
fileserver_backend:
- rootfs
master: localhost
master_type: true
pillar_roots:
base:
- "/srv/pillar"
minion_config_use_TOFS: false
minion_remove_config: false
minion_service: salt-minion
minion_service_details:
enabled: true
state: running
parallel: false
pin_version: false
pkgrepo: ''
py_ver: py3
python_dulwich: python-dulwich
python_git: python-git
release: '3002'
restart_via_at: false
retry_options:
attempts: 5
interval: 10
splay: 10
until: true
rootgroup: root
rootuser: kitchen
salt_api: salt-api
salt_cloud: salt-cloud
salt_master: salt-master
salt_master_macos_plist_hash: ''
salt_minion: salt-minion-py3
salt_minion_macos_plist_hash: ''
salt_ssh: salt-ssh
salt_syndic: salt-syndic
ssh_roster: {}
syndic_service: salt-syndic
use_pip: false
version: ''

View File

@ -0,0 +1,111 @@
# yamllint disable rule:indentation rule:line-length
# Windows-2019Server
---
values:
formulas_settings:
checkout_orig_branch: false
git_opts:
default:
basedir: "/srv/formulas"
baseurl: https://github.com/saltstack-formulas
options:
output_loglevel: quiet
rev: master
update: false
list: {}
salt_settings:
api_service: salt-api
api_service_details:
enabled: true
state: running
clean_config_d_dir: true
cloud:
template_sources:
maps: salt://salt/files/cloud.maps.d
profiles: salt://salt/files/cloud.profiles.d
providers: salt://salt/files/cloud.providers.d
config_path: C:\salt\conf
gitfs:
dulwich:
install_from_source: true
gitpython:
install_from_source: false
pygit2:
git:
install_from_package: git
require_state: false
install_from_source: true
libgit2:
build_parent_dir: "/usr/src/"
download_hash: 683d1164e361e2a0a8d52652840e2340
install_from_source: true
version: 0.23.0
version: 0.23.0
install_packages: true
master:
ext_pillar:
- cmd_yaml: cat /etc/salt/yaml
- stack:
- /path/to/stack1.cfg
- /path/to/stack2.cfg
- reclass:
inventory_base_uri: /etc/reclass
file_roots:
base:
- "/srv/salt"
fileserver_backend:
- rootfs
gitfs_provider: gitpython
pillar_roots:
base:
- "/srv/pillar"
master_config_use_TOFS: false
master_remove_config: false
master_service: salt-master
master_service_details:
enabled: true
state: running
minion:
file_roots:
base:
- "/srv/salt"
fileserver_backend:
- rootfs
master: localhost
master_type: true
pillar_roots:
base:
- "/srv/pillar"
minion_config_use_TOFS: false
minion_remove_config: false
minion_service: salt-minion
minion_service_details:
enabled: true
state: running
parallel: false
pin_version: false
pkgrepo: ''
py_ver: py3
python_dulwich: python-dulwich
python_git: python-git
release: '3002'
restart_via_at: false
retry_options:
attempts: 5
interval: 10
splay: 10
until: true
rootgroup: root
rootuser: kitchen
salt_api: salt-api
salt_cloud: salt-cloud
salt_master: salt-master
salt_master_macos_plist_hash: ''
salt_minion: salt-minion-py3
salt_minion_macos_plist_hash: ''
salt_ssh: salt-ssh
salt_syndic: salt-syndic
ssh_roster: {}
syndic_service: salt-syndic
use_pip: false
version: ''

View File

@ -88,10 +88,15 @@ values:
py_ver: py3
python_dulwich: python-dulwich
python_git: python-git
release: '3000'
release: '3002'
restart_via_at: false
retry_options:
attempts: 5
interval: 10
splay: 10
until: true
rootgroup: root
rootuser: kitchen
rootuser: vagrant
salt_api: salt-api
salt_cloud: salt-cloud
salt_master: salt-master

View File

@ -4,3 +4,10 @@
salt:
release: '3002'
py_ver: 'py3'
# Override used for FreeBSD minion service
retry_options:
attempts: 5
until: true
interval: 10
splay: 10