mirror of
https://github.com/saltstack/salt-bootstrap.git
synced 2025-04-16 01:30:21 +00:00
commit
8c2c3e7baa
18 changed files with 548 additions and 3412 deletions
132
.github/workflows/kitchen.macos.yml
vendored
Normal file
132
.github/workflows/kitchen.macos.yml
vendored
Normal file
|
@ -0,0 +1,132 @@
|
|||
# yamllint disable rule:line-length
|
||||
---
|
||||
name: 'Kitchen (MacOS)'
|
||||
'on': ['push', 'pull_request']
|
||||
|
||||
env:
|
||||
KITCHEN_LOCAL_YAML: 'kitchen.macos.yml'
|
||||
|
||||
jobs:
|
||||
generate-actions-workflow:
|
||||
name: 'Generate The Actions Workflow'
|
||||
runs-on: 'ubuntu-latest'
|
||||
steps:
|
||||
- uses: 'actions/checkout@v1'
|
||||
- name: 'Set up Python 3.7'
|
||||
uses: 'actions/setup-python@v1'
|
||||
with:
|
||||
python-version: 3.7
|
||||
- name: 'Install Pre-Commit'
|
||||
run: |
|
||||
pip install -U pip
|
||||
pip install pre-commit
|
||||
pre-commit install
|
||||
- name: 'Generate Workflow Actions'
|
||||
run: |
|
||||
pre-commit run -av generate-actions-workflow
|
||||
lint:
|
||||
name: 'Lint'
|
||||
runs-on: 'ubuntu-latest'
|
||||
needs: 'generate-actions-workflow'
|
||||
container: 'koalaman/shellcheck-alpine:v0.6.0'
|
||||
steps:
|
||||
- uses: 'actions/checkout@v1'
|
||||
- name: 'ShellCheck'
|
||||
run: |
|
||||
shellcheck -s sh -f tty bootstrap-salt.sh
|
||||
test-12:
|
||||
runs-on: 'macos-12'
|
||||
timeout-minutes: 20
|
||||
needs: 'lint'
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
instance:
|
||||
- latest-macos-12
|
||||
- py3-stable-3004-macos-12
|
||||
- py3-stable-3003-macos-12
|
||||
- py3-stable-3002-macos-12
|
||||
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: 'Install Python Dependencies'
|
||||
run: |
|
||||
pip3 install -U pip
|
||||
pip3 install -r tests/requirements.txt
|
||||
- name: 'Run Test Kitchen'
|
||||
run: 'bundle exec kitchen test ${{ matrix.instance }}'
|
||||
test-11:
|
||||
runs-on: 'macos-11'
|
||||
timeout-minutes: 20
|
||||
needs: 'lint'
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
instance:
|
||||
- latest-macos-11
|
||||
- py3-stable-3004-macos-11
|
||||
- py3-stable-3003-macos-11
|
||||
- py3-stable-3002-macos-11
|
||||
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: 'Install Python Dependencies'
|
||||
run: |
|
||||
pip3 install -U pip
|
||||
pip3 install -r tests/requirements.txt
|
||||
- name: 'Run Test Kitchen'
|
||||
run: 'bundle exec kitchen test ${{ matrix.instance }}'
|
||||
test-1015:
|
||||
runs-on: 'macos-10.15'
|
||||
timeout-minutes: 20
|
||||
needs: 'lint'
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
instance:
|
||||
- latest-macos-1015
|
||||
- py3-stable-3004-macos-1015
|
||||
- py3-stable-3003-macos-1015
|
||||
- py3-stable-3002-macos-1015
|
||||
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: 'Install Python Dependencies'
|
||||
run: |
|
||||
pip3 install -U pip
|
||||
pip3 install -r tests/requirements.txt
|
||||
- name: 'Run Test Kitchen'
|
||||
run: 'bundle exec kitchen test ${{ matrix.instance }}'
|
9
.github/workflows/kitchen.vagrant.yml
vendored
9
.github/workflows/kitchen.vagrant.yml
vendored
|
@ -41,15 +41,6 @@ jobs:
|
|||
fail-fast: false
|
||||
matrix:
|
||||
instance:
|
||||
- py3-git-3002-freebsd-130
|
||||
- py3-git-3002-freebsd-123
|
||||
# - py3-git-3002-openbsd-6
|
||||
- py3-git-3003-freebsd-130
|
||||
- py3-git-3003-freebsd-123
|
||||
# - py3-git-3003-openbsd-6
|
||||
- py3-git-3004-freebsd-130
|
||||
- py3-git-3004-freebsd-123
|
||||
# - py3-git-3004-openbsd-6
|
||||
- py3-git-master-freebsd-130
|
||||
- py3-git-master-freebsd-123
|
||||
# - py3-git-master-openbsd-6
|
||||
|
|
1
.github/workflows/kitchen.windows.yml
vendored
1
.github/workflows/kitchen.windows.yml
vendored
|
@ -1,3 +1,4 @@
|
|||
# yamllint disable rule:line-length
|
||||
---
|
||||
name: 'Kitchen (Windows)'
|
||||
'on': ['push', 'pull_request']
|
||||
|
|
557
.github/workflows/main-branch-only.yml
vendored
557
.github/workflows/main-branch-only.yml
vendored
|
@ -1,289 +1,16 @@
|
|||
# DO NOT EDIT THIS FILE DIRECTLY!
|
||||
#
|
||||
# This file was generated by .github/workflows/templates/generate.py
|
||||
#
|
||||
# yamllint disable rule:line-length rule:empty-lines
|
||||
---
|
||||
|
||||
name: Branch Testing
|
||||
|
||||
on: [push]
|
||||
'on': [push]
|
||||
|
||||
jobs:
|
||||
|
||||
py3-stable-3002-gentoo:
|
||||
name: Gentoo v3002 Py3 Stable
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 90
|
||||
|
||||
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Setup Ruby
|
||||
uses: actions/setup-ruby@v1
|
||||
with:
|
||||
ruby-version: 2.6.x
|
||||
|
||||
- name: Install Bundler
|
||||
run: |
|
||||
gem install bundler
|
||||
|
||||
- name: Setup Bundle
|
||||
run: |
|
||||
bundle install --with docker --without opennebula ec2 windows vagrant
|
||||
|
||||
- name: Set up Python 3.7
|
||||
uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: 3.7
|
||||
|
||||
- name: Install Python Dependencies
|
||||
run: |
|
||||
pip install -U pip
|
||||
pip install -r tests/requirements.txt
|
||||
|
||||
- name: Create Test Container
|
||||
run: |
|
||||
bundle exec kitchen create py3-stable-3002-gentoo || bundle exec kitchen create py3-stable-3002-gentoo
|
||||
|
||||
- name: Test Bootstrap In Test Container
|
||||
run: |
|
||||
bundle exec kitchen verify py3-stable-3002-gentoo
|
||||
|
||||
- name: Destroy Test Container
|
||||
if: always()
|
||||
run: |
|
||||
bundle exec kitchen destroy py3-stable-3002-gentoo
|
||||
|
||||
|
||||
py3-git-3002-gentoo:
|
||||
name: Gentoo v3002 Py3 Git
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 90
|
||||
|
||||
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Setup Ruby
|
||||
uses: actions/setup-ruby@v1
|
||||
with:
|
||||
ruby-version: 2.6.x
|
||||
|
||||
- name: Install Bundler
|
||||
run: |
|
||||
gem install bundler
|
||||
|
||||
- name: Setup Bundle
|
||||
run: |
|
||||
bundle install --with docker --without opennebula ec2 windows vagrant
|
||||
|
||||
- name: Set up Python 3.7
|
||||
uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: 3.7
|
||||
|
||||
- name: Install Python Dependencies
|
||||
run: |
|
||||
pip install -U pip
|
||||
pip install -r tests/requirements.txt
|
||||
|
||||
- name: Create Test Container
|
||||
run: |
|
||||
bundle exec kitchen create py3-git-3002-gentoo || bundle exec kitchen create py3-git-3002-gentoo
|
||||
|
||||
- name: Test Bootstrap In Test Container
|
||||
run: |
|
||||
bundle exec kitchen verify py3-git-3002-gentoo
|
||||
|
||||
- name: Destroy Test Container
|
||||
if: always()
|
||||
run: |
|
||||
bundle exec kitchen destroy py3-git-3002-gentoo
|
||||
|
||||
|
||||
py3-stable-3003-gentoo:
|
||||
name: Gentoo v3003 Py3 Stable
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 90
|
||||
|
||||
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Setup Ruby
|
||||
uses: actions/setup-ruby@v1
|
||||
with:
|
||||
ruby-version: 2.6.x
|
||||
|
||||
- name: Install Bundler
|
||||
run: |
|
||||
gem install bundler
|
||||
|
||||
- name: Setup Bundle
|
||||
run: |
|
||||
bundle install --with docker --without opennebula ec2 windows vagrant
|
||||
|
||||
- name: Set up Python 3.7
|
||||
uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: 3.7
|
||||
|
||||
- name: Install Python Dependencies
|
||||
run: |
|
||||
pip install -U pip
|
||||
pip install -r tests/requirements.txt
|
||||
|
||||
- name: Create Test Container
|
||||
run: |
|
||||
bundle exec kitchen create py3-stable-3003-gentoo || bundle exec kitchen create py3-stable-3003-gentoo
|
||||
|
||||
- name: Test Bootstrap In Test Container
|
||||
run: |
|
||||
bundle exec kitchen verify py3-stable-3003-gentoo
|
||||
|
||||
- name: Destroy Test Container
|
||||
if: always()
|
||||
run: |
|
||||
bundle exec kitchen destroy py3-stable-3003-gentoo
|
||||
|
||||
|
||||
py3-git-3003-gentoo:
|
||||
name: Gentoo v3003 Py3 Git
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 90
|
||||
|
||||
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Setup Ruby
|
||||
uses: actions/setup-ruby@v1
|
||||
with:
|
||||
ruby-version: 2.6.x
|
||||
|
||||
- name: Install Bundler
|
||||
run: |
|
||||
gem install bundler
|
||||
|
||||
- name: Setup Bundle
|
||||
run: |
|
||||
bundle install --with docker --without opennebula ec2 windows vagrant
|
||||
|
||||
- name: Set up Python 3.7
|
||||
uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: 3.7
|
||||
|
||||
- name: Install Python Dependencies
|
||||
run: |
|
||||
pip install -U pip
|
||||
pip install -r tests/requirements.txt
|
||||
|
||||
- name: Create Test Container
|
||||
run: |
|
||||
bundle exec kitchen create py3-git-3003-gentoo || bundle exec kitchen create py3-git-3003-gentoo
|
||||
|
||||
- name: Test Bootstrap In Test Container
|
||||
run: |
|
||||
bundle exec kitchen verify py3-git-3003-gentoo
|
||||
|
||||
- name: Destroy Test Container
|
||||
if: always()
|
||||
run: |
|
||||
bundle exec kitchen destroy py3-git-3003-gentoo
|
||||
|
||||
|
||||
py3-stable-3004-gentoo:
|
||||
name: Gentoo v3004 Py3 Stable
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 90
|
||||
|
||||
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Setup Ruby
|
||||
uses: actions/setup-ruby@v1
|
||||
with:
|
||||
ruby-version: 2.6.x
|
||||
|
||||
- name: Install Bundler
|
||||
run: |
|
||||
gem install bundler
|
||||
|
||||
- name: Setup Bundle
|
||||
run: |
|
||||
bundle install --with docker --without opennebula ec2 windows vagrant
|
||||
|
||||
- name: Set up Python 3.7
|
||||
uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: 3.7
|
||||
|
||||
- name: Install Python Dependencies
|
||||
run: |
|
||||
pip install -U pip
|
||||
pip install -r tests/requirements.txt
|
||||
|
||||
- name: Create Test Container
|
||||
run: |
|
||||
bundle exec kitchen create py3-stable-3004-gentoo || bundle exec kitchen create py3-stable-3004-gentoo
|
||||
|
||||
- name: Test Bootstrap In Test Container
|
||||
run: |
|
||||
bundle exec kitchen verify py3-stable-3004-gentoo
|
||||
|
||||
- name: Destroy Test Container
|
||||
if: always()
|
||||
run: |
|
||||
bundle exec kitchen destroy py3-stable-3004-gentoo
|
||||
|
||||
|
||||
py3-git-3004-gentoo:
|
||||
name: Gentoo v3004 Py3 Git
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 90
|
||||
|
||||
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Setup Ruby
|
||||
uses: actions/setup-ruby@v1
|
||||
with:
|
||||
ruby-version: 2.6.x
|
||||
|
||||
- name: Install Bundler
|
||||
run: |
|
||||
gem install bundler
|
||||
|
||||
- name: Setup Bundle
|
||||
run: |
|
||||
bundle install --with docker --without opennebula ec2 windows vagrant
|
||||
|
||||
- name: Set up Python 3.7
|
||||
uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: 3.7
|
||||
|
||||
- name: Install Python Dependencies
|
||||
run: |
|
||||
pip install -U pip
|
||||
pip install -r tests/requirements.txt
|
||||
|
||||
- name: Create Test Container
|
||||
run: |
|
||||
bundle exec kitchen create py3-git-3004-gentoo || bundle exec kitchen create py3-git-3004-gentoo
|
||||
|
||||
- name: Test Bootstrap In Test Container
|
||||
run: |
|
||||
bundle exec kitchen verify py3-git-3004-gentoo
|
||||
|
||||
- name: Destroy Test Container
|
||||
if: always()
|
||||
run: |
|
||||
bundle exec kitchen destroy py3-git-3004-gentoo
|
||||
|
||||
|
||||
py3-git-master-gentoo:
|
||||
name: Gentoo Master Py3 Git
|
||||
runs-on: ubuntu-latest
|
||||
|
@ -376,282 +103,6 @@ jobs:
|
|||
bundle exec kitchen destroy latest-gentoo
|
||||
|
||||
|
||||
py3-stable-3002-gentoo-systemd:
|
||||
name: Gentoo (systemd) v3002 Py3 Stable
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 90
|
||||
|
||||
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Setup Ruby
|
||||
uses: actions/setup-ruby@v1
|
||||
with:
|
||||
ruby-version: 2.6.x
|
||||
|
||||
- name: Install Bundler
|
||||
run: |
|
||||
gem install bundler
|
||||
|
||||
- name: Setup Bundle
|
||||
run: |
|
||||
bundle install --with docker --without opennebula ec2 windows vagrant
|
||||
|
||||
- name: Set up Python 3.7
|
||||
uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: 3.7
|
||||
|
||||
- name: Install Python Dependencies
|
||||
run: |
|
||||
pip install -U pip
|
||||
pip install -r tests/requirements.txt
|
||||
|
||||
- name: Create Test Container
|
||||
run: |
|
||||
bundle exec kitchen create py3-stable-3002-gentoo-systemd || bundle exec kitchen create py3-stable-3002-gentoo-systemd
|
||||
|
||||
- name: Test Bootstrap In Test Container
|
||||
run: |
|
||||
bundle exec kitchen verify py3-stable-3002-gentoo-systemd
|
||||
|
||||
- name: Destroy Test Container
|
||||
if: always()
|
||||
run: |
|
||||
bundle exec kitchen destroy py3-stable-3002-gentoo-systemd
|
||||
|
||||
|
||||
py3-git-3002-gentoo-systemd:
|
||||
name: Gentoo (systemd) v3002 Py3 Git
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 90
|
||||
|
||||
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Setup Ruby
|
||||
uses: actions/setup-ruby@v1
|
||||
with:
|
||||
ruby-version: 2.6.x
|
||||
|
||||
- name: Install Bundler
|
||||
run: |
|
||||
gem install bundler
|
||||
|
||||
- name: Setup Bundle
|
||||
run: |
|
||||
bundle install --with docker --without opennebula ec2 windows vagrant
|
||||
|
||||
- name: Set up Python 3.7
|
||||
uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: 3.7
|
||||
|
||||
- name: Install Python Dependencies
|
||||
run: |
|
||||
pip install -U pip
|
||||
pip install -r tests/requirements.txt
|
||||
|
||||
- name: Create Test Container
|
||||
run: |
|
||||
bundle exec kitchen create py3-git-3002-gentoo-systemd || bundle exec kitchen create py3-git-3002-gentoo-systemd
|
||||
|
||||
- name: Test Bootstrap In Test Container
|
||||
run: |
|
||||
bundle exec kitchen verify py3-git-3002-gentoo-systemd
|
||||
|
||||
- name: Destroy Test Container
|
||||
if: always()
|
||||
run: |
|
||||
bundle exec kitchen destroy py3-git-3002-gentoo-systemd
|
||||
|
||||
|
||||
py3-stable-3003-gentoo-systemd:
|
||||
name: Gentoo (systemd) v3003 Py3 Stable
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 90
|
||||
|
||||
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Setup Ruby
|
||||
uses: actions/setup-ruby@v1
|
||||
with:
|
||||
ruby-version: 2.6.x
|
||||
|
||||
- name: Install Bundler
|
||||
run: |
|
||||
gem install bundler
|
||||
|
||||
- name: Setup Bundle
|
||||
run: |
|
||||
bundle install --with docker --without opennebula ec2 windows vagrant
|
||||
|
||||
- name: Set up Python 3.7
|
||||
uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: 3.7
|
||||
|
||||
- name: Install Python Dependencies
|
||||
run: |
|
||||
pip install -U pip
|
||||
pip install -r tests/requirements.txt
|
||||
|
||||
- name: Create Test Container
|
||||
run: |
|
||||
bundle exec kitchen create py3-stable-3003-gentoo-systemd || bundle exec kitchen create py3-stable-3003-gentoo-systemd
|
||||
|
||||
- name: Test Bootstrap In Test Container
|
||||
run: |
|
||||
bundle exec kitchen verify py3-stable-3003-gentoo-systemd
|
||||
|
||||
- name: Destroy Test Container
|
||||
if: always()
|
||||
run: |
|
||||
bundle exec kitchen destroy py3-stable-3003-gentoo-systemd
|
||||
|
||||
|
||||
py3-git-3003-gentoo-systemd:
|
||||
name: Gentoo (systemd) v3003 Py3 Git
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 90
|
||||
|
||||
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Setup Ruby
|
||||
uses: actions/setup-ruby@v1
|
||||
with:
|
||||
ruby-version: 2.6.x
|
||||
|
||||
- name: Install Bundler
|
||||
run: |
|
||||
gem install bundler
|
||||
|
||||
- name: Setup Bundle
|
||||
run: |
|
||||
bundle install --with docker --without opennebula ec2 windows vagrant
|
||||
|
||||
- name: Set up Python 3.7
|
||||
uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: 3.7
|
||||
|
||||
- name: Install Python Dependencies
|
||||
run: |
|
||||
pip install -U pip
|
||||
pip install -r tests/requirements.txt
|
||||
|
||||
- name: Create Test Container
|
||||
run: |
|
||||
bundle exec kitchen create py3-git-3003-gentoo-systemd || bundle exec kitchen create py3-git-3003-gentoo-systemd
|
||||
|
||||
- name: Test Bootstrap In Test Container
|
||||
run: |
|
||||
bundle exec kitchen verify py3-git-3003-gentoo-systemd
|
||||
|
||||
- name: Destroy Test Container
|
||||
if: always()
|
||||
run: |
|
||||
bundle exec kitchen destroy py3-git-3003-gentoo-systemd
|
||||
|
||||
|
||||
py3-stable-3004-gentoo-systemd:
|
||||
name: Gentoo (systemd) v3004 Py3 Stable
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 90
|
||||
|
||||
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Setup Ruby
|
||||
uses: actions/setup-ruby@v1
|
||||
with:
|
||||
ruby-version: 2.6.x
|
||||
|
||||
- name: Install Bundler
|
||||
run: |
|
||||
gem install bundler
|
||||
|
||||
- name: Setup Bundle
|
||||
run: |
|
||||
bundle install --with docker --without opennebula ec2 windows vagrant
|
||||
|
||||
- name: Set up Python 3.7
|
||||
uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: 3.7
|
||||
|
||||
- name: Install Python Dependencies
|
||||
run: |
|
||||
pip install -U pip
|
||||
pip install -r tests/requirements.txt
|
||||
|
||||
- name: Create Test Container
|
||||
run: |
|
||||
bundle exec kitchen create py3-stable-3004-gentoo-systemd || bundle exec kitchen create py3-stable-3004-gentoo-systemd
|
||||
|
||||
- name: Test Bootstrap In Test Container
|
||||
run: |
|
||||
bundle exec kitchen verify py3-stable-3004-gentoo-systemd
|
||||
|
||||
- name: Destroy Test Container
|
||||
if: always()
|
||||
run: |
|
||||
bundle exec kitchen destroy py3-stable-3004-gentoo-systemd
|
||||
|
||||
|
||||
py3-git-3004-gentoo-systemd:
|
||||
name: Gentoo (systemd) v3004 Py3 Git
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 90
|
||||
|
||||
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Setup Ruby
|
||||
uses: actions/setup-ruby@v1
|
||||
with:
|
||||
ruby-version: 2.6.x
|
||||
|
||||
- name: Install Bundler
|
||||
run: |
|
||||
gem install bundler
|
||||
|
||||
- name: Setup Bundle
|
||||
run: |
|
||||
bundle install --with docker --without opennebula ec2 windows vagrant
|
||||
|
||||
- name: Set up Python 3.7
|
||||
uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: 3.7
|
||||
|
||||
- name: Install Python Dependencies
|
||||
run: |
|
||||
pip install -U pip
|
||||
pip install -r tests/requirements.txt
|
||||
|
||||
- name: Create Test Container
|
||||
run: |
|
||||
bundle exec kitchen create py3-git-3004-gentoo-systemd || bundle exec kitchen create py3-git-3004-gentoo-systemd
|
||||
|
||||
- name: Test Bootstrap In Test Container
|
||||
run: |
|
||||
bundle exec kitchen verify py3-git-3004-gentoo-systemd
|
||||
|
||||
- name: Destroy Test Container
|
||||
if: always()
|
||||
run: |
|
||||
bundle exec kitchen destroy py3-git-3004-gentoo-systemd
|
||||
|
||||
|
||||
py3-git-master-gentoo-systemd:
|
||||
name: Gentoo (systemd) Master Py3 Git
|
||||
runs-on: ubuntu-latest
|
||||
|
|
2877
.github/workflows/main.yml
vendored
2877
.github/workflows/main.yml
vendored
File diff suppressed because it is too large
Load diff
150
.github/workflows/templates/generate.py
vendored
150
.github/workflows/templates/generate.py
vendored
|
@ -16,6 +16,7 @@ LINUX_DISTROS = [
|
|||
"debian-9",
|
||||
"fedora-34",
|
||||
"fedora-35",
|
||||
"fedora-36",
|
||||
"gentoo",
|
||||
"gentoo-systemd",
|
||||
"opensuse-15",
|
||||
|
@ -23,16 +24,17 @@ LINUX_DISTROS = [
|
|||
"oraclelinux-7",
|
||||
"oraclelinux-8",
|
||||
"rockylinux-8",
|
||||
"ubuntu-1604",
|
||||
"ubuntu-1804",
|
||||
"ubuntu-2004",
|
||||
"ubuntu-2110",
|
||||
"ubuntu-2204",
|
||||
]
|
||||
OSX = WINDOWS = []
|
||||
|
||||
STABLE_DISTROS = [
|
||||
"almalinux-8",
|
||||
"amazon-2",
|
||||
"arch",
|
||||
"centos-7",
|
||||
"centos-stream8",
|
||||
"debian-10",
|
||||
|
@ -40,81 +42,128 @@ STABLE_DISTROS = [
|
|||
"debian-9",
|
||||
"fedora-34",
|
||||
"fedora-35",
|
||||
"fedora-36",
|
||||
"gentoo",
|
||||
"gentoo-systemd",
|
||||
"opensuse-15",
|
||||
"opensuse-tumbleweed",
|
||||
"oraclelinux-7",
|
||||
"oraclelinux-8",
|
||||
"rockylinux-8",
|
||||
"ubuntu-1604",
|
||||
"ubuntu-1804",
|
||||
"ubuntu-2004",
|
||||
"ubuntu-2110",
|
||||
"ubuntu-2204",
|
||||
]
|
||||
|
||||
BLACKLIST_3002 = [
|
||||
"almalinux-8",
|
||||
"centos-stream8",
|
||||
"rockylinux-8",
|
||||
"debian-11",
|
||||
]
|
||||
|
||||
BLACKLIST_3002_0 = [
|
||||
"almalinux-8",
|
||||
"amazon-2",
|
||||
"arch",
|
||||
"centos-stream8",
|
||||
"debian-11",
|
||||
"fedora-34",
|
||||
"fedora-35",
|
||||
"fedora-36",
|
||||
"gentoo",
|
||||
"gentoo-systemd",
|
||||
"opensuse-15",
|
||||
"opensuse-tumbleweed",
|
||||
"rockylinux-8",
|
||||
"ubuntu-2204",
|
||||
]
|
||||
|
||||
BLACKLIST_GIT_3002 = [
|
||||
"almalinux-8",
|
||||
"amazon-2",
|
||||
"arch",
|
||||
"centos-stream8",
|
||||
"debian-10",
|
||||
"debian-11",
|
||||
"fedora-34",
|
||||
"fedora-35",
|
||||
"fedora-36",
|
||||
"gentoo",
|
||||
"gentoo-systemd",
|
||||
"opensuse-15",
|
||||
"opensuse-tumbleweed",
|
||||
"rockylinux-8",
|
||||
"ubuntu-2004",
|
||||
"ubuntu-2110",
|
||||
"ubuntu-2204",
|
||||
]
|
||||
|
||||
BLACKLIST_3003 = [
|
||||
"rockylinux-8",
|
||||
"ubuntu-1604",
|
||||
"arch",
|
||||
"debian-11",
|
||||
]
|
||||
|
||||
BLACKLIST_3003_0 = [
|
||||
"amazon-2",
|
||||
"fedora-34",
|
||||
"fedora-35",
|
||||
"fedora-36",
|
||||
"gentoo",
|
||||
"gentoo-systemd",
|
||||
"opensuse-15",
|
||||
"opensuse-tumbleweed",
|
||||
"rockylinux-8",
|
||||
"ubuntu-1604",
|
||||
"debian-11"
|
||||
"ubuntu-2204",
|
||||
]
|
||||
|
||||
BLACKLIST_GIT_3003 = [
|
||||
"amazon-2",
|
||||
"arch",
|
||||
"debian-10",
|
||||
"debian-11",
|
||||
"fedora-34",
|
||||
"fedora-35",
|
||||
"fedora-36",
|
||||
"gentoo",
|
||||
"gentoo-systemd",
|
||||
"opensuse-15",
|
||||
"opensuse-tumbleweed",
|
||||
"rockylinux-8",
|
||||
"ubuntu-2004",
|
||||
"ubuntu-2110",
|
||||
"ubuntu-2204",
|
||||
]
|
||||
|
||||
BLACKLIST_3004 = [
|
||||
"ubuntu-1604",
|
||||
"arch",
|
||||
]
|
||||
|
||||
BLACKLIST_3004_0 = [
|
||||
"amazon-2",
|
||||
"fedora-34",
|
||||
"fedora-35",
|
||||
"fedora-36",
|
||||
"gentoo",
|
||||
"gentoo-systemd",
|
||||
"ubuntu-1604",
|
||||
"opensuse-15",
|
||||
"opensuse-tumbleweed",
|
||||
]
|
||||
|
||||
BLACKLIST_GIT_3004 = [
|
||||
"amazon-2",
|
||||
"arch",
|
||||
"debian-10",
|
||||
"debian-11",
|
||||
"fedora-34",
|
||||
"fedora-35",
|
||||
"fedora-36",
|
||||
"gentoo",
|
||||
"gentoo-systemd",
|
||||
"opensuse-15",
|
||||
"opensuse-tumbleweed",
|
||||
"ubuntu-2004",
|
||||
"ubuntu-2110",
|
||||
"ubuntu-2204",
|
||||
]
|
||||
|
||||
SALT_BRANCHES = [
|
||||
"3002",
|
||||
"3002-0",
|
||||
"3003",
|
||||
"3003-0",
|
||||
"3004",
|
||||
"3004-0",
|
||||
"master",
|
||||
"latest",
|
||||
]
|
||||
|
||||
BRANCH_DISPLAY_NAMES = {
|
||||
"3002": "v3002",
|
||||
"3002-0": "v3002.0",
|
||||
"3003": "v3003",
|
||||
"3003-0": "v3003.0",
|
||||
"3004": "v3004",
|
||||
"3004-0": "v3004.0",
|
||||
"master": "Master",
|
||||
"latest": "Latest",
|
||||
}
|
||||
|
@ -134,6 +183,7 @@ DISTRO_DISPLAY_NAMES = {
|
|||
"debian-9": "Debian 9",
|
||||
"fedora-34": "Fedora 34",
|
||||
"fedora-35": "Fedora 35",
|
||||
"fedora-36": "Fedora 36",
|
||||
"gentoo": "Gentoo",
|
||||
"gentoo-systemd": "Gentoo (systemd)",
|
||||
"opensuse-15": "Opensuse 15",
|
||||
|
@ -141,10 +191,10 @@ DISTRO_DISPLAY_NAMES = {
|
|||
"oraclelinux-7": "Oracle Linux 7",
|
||||
"oraclelinux-8": "Oracle Linux 8",
|
||||
"rockylinux-8": "Rocky Linux 8",
|
||||
"ubuntu-1604": "Ubuntu 16.04",
|
||||
"ubuntu-1804": "Ubuntu 18.04",
|
||||
"ubuntu-2004": "Ubuntu 20.04",
|
||||
"ubuntu-2110": "Ubuntu 21.10",
|
||||
"ubuntu-2204": "Ubuntu 22.04",
|
||||
}
|
||||
|
||||
TIMEOUT_DEFAULT = 20
|
||||
|
@ -223,28 +273,28 @@ def generate_test_jobs():
|
|||
# Fedora does not keep old builds around
|
||||
continue
|
||||
|
||||
BLACKLIST = {
|
||||
"3002": BLACKLIST_3002,
|
||||
"3003": BLACKLIST_3003,
|
||||
"3004": BLACKLIST_3004,
|
||||
}
|
||||
if bootstrap_type == "git":
|
||||
BLACKLIST = {
|
||||
"3002": BLACKLIST_GIT_3002,
|
||||
"3003": BLACKLIST_GIT_3003,
|
||||
"3004": BLACKLIST_GIT_3004,
|
||||
}
|
||||
|
||||
# .0 versions are a virtual version for pinning to the first point release of a major release, such as 3002, there is no git version.
|
||||
if branch.endswith("-0"):
|
||||
continue
|
||||
|
||||
if branch == "3002" and distro in BLACKLIST_3002:
|
||||
if (
|
||||
branch in ("3002", "3003", "3004")
|
||||
and distro in BLACKLIST[branch]
|
||||
):
|
||||
continue
|
||||
|
||||
if branch == "3002-0" and distro in BLACKLIST_3002_0:
|
||||
continue
|
||||
|
||||
if branch == "3003" and distro in BLACKLIST_3003:
|
||||
continue
|
||||
|
||||
if branch == "3003-0" and distro in BLACKLIST_3003_0:
|
||||
continue
|
||||
|
||||
if branch == "3004" and distro in BLACKLIST_3004:
|
||||
continue
|
||||
|
||||
if branch == "3004-0" and distro in BLACKLIST_3004_0:
|
||||
continue
|
||||
if distro in LINUX_DISTROS:
|
||||
template = "linux.yml"
|
||||
elif distro in OSX:
|
||||
|
@ -289,7 +339,9 @@ def generate_test_jobs():
|
|||
rfh.read()
|
||||
.format(
|
||||
jobs="{pre_commit}{lint}{test}".format(
|
||||
lint=lint_job, test=test_jobs, pre_commit=pre_commit_job,
|
||||
lint=lint_job,
|
||||
test=test_jobs,
|
||||
pre_commit=pre_commit_job,
|
||||
),
|
||||
on="push, pull_request",
|
||||
name="Testing",
|
||||
|
@ -304,7 +356,9 @@ def generate_test_jobs():
|
|||
"{}\n".format(
|
||||
rfh.read()
|
||||
.format(
|
||||
jobs="{test}".format(test=branch_only_test_jobs,),
|
||||
jobs="{test}".format(
|
||||
test=branch_only_test_jobs,
|
||||
),
|
||||
on="push",
|
||||
name="Branch Testing",
|
||||
)
|
||||
|
|
5
.github/workflows/templates/main.yml
vendored
5
.github/workflows/templates/main.yml
vendored
|
@ -1,10 +1,13 @@
|
|||
# DO NOT EDIT THIS FILE DIRECTLY!
|
||||
#
|
||||
# This file was generated by .github/workflows/templates/generate.py
|
||||
#
|
||||
# yamllint disable rule:line-length rule:empty-lines
|
||||
---
|
||||
|
||||
name: {name}
|
||||
|
||||
on: [{on}]
|
||||
'on': [{on}]
|
||||
|
||||
jobs:
|
||||
{jobs}
|
||||
|
|
|
@ -12,7 +12,7 @@ repos:
|
|||
- id: end-of-file-fixer # Makes sure files end in a newline and only a newline.
|
||||
|
||||
- repo: https://github.com/psf/black
|
||||
rev: 19.10b0
|
||||
rev: 22.3.0
|
||||
hooks:
|
||||
- id: black
|
||||
|
||||
|
|
|
@ -32,6 +32,8 @@ sum** of the downloaded ``bootstrap-salt.sh`` file.
|
|||
|
||||
The SHA256 sum of the ``bootstrap-salt.sh`` file, per release, is:
|
||||
|
||||
=======
|
||||
- 2022.03.15: ``8f65952c3435f441e7f793941d5162d3ec2033a9ef82722ff1da67a2ef860a2f``
|
||||
- 2021.09.17: ``090d652cd6290debce0e3a4eded65086a4272e69446e711eb26f87160593b6a2``
|
||||
- 2021.09.14: ``30fdcba972f449630b4f13492cb5525e69e08fa2cdb66a6dc78f1536ad279e52``
|
||||
- 2021.08.19: ``ee40a9d8d057cce88a288fc1cb94b1d31408a61d262db6f77b34ad63d66f0806``
|
||||
|
|
10
RELEASE.md
10
RELEASE.md
|
@ -4,12 +4,12 @@
|
|||
- Go through the changes since last release, add them to changelog.
|
||||
- Add any new authors to the AUTHORS file.
|
||||
- If there's a new Salt release(major), update the script to add support for it.
|
||||
- Bump version for release
|
||||
- Bump version for release.
|
||||
- Open PR against develop with these changes.
|
||||
- Once the above PR is merged, open a PR against stable with the changes from develop
|
||||
- Once the above PR is merged, wait until an automatic PR is opened against develop which updates the checksums.
|
||||
- Once the above PR is merged, open a PR against stable with the changes from develop.
|
||||
- Once the above PR is merged, wait until an automatic PR is opened against stable which updates the checksums.
|
||||
- Once the above PR is merged, tag the release `v{version-here}` and push the tag.
|
||||
- Wait until an automatic PR is opened against the develop branch updating the release informtion. Merge it.
|
||||
- Check that an automated PR was opened against the salt repo updating the bootstrap script.
|
||||
- Wait until an automatic PR is opened against the develop branch updating the checksums in `README.rst`. Merge it.
|
||||
- Check that an automated PR was opened against the salt repo updating the bootstrap script, located in `salt/cloud/deploy/bootstrap-salt.sh`
|
||||
|
||||
- Victory!
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<#
|
||||
.SYNOPSIS
|
||||
A simple Powershell script to download and install a salt minion on windows.
|
||||
A simple Powershell script to download and install a Salt minion on Windows.
|
||||
|
||||
.DESCRIPTION
|
||||
The script will download the official salt package from saltstack. It will
|
||||
The script will download the official Salt package from SaltProject. It will
|
||||
install a specific package version and accept parameters for the master and
|
||||
minion ids. Finally, it can stop and set the windows service to "manual" for
|
||||
minion ids. Finally, it can stop and set the Windows service to "manual" for
|
||||
local testing.
|
||||
|
||||
.EXAMPLE
|
||||
|
@ -18,8 +18,9 @@
|
|||
|
||||
.EXAMPLE
|
||||
./bootstrap-salt.ps1 -pythonVersion 3
|
||||
Specifies the Python version of the installer. Can be "2" or "3". Defaults to "2".
|
||||
Python 3 installers are only available for Salt 2017.7.0 and newer.
|
||||
Specifies the Python version of the installer. Can be "2" or "3". Defaults
|
||||
to "2". Python 3 installers are only available for Salt 2017.7.0 and newer.
|
||||
Starting with Python 3002 only Python 3 installers are available.
|
||||
|
||||
.EXAMPLE
|
||||
./bootstrap-salt.ps1 -runservice false
|
||||
|
@ -71,36 +72,36 @@
|
|||
#>
|
||||
|
||||
#===============================================================================
|
||||
# Commandlet Binding
|
||||
# Bind Parameters
|
||||
#===============================================================================
|
||||
[CmdletBinding()]
|
||||
Param(
|
||||
[Parameter(Mandatory=$false,ValueFromPipeline=$true)]
|
||||
param(
|
||||
[Parameter(Mandatory=$false, ValueFromPipeline=$True)]
|
||||
# Doesn't support versions prior to "YYYY.M.R-B"
|
||||
# Supports new version and latest
|
||||
# Option 1 means case insensitive
|
||||
[ValidatePattern('^(\d{4}(\.\d{1,2}){0,2}(\-\d{1})?)|(latest)$', Options=1)]
|
||||
[string]$version = '',
|
||||
[string]$Version = '',
|
||||
|
||||
[Parameter(Mandatory=$false,ValueFromPipeline=$true)]
|
||||
[Parameter(Mandatory=$false, ValueFromPipeline=$True)]
|
||||
# Doesn't support Python versions prior to "2017.7.0"
|
||||
[ValidateSet("2","3")]
|
||||
[string]$pythonVersion = "3",
|
||||
[string]$PythonVersion = "3",
|
||||
|
||||
[Parameter(Mandatory=$false,ValueFromPipeline=$true)]
|
||||
[Parameter(Mandatory=$false, ValueFromPipeline=$True)]
|
||||
[ValidateSet("true","false")]
|
||||
[string]$runservice = "true",
|
||||
[string]$RunService = "true",
|
||||
|
||||
[Parameter(Mandatory=$false,ValueFromPipeline=$true)]
|
||||
[string]$minion = "not-specified",
|
||||
[Parameter(Mandatory=$false, ValueFromPipeline=$True)]
|
||||
[string]$Minion = "not-specified",
|
||||
|
||||
[Parameter(Mandatory=$false,ValueFromPipeline=$true)]
|
||||
[string]$master = "not-specified",
|
||||
[Parameter(Mandatory=$false, ValueFromPipeline=$True)]
|
||||
[string]$Master = "not-specified",
|
||||
|
||||
[Parameter(Mandatory=$false,ValueFromPipeline=$true)]
|
||||
[string]$repourl= "https://repo.saltproject.io/windows",
|
||||
[Parameter(Mandatory=$false, ValueFromPipeline=$True)]
|
||||
[string]$RepoUrl= "https://repo.saltproject.io/windows",
|
||||
|
||||
[Parameter(Mandatory=$false,ValueFromPipeline=$true)]
|
||||
[Parameter(Mandatory=$false, ValueFromPipeline=$True)]
|
||||
[switch]$ConfigureOnly
|
||||
)
|
||||
|
||||
|
@ -125,8 +126,8 @@ function Get-IsUacEnabled
|
|||
#===============================================================================
|
||||
# Check for Elevated Privileges
|
||||
#===============================================================================
|
||||
If (!(Get-IsAdministrator)) {
|
||||
If (Get-IsUacEnabled) {
|
||||
if (!(Get-IsAdministrator)) {
|
||||
if (Get-IsUacEnabled) {
|
||||
# We are not running "as Administrator" - so relaunch as administrator
|
||||
# Create a new process object that starts PowerShell
|
||||
$newProcess = new-object System.Diagnostics.ProcessStartInfo "PowerShell";
|
||||
|
@ -149,10 +150,10 @@ If (!(Get-IsAdministrator)) {
|
|||
[System.Diagnostics.Process]::Start($newProcess);
|
||||
|
||||
# Exit from the current, unelevated, process
|
||||
Exit
|
||||
exit
|
||||
}
|
||||
Else {
|
||||
Throw "You must be administrator to run this script"
|
||||
else {
|
||||
throw "You must be administrator to run this script"
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -166,15 +167,15 @@ Write-Verbose "master: $master"
|
|||
Write-Verbose "minion: $minion"
|
||||
Write-Verbose "repourl: $repourl"
|
||||
|
||||
If ($runservice.ToLower() -eq "true") {
|
||||
if ($runservice.ToLower() -eq "true") {
|
||||
Write-Verbose "Windows service will be set to run"
|
||||
[bool]$runservice = $True
|
||||
}
|
||||
ElseIf ($runservice.ToLower() -eq "false") {
|
||||
elseif ($runservice.ToLower() -eq "false") {
|
||||
Write-Verbose "Windows service will be stopped and set to manual"
|
||||
[bool]$runservice = $False
|
||||
}
|
||||
Else {
|
||||
else {
|
||||
# Param passed in wasn't clear so defaulting to true.
|
||||
Write-Verbose "Windows service defaulting to run automatically"
|
||||
[bool]$runservice = $True
|
||||
|
@ -186,22 +187,28 @@ Else {
|
|||
|
||||
$ConfiguredAnything = $False
|
||||
|
||||
$RootDir = "C:\salt"
|
||||
$SaltRegKey = "HKLM:\SOFTWARE\Salt Project\Salt"
|
||||
$RootDir = If ((Get-ItemProperty $SaltRegKey).root_dir -ne $null) {
|
||||
(Get-ItemProperty $SaltRegKey).root_dir
|
||||
} Else {
|
||||
"C:\salt"
|
||||
if (Test-Path -Path $SaltRegKey) {
|
||||
if ($null -ne (Get-ItemProperty $SaltRegKey).root_dir) {
|
||||
$RootDir = (Get-ItemProperty $SaltRegKey).root_dir
|
||||
}
|
||||
}
|
||||
|
||||
$ConfDir = "$RootDir\conf"
|
||||
$PkiDir = "$ConfDir\pki\minion"
|
||||
Write-Verbose "ConfDir: $ConfDir"
|
||||
|
||||
# Create C:\tmp\
|
||||
New-Item C:\tmp\ -ItemType directory -Force | Out-Null
|
||||
|
||||
# Copy Vagrant Files to their proper location. Vagrant files will be placed
|
||||
# in C:\tmp
|
||||
#===============================================================================
|
||||
# Copy Vagrant Files to their proper location.
|
||||
#===============================================================================
|
||||
|
||||
# Vagrant files will be placed in C:\tmp
|
||||
# Check if minion keys have been uploaded, copy to correct location
|
||||
If (Test-Path C:\tmp\minion.pem) {
|
||||
if (Test-Path C:\tmp\minion.pem) {
|
||||
New-Item $PkiDir -ItemType Directory -Force | Out-Null
|
||||
Copy-Item -Path C:\tmp\minion.pem -Destination $PkiDir -Force | Out-Null
|
||||
Copy-Item -Path C:\tmp\minion.pub -Destination $PkiDir -Force | Out-Null
|
||||
|
@ -211,20 +218,20 @@ If (Test-Path C:\tmp\minion.pem) {
|
|||
# Check if minion config has been uploaded
|
||||
# This should be done before the installer is run so that it can be updated with
|
||||
# id: and master: settings when the installer runs
|
||||
If (Test-Path C:\tmp\minion) {
|
||||
if (Test-Path C:\tmp\minion) {
|
||||
New-Item $ConfDir -ItemType Directory -Force | Out-Null
|
||||
Copy-Item -Path C:\tmp\minion -Destination $ConfDir -Force | Out-Null
|
||||
$ConfiguredAnything = $True
|
||||
}
|
||||
|
||||
# Check if grains config has been uploaded
|
||||
If (Test-Path C:\tmp\grains) {
|
||||
if (Test-Path C:\tmp\grains) {
|
||||
New-Item $ConfDir -ItemType Directory -Force | Out-Null
|
||||
Copy-Item -Path C:\tmp\grains -Destination $ConfDir -Force | Out-Null
|
||||
$ConfiguredAnything = $True
|
||||
}
|
||||
|
||||
If ($ConfigureOnly -and !$ConfiguredAnything) {
|
||||
if ($ConfigureOnly -and !$ConfiguredAnything) {
|
||||
Write-Output "No configuration or keys were copied over. No configuration was done!"
|
||||
exit 0
|
||||
}
|
||||
|
@ -232,31 +239,30 @@ If ($ConfigureOnly -and !$ConfiguredAnything) {
|
|||
#===============================================================================
|
||||
# Detect architecture
|
||||
#===============================================================================
|
||||
If ([IntPtr]::Size -eq 4) {
|
||||
if ([IntPtr]::Size -eq 4) {
|
||||
$arch = "x86"
|
||||
}
|
||||
Else {
|
||||
} else {
|
||||
$arch = "AMD64"
|
||||
}
|
||||
|
||||
#===============================================================================
|
||||
# Use version "Latest" if no version is passed
|
||||
#===============================================================================
|
||||
If ((!$version) -or ($version.ToLower() -eq 'latest')){
|
||||
$versionSection = "Latest-Py$pythonVersion"
|
||||
if ((!$version) -or ($version.ToLower() -eq 'latest')){
|
||||
$versionSection = "Latest-Py$PythonVersion"
|
||||
} else {
|
||||
$versionSection = $version
|
||||
$year = $version.Substring(0, 4)
|
||||
If ([int]$year -ge 2017) {
|
||||
If ($pythonVersion -eq "3") {
|
||||
if ([int]$year -ge 2017) {
|
||||
if ($PythonVersion -eq "3") {
|
||||
$versionSection = "$version-Py3"
|
||||
} Else {
|
||||
} else {
|
||||
$versionSection = "$version-Py2"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
If (!$ConfigureOnly) {
|
||||
if (!$ConfigureOnly) {
|
||||
#===============================================================================
|
||||
# Download minion setup file
|
||||
#===============================================================================
|
||||
|
@ -275,9 +281,9 @@ If (!$ConfigureOnly) {
|
|||
# - master: salt
|
||||
# - Start the service
|
||||
$parameters = ""
|
||||
If($minion -ne "not-specified") {$parameters = "/minion-name=$minion"}
|
||||
If($master -ne "not-specified") {$parameters = "$parameters /master=$master"}
|
||||
If($runservice -eq $false) {$parameters = "$parameters /start-service=0"}
|
||||
if($minion -ne "not-specified") {$parameters = "/minion-name=$minion"}
|
||||
if($master -ne "not-specified") {$parameters = "$parameters /master=$master"}
|
||||
if($runservice -eq $false) {$parameters = "$parameters /start-service=0"}
|
||||
|
||||
#===============================================================================
|
||||
# Install minion silently
|
||||
|
@ -291,12 +297,12 @@ If (!$ConfigureOnly) {
|
|||
#===============================================================================
|
||||
# Wait for salt-minion service to be registered before trying to start it
|
||||
$service = Get-Service salt-minion -ErrorAction SilentlyContinue
|
||||
While (!$service) {
|
||||
while (!$service) {
|
||||
Start-Sleep -s 2
|
||||
$service = Get-Service salt-minion -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
If($runservice) {
|
||||
if($runservice) {
|
||||
# Start service
|
||||
Write-Output "Starting the Salt minion service"
|
||||
Start-Service -Name "salt-minion" -ErrorAction SilentlyContinue
|
||||
|
@ -304,7 +310,7 @@ If (!$ConfigureOnly) {
|
|||
# Check if service is started, otherwise retry starting the
|
||||
# service 4 times.
|
||||
$try = 0
|
||||
While (($service.Status -ne "Running") -and ($try -ne 4)) {
|
||||
while (($service.Status -ne "Running") -and ($try -ne 4)) {
|
||||
Start-Service -Name "salt-minion" -ErrorAction SilentlyContinue
|
||||
$service = Get-Service salt-minion -ErrorAction SilentlyContinue
|
||||
Start-Sleep -s 2
|
||||
|
@ -313,12 +319,12 @@ If (!$ConfigureOnly) {
|
|||
|
||||
# If the salt-minion service is still not running, something probably
|
||||
# went wrong and user intervention is required - report failure.
|
||||
If ($service.Status -eq "Stopped") {
|
||||
if ($service.Status -eq "Stopped") {
|
||||
Write-Output -NoNewline "Failed to start salt minion"
|
||||
exit 1
|
||||
}
|
||||
}
|
||||
Else {
|
||||
else {
|
||||
Write-Output -NoNewline "Stopping salt minion and setting it to 'Manual'"
|
||||
Set-Service "salt-minion" -StartupType "Manual"
|
||||
Stop-Service "salt-minion"
|
||||
|
@ -328,9 +334,9 @@ If (!$ConfigureOnly) {
|
|||
#===============================================================================
|
||||
# Script Complete
|
||||
#===============================================================================
|
||||
If ($ConfigureOnly) {
|
||||
if ($ConfigureOnly) {
|
||||
Write-Output "Salt minion successfully configured"
|
||||
}
|
||||
Else {
|
||||
else {
|
||||
Write-Output "Salt minion successfully installed"
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#======================================================================================================================
|
||||
set -o nounset # Treat unset variables as an error
|
||||
|
||||
__ScriptVersion="2022.03.15"
|
||||
__ScriptVersion="2022.05.19"
|
||||
__ScriptName="bootstrap-salt.sh"
|
||||
|
||||
__ScriptFullName="$0"
|
||||
|
@ -572,7 +572,7 @@ fi
|
|||
echoinfo "Running version: ${__ScriptVersion}"
|
||||
echoinfo "Executed by: ${CALLER}"
|
||||
echoinfo "Command line: '${__ScriptFullName} ${__ScriptArgs}'"
|
||||
#echowarn "Running the unstable version of ${__ScriptName}"
|
||||
echowarn "Running the unstable version of ${__ScriptName}"
|
||||
|
||||
# Define installation type
|
||||
if [ "$#" -gt 0 ];then
|
||||
|
@ -1466,6 +1466,9 @@ __ubuntu_codename_translation() {
|
|||
"21")
|
||||
DISTRO_CODENAME="hirsute"
|
||||
;;
|
||||
"22")
|
||||
DISTRO_CODENAME="jammy"
|
||||
;;
|
||||
*)
|
||||
DISTRO_CODENAME="trusty"
|
||||
;;
|
||||
|
@ -1492,6 +1495,7 @@ __debian_derivatives_translation() {
|
|||
devuan_1_debian_base="8.0"
|
||||
devuan_2_debian_base="9.0"
|
||||
kali_1_debian_base="7.0"
|
||||
kali_2021_debian_base="10.0"
|
||||
linuxmint_1_debian_base="8.0"
|
||||
raspbian_8_debian_base="8.0"
|
||||
raspbian_9_debian_base="9.0"
|
||||
|
@ -2925,7 +2929,8 @@ __enable_universe_repository() {
|
|||
__install_saltstack_ubuntu_repository() {
|
||||
# Workaround for latest non-LTS Ubuntu
|
||||
if { [ "$DISTRO_MAJOR_VERSION" -eq 20 ] && [ "$DISTRO_MINOR_VERSION" -eq 10 ]; } || \
|
||||
[ "$DISTRO_MAJOR_VERSION" -eq 21 ]; then
|
||||
# remove 22 version when salt packages for 22.04 are available
|
||||
[ "$DISTRO_MAJOR_VERSION" -eq 21 ] || [ "$DISTRO_MAJOR_VERSION" -eq 22 ]; then
|
||||
echowarn "Non-LTS Ubuntu detected, but stable packages requested. Trying packages for previous LTS release. You may experience problems."
|
||||
UBUNTU_VERSION=20.04
|
||||
UBUNTU_CODENAME="focal"
|
||||
|
@ -3039,7 +3044,7 @@ install_ubuntu_stable_deps() {
|
|||
|
||||
if [ "${_UPGRADE_SYS}" -eq $BS_TRUE ]; then
|
||||
if [ "${_INSECURE_DL}" -eq $BS_TRUE ]; then
|
||||
if [ "$DISTRO_MAJOR_VERSION" -ge 20 ] || [ "$DISTRO_MAJOR_VERSION" -ge 21 ]; then
|
||||
if [ "$DISTRO_MAJOR_VERSION" -ge 20 ] || [ "$DISTRO_MAJOR_VERSION" -ge 21 ] || [ "$DISTRO_MAJOR_VERSION" -ge 22 ]; then
|
||||
__apt_get_install_noinput --allow-unauthenticated debian-archive-keyring && apt-get update || return 1
|
||||
else
|
||||
__apt_get_install_noinput --allow-unauthenticated debian-archive-keyring &&
|
||||
|
@ -3120,6 +3125,9 @@ install_ubuntu_git_deps() {
|
|||
fi
|
||||
else
|
||||
__PACKAGES="python${PY_PKG_VER}-dev python${PY_PKG_VER}-pip python${PY_PKG_VER}-setuptools gcc"
|
||||
if [ "$DISTRO_MAJOR_VERSION" -ge 22 ]; then
|
||||
__PACKAGES="${__PACKAGES} g++"
|
||||
fi
|
||||
# shellcheck disable=SC2086
|
||||
__apt_get_install_noinput ${__PACKAGES} || return 1
|
||||
fi
|
||||
|
@ -3768,6 +3776,13 @@ install_debian_git_post() {
|
|||
done
|
||||
}
|
||||
|
||||
install_debian_2021_post() {
|
||||
# Kali 2021 (debian derivative) disables all network services by default
|
||||
# Using archlinux post function to enable salt systemd services
|
||||
install_arch_linux_post || return 1
|
||||
return 0
|
||||
}
|
||||
|
||||
install_debian_restart_daemons() {
|
||||
[ "$_START_DAEMONS" -eq $BS_FALSE ] && return 0
|
||||
|
||||
|
@ -3983,6 +3998,9 @@ install_fedora_git_deps() {
|
|||
done
|
||||
else
|
||||
__PACKAGES="python${PY_PKG_VER}-devel python${PY_PKG_VER}-pip python${PY_PKG_VER}-setuptools gcc"
|
||||
if [ "${DISTRO_VERSION}" -ge 35 ]; then
|
||||
__PACKAGES="${__PACKAGES} gcc-c++"
|
||||
fi
|
||||
# shellcheck disable=SC2086
|
||||
__dnf_install_noinput ${__PACKAGES} || return 1
|
||||
fi
|
||||
|
@ -4028,6 +4046,11 @@ install_fedora_git_post() {
|
|||
|
||||
__copyfile "${_SALT_GIT_CHECKOUT_DIR}/pkg/rpm/salt-${fname}.service" "/lib/systemd/system/salt-${fname}.service"
|
||||
|
||||
# Salt executables are located under `/usr/local/bin/` on Fedora 36+
|
||||
if [ "${DISTRO_VERSION}" -ge 36 ]; then
|
||||
sed -i -e 's:/usr/bin/:/usr/local/bin/:g' /lib/systemd/system/salt-*.service
|
||||
fi
|
||||
|
||||
# Skip salt-api since the service should be opt-in and not necessarily started on boot
|
||||
[ $fname = "api" ] && continue
|
||||
|
||||
|
@ -6140,7 +6163,7 @@ install_openbsd_git_deps() {
|
|||
__git_clone_and_checkout || return 1
|
||||
|
||||
if [ "${_POST_NEON_INSTALL}" -eq $BS_TRUE ]; then
|
||||
pkg_add -I -v py-pip py-setuptools
|
||||
pkg_add -I -v py3-pip py3-setuptools
|
||||
fi
|
||||
|
||||
#
|
||||
|
|
36
kitchen.macos.yml
Normal file
36
kitchen.macos.yml
Normal file
|
@ -0,0 +1,36 @@
|
|||
---
|
||||
driver:
|
||||
name: exec
|
||||
|
||||
provisioner:
|
||||
sudo: true
|
||||
salt_bootstrap_options: -MP stable %s
|
||||
salt_call_command: /opt/salt/bin/salt-call
|
||||
init_environment: |
|
||||
echo 'auto_accept: true' > /tmp/auto-accept-keys.conf
|
||||
sudo mkdir -p /etc/salt/master.d
|
||||
sudo mv /tmp/auto-accept-keys.conf /etc/salt/master.d/auto-accept-keys.conf
|
||||
brew install coreutils
|
||||
sh -c 't=$(gshuf -i 1-15 -n 1); echo Sleeping $t seconds; sleep $t'
|
||||
|
||||
platforms:
|
||||
- name: macos-12
|
||||
- name: macos-11
|
||||
- name: macos-1015
|
||||
|
||||
suites:
|
||||
- name: py3-stable-3002
|
||||
provisioner:
|
||||
salt_version: 3002.8
|
||||
- name: py3-stable-3003
|
||||
provisioner:
|
||||
salt_version: 3003.4
|
||||
- name: py3-stable-3004
|
||||
provisioner:
|
||||
salt_version: 3004.1
|
||||
- name: latest
|
||||
provisioner:
|
||||
salt_version: latest
|
||||
|
||||
verifier:
|
||||
command: pytest --cache-clear -v -s -ra --log-cli-level=debug -k "not test_ping" tests/integration/
|
|
@ -9,8 +9,8 @@ driver:
|
|||
gui: false
|
||||
ssh:
|
||||
shell: /bin/sh
|
||||
<% unless ENV['CI'] %>
|
||||
linked_clone: true
|
||||
<% unless ENV['CI'] %>
|
||||
synced_folders:
|
||||
- - '.kitchen/kitchen-vagrant/%{instance_name}/vagrant'
|
||||
- '/vagrant'
|
||||
|
|
|
@ -19,13 +19,13 @@ platforms:
|
|||
suites:
|
||||
- name: py3-stable-3002
|
||||
provisioner:
|
||||
salt_version: 3002
|
||||
salt_version: 3002.8-1
|
||||
- name: py3-stable-3003
|
||||
provisioner:
|
||||
salt_version: 3003
|
||||
salt_version: 3003.4-1
|
||||
- name: py3-stable-3004
|
||||
provisioner:
|
||||
salt_version: 3004
|
||||
salt_version: 3004.1-1
|
||||
- name: latest
|
||||
provisioner:
|
||||
salt_version: latest
|
||||
|
|
11
kitchen.yml
11
kitchen.yml
|
@ -65,6 +65,9 @@ platforms:
|
|||
- name: fedora-35
|
||||
driver:
|
||||
provision_command: *fedora_provision_command
|
||||
- name: fedora-36
|
||||
driver:
|
||||
provision_command: *fedora_provision_command
|
||||
- name: gentoo
|
||||
driver:
|
||||
image: gentoo/stage3:latest
|
||||
|
@ -97,6 +100,11 @@ platforms:
|
|||
- name: oraclelinux-8
|
||||
- name: oraclelinux-7
|
||||
- name: rockylinux-8
|
||||
- name: ubuntu-22.04
|
||||
driver:
|
||||
run_command: /lib/systemd/systemd
|
||||
provision_command:
|
||||
- echo "PubkeyAcceptedAlgorithms +ssh-rsa" | tee -a /etc/ssh/sshd_config
|
||||
- name: ubuntu-21.10
|
||||
driver:
|
||||
run_command: /lib/systemd/systemd
|
||||
|
@ -106,9 +114,6 @@ platforms:
|
|||
- name: ubuntu-18.04
|
||||
driver:
|
||||
run_command: /lib/systemd/systemd
|
||||
- name: ubuntu-16.04
|
||||
driver_config:
|
||||
run_command: /lib/systemd/systemd
|
||||
|
||||
suites:
|
||||
- name: py3-git-3002
|
||||
|
|
|
@ -9,6 +9,11 @@ log = logging.getLogger(__name__)
|
|||
|
||||
@pytest.fixture(scope="session")
|
||||
def host():
|
||||
if os.environ.get("RUNNER_OS", "") == "macOS":
|
||||
# Adjust the `PATH` so that the `salt-call` executable can be found
|
||||
os.environ["PATH"] = "/opt/salt/bin{}{}".format(os.pathsep, os.environ["PATH"])
|
||||
return testinfra.get_host("local://", sudo=True)
|
||||
|
||||
if os.environ.get("KITCHEN_USERNAME") == "vagrant" or "windows" in os.environ.get(
|
||||
"KITCHEN_INSTANCE"
|
||||
):
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
testinfra
|
||||
pytest-testinfra
|
||||
paramiko
|
||||
pywinrm; sys.platform == 'win32'
|
||||
six>=1.10.0
|
||||
|
|
Loading…
Add table
Reference in a new issue