mirror of
https://github.com/saltstack-formulas/packages-formula.git
synced 2025-04-16 09:40:23 +00:00
Fix utf issues with 2019.2
This commit is contained in:
parent
2e3a425ace
commit
440321ab1e
11 changed files with 166 additions and 111 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -47,6 +47,7 @@ coverage.xml
|
|||
.hypothesis/
|
||||
.kitchen
|
||||
.kitchen.local.yml
|
||||
kitchen.local.yml
|
||||
|
||||
# Translations
|
||||
*.mo
|
||||
|
|
98
.kitchen.yml
98
.kitchen.yml
|
@ -1,98 +0,0 @@
|
|||
---
|
||||
driver:
|
||||
name: docker
|
||||
|
||||
driver_config:
|
||||
use_sudo: false
|
||||
privileged: true
|
||||
provision_command: mkdir -p /run/sshd
|
||||
|
||||
platforms:
|
||||
- name: debian-9
|
||||
driver_config:
|
||||
run_command: /lib/systemd/systemd
|
||||
provision_command:
|
||||
- apt-get install udev -y
|
||||
- name: ubuntu-18.04
|
||||
driver_config:
|
||||
run_command: /lib/systemd/systemd
|
||||
provision_command:
|
||||
- apt-get install udev -y
|
||||
- name: fedora-27
|
||||
driver_config:
|
||||
run_command: /usr/lib/systemd/systemd
|
||||
- name: centos-7
|
||||
driver_config:
|
||||
image: saltstack/centos-7-minimal
|
||||
run_command: /usr/lib/systemd/systemd
|
||||
|
||||
provisioner:
|
||||
name: salt_solo
|
||||
log_level: info
|
||||
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:
|
||||
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:
|
||||
- centos-7
|
||||
- fedora-27
|
||||
|
||||
- name: fedora
|
||||
excludes:
|
||||
- debian-9
|
||||
- ubuntu-18.04
|
||||
- centos-7
|
||||
provisioner:
|
||||
pillars-from-files:
|
||||
packages.sls: test/integration/default/pillar.example.fedora
|
||||
|
||||
- name: centos
|
||||
excludes:
|
||||
- debian-9
|
||||
- ubuntu-18.04
|
||||
- fedora-27
|
||||
provisioner:
|
||||
dependencies:
|
||||
- name: epel
|
||||
repo: git
|
||||
source: https://github.com/saltstack-formulas/epel-formula.git
|
||||
state_top:
|
||||
base:
|
||||
'*':
|
||||
- epel
|
||||
- packages
|
||||
pillars-from-files:
|
||||
packages.sls: test/integration/default/pillar.example.redhat
|
||||
pillars:
|
||||
top.sls:
|
||||
base:
|
||||
'*':
|
||||
- epel
|
||||
- packages
|
||||
epel.sls:
|
||||
disabled: false
|
|
@ -11,8 +11,12 @@ before_install:
|
|||
env:
|
||||
matrix:
|
||||
- INSTANCE: deb-debian-9
|
||||
- INSTANCE: deb-debian-8-backports
|
||||
- INSTANCE: deb-ubuntu-1604
|
||||
- INSTANCE: deb-ubuntu-1804
|
||||
- INSTANCE: centos-centos-7
|
||||
- INSTANCE: rpm-centos-7
|
||||
- INSTANCE: fed-fedora
|
||||
- INSTANCE: rpm-opensuse-leap-salt-minion
|
||||
|
||||
script:
|
||||
- bundle exec kitchen verify ${INSTANCE}
|
||||
|
|
4
Gemfile
4
Gemfile
|
@ -1,7 +1,7 @@
|
|||
source "https://rubygems.org"
|
||||
|
||||
gem "test-kitchen", '>=1.20.0'
|
||||
gem "test-kitchen"
|
||||
gem "kitchen-docker"
|
||||
gem "kitchen-salt", ">=0.1.0"
|
||||
gem "kitchen-salt"
|
||||
gem "kitchen-inspec"
|
||||
|
||||
|
|
|
@ -172,7 +172,9 @@ for integration tests.
|
|||
Tested on
|
||||
|
||||
* Debian/9
|
||||
* Debian/8 (with backports)
|
||||
* Centos/7
|
||||
* Fedora/27
|
||||
* Ubuntu/16.04
|
||||
* Ubuntu/18.04
|
||||
|
||||
* Opensuse/leap
|
||||
|
|
146
kitchen.yml
Normal file
146
kitchen.yml
Normal file
|
@ -0,0 +1,146 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# vim: ft=yaml
|
||||
---
|
||||
# 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
|
||||
|
||||
# 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
|
||||
provision_command:
|
||||
- apt-get update && apt-get install -y udev
|
||||
- name: debian-8-backports
|
||||
driver_config:
|
||||
image: debian:jessie-backports
|
||||
run_command: /lib/systemd/systemd
|
||||
provision_command:
|
||||
- apt-get update && apt-get install -y udev
|
||||
- name: ubuntu-18.04
|
||||
driver_config:
|
||||
image: ubuntu:18.04
|
||||
run_command: /lib/systemd/systemd
|
||||
provision_command:
|
||||
- apt-get update && apt-get install -y udev
|
||||
- name: ubuntu-16.04
|
||||
driver_config:
|
||||
image: ubuntu:16.04
|
||||
run_command: /lib/systemd/systemd
|
||||
provision_command:
|
||||
- apt-get update && apt-get install -y udev
|
||||
- name: centos-7
|
||||
driver_config:
|
||||
image: centos:7
|
||||
run_command: /usr/lib/systemd/systemd
|
||||
# - name: centos-6
|
||||
# driver_config:
|
||||
# image: centos:6
|
||||
# run_command: /usr/lib/systemd/systemd
|
||||
- name: fedora
|
||||
driver_config:
|
||||
image: fedora
|
||||
run_command: /usr/lib/systemd/systemd
|
||||
provision_command:
|
||||
- yum -y update && yum -y install udev
|
||||
# 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
|
||||
run_command: /usr/lib/systemd/systemd
|
||||
provision_command:
|
||||
- zypper refresh && zypper install -y udev
|
||||
- systemctl enable sshd.service
|
||||
- cat /etc/os-release
|
||||
|
||||
provisioner:
|
||||
name: salt_solo
|
||||
log_level: info
|
||||
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:
|
||||
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:
|
||||
- centos-7
|
||||
- fedora
|
||||
- opensuse-leap-salt-minion
|
||||
|
||||
- name: fed
|
||||
excludes:
|
||||
- debian-9
|
||||
- debian-8-backports
|
||||
- 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: rpm
|
||||
excludes:
|
||||
- debian-9
|
||||
- debian-8-backports
|
||||
- ubuntu-16.04
|
||||
- ubuntu-18.04
|
||||
- fedora
|
||||
provisioner:
|
||||
dependencies:
|
||||
- name: epel
|
||||
repo: git
|
||||
source: https://github.com/saltstack-formulas/epel-formula.git
|
||||
state_top:
|
||||
base:
|
||||
'*':
|
||||
- epel
|
||||
- packages
|
||||
pillars-from-files:
|
||||
packages.sls: test/integration/default/pillar.example.redhat
|
||||
pillars:
|
||||
top.sls:
|
||||
base:
|
||||
'*':
|
||||
- epel
|
||||
- packages
|
||||
epel.sls:
|
||||
disabled: false
|
|
@ -9,7 +9,7 @@ include:
|
|||
extend:
|
||||
pkg_req_pkgs:
|
||||
pkg.installed:
|
||||
- pkgs: {{ req_packages }}
|
||||
- pkgs: {{ req_packages | json }}
|
||||
|
||||
{% set wanted_archives = packages.archives.required.archives %}
|
||||
{% do wanted_archives.update( packages.archives.wanted ) %}
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
### REQ PKGS (without these, some of the WANTED GEMS will fail to install)
|
||||
gem_req_pkgs:
|
||||
pkg.installed:
|
||||
- pkgs: {{ req_pkgs }}
|
||||
- pkgs: {{ req_pkgs | json }}
|
||||
|
||||
### GEMS to install
|
||||
# (requires the ruby/rubygem deb/rpm installed, either by the system or listed in
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
### REQ PKGS (without these, some of the WANTED PIPS will fail to install)
|
||||
pip_req_pkgs:
|
||||
pkg.installed:
|
||||
- pkgs: {{ req_pkgs }}
|
||||
- pkgs: {{ req_pkgs | json }}
|
||||
|
||||
{% if pip_config %}
|
||||
pip_config:
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
### PRE-REQ PKGS (without these, some of the WANTED PKGS will fail to install)
|
||||
pkg_req_pkgs:
|
||||
pkg.installed:
|
||||
- pkgs: {{ req_packages }}
|
||||
- pkgs: {{ req_packages | json }}
|
||||
{% if req_states %}
|
||||
- require:
|
||||
{% for dep in req_states %}
|
||||
|
@ -29,7 +29,7 @@ held_pkgs:
|
|||
- {{ p }}: {{ v }}
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
- pkgs: {{ held_packages }}
|
||||
- pkgs: {{ held_packages | json }}
|
||||
{% endif %}
|
||||
{% if grains['os_family'] not in ['Suse'] %}
|
||||
- hold: true
|
||||
|
@ -44,7 +44,7 @@ held_pkgs:
|
|||
|
||||
wanted_pkgs:
|
||||
pkg.installed:
|
||||
- pkgs: {{ wanted_packages }}
|
||||
- pkgs: {{ wanted_packages | json }}
|
||||
{% if grains['os_family'] not in ['Suse'] %}
|
||||
- hold: false
|
||||
{% endif %}
|
||||
|
@ -58,5 +58,5 @@ wanted_pkgs:
|
|||
|
||||
unwanted_pkgs:
|
||||
pkg.purged:
|
||||
- pkgs: {{ unwanted_packages }}
|
||||
- pkgs: {{ unwanted_packages | json }}
|
||||
|
||||
|
|
|
@ -22,11 +22,11 @@ include:
|
|||
extend:
|
||||
unwanted_pkgs:
|
||||
pkg.purged:
|
||||
- pkgs: {{ unwanted_packages }}
|
||||
- pkgs: {{ unwanted_packages | json }}
|
||||
|
||||
pkg_req_pkgs:
|
||||
pkg.installed:
|
||||
- pkgs: {{ req_packages }}
|
||||
- pkgs: {{ req_packages | json }}
|
||||
{% if req_states %}
|
||||
- require:
|
||||
{% for dep in req_states %}
|
||||
|
|
Loading…
Add table
Reference in a new issue