Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
252 changes: 126 additions & 126 deletions .github/workflows/test-molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ jobs:
]
fail-fast: false
concurrency: molecule-test-${{ matrix.tests.role }}-${{ matrix.tests.test }}
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v5
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v6
with:
python-version: "3.12"
- name: Install depencencies
Expand Down Expand Up @@ -71,11 +71,11 @@ jobs:
tests: [{ role: "update-changes", test: "246" }]
fail-fast: false
concurrency: molecule-test-${{ matrix.tests.role }}-${{ matrix.tests.test }}
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v5
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v6
with:
python-version: "3.12"
- name: Install depencencies
Expand Down Expand Up @@ -120,127 +120,127 @@ jobs:
HCLOUD_TOKEN: ${{ secrets.HCLOUD_TOKEN }}
ansible_python_interpreter: "/usr/bin/python3"

switch-repos:
strategy:
matrix:
tests: [{ role: "switch-repos", test: "default" }]
fail-fast: false
concurrency: molecule-test-${{ matrix.tests.role }}-${{ matrix.tests.test }}
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v5
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.12"
- name: Install depencencies
run: |
pip install ansible==13.3.0
pip install molecule==25.12.0
pip install "molecule[docker.lint]"
pip install molecule-plugins==25.8.12
pip install "molecule-plugins[docker]"
pip install molecule-hetznercloud
pip install docker
pip install hcloud
ansible-galaxy collection install community.docker
- name: Install dependency for pipx
run: |
/opt/pipx/venvs/ansible-core/bin/python -m pip install ansible==13.3.0
/opt/pipx/venvs/ansible-core/bin/python -m pip install molecule==25.12.0
/opt/pipx/venvs/ansible-core/bin/python -m pip install "molecule[docker.lint]"
/opt/pipx/venvs/ansible-core/bin/python -m pip install molecule-plugins==25.8.12
/opt/pipx/venvs/ansible-core/bin/python -m pip install "molecule-plugins[docker]"
/opt/pipx/venvs/ansible-core/bin/python -m pip install molecule-hetznercloud
/opt/pipx/venvs/ansible-core/bin/python -m pip install docker
/opt/pipx/venvs/ansible-core/bin/python -m pip install hcloud
- name: Install ansible-lint
run: sudo apt-get install -y ansible-lint
- name: Molecule version
run: molecule --version
env:
ansible_python_interpreter: "/usr/bin/python3"
- name: Run tests
working-directory: ./controls/roles/${{ matrix.tests.role }}
run: molecule test -s ${{ matrix.tests.test }}
env:
HCLOUD_TOKEN: ${{ secrets.HCLOUD_TOKEN }}
ansible_python_interpreter: "/usr/bin/python3"
# destroying is necessary when previous task failed and didn't clean up properly
- name: Destroy previous testing VMs
if: ${{ failure() || cancelled() }}
working-directory: ./controls/roles/${{ matrix.tests.role }}
run: molecule destroy -s ${{ matrix.tests.test }}
env:
HCLOUD_TOKEN: ${{ secrets.HCLOUD_TOKEN }}
ansible_python_interpreter: "/usr/bin/python3"
# switch-repos:
# strategy:
# matrix:
# tests: [{ role: "switch-repos", test: "default" }]
# fail-fast: false
# concurrency: molecule-test-${{ matrix.tests.role }}-${{ matrix.tests.test }}
# runs-on: ubuntu-24.04
# steps:
# - uses: actions/checkout@v5
# - name: Set up Python
# uses: actions/setup-python@v6
# with:
# python-version: "3.12"
# - name: Install depencencies
# run: |
# pip install ansible==13.3.0
# pip install molecule==25.12.0
# pip install "molecule[docker.lint]"
# pip install molecule-plugins==25.8.12
# pip install "molecule-plugins[docker]"
# pip install molecule-hetznercloud
# pip install docker
# pip install hcloud
# ansible-galaxy collection install community.docker
# - name: Install dependency for pipx
# run: |
# /opt/pipx/venvs/ansible-core/bin/python -m pip install ansible==13.3.0
# /opt/pipx/venvs/ansible-core/bin/python -m pip install molecule==25.12.0
# /opt/pipx/venvs/ansible-core/bin/python -m pip install "molecule[docker.lint]"
# /opt/pipx/venvs/ansible-core/bin/python -m pip install molecule-plugins==25.8.12
# /opt/pipx/venvs/ansible-core/bin/python -m pip install "molecule-plugins[docker]"
# /opt/pipx/venvs/ansible-core/bin/python -m pip install molecule-hetznercloud
# /opt/pipx/venvs/ansible-core/bin/python -m pip install docker
# /opt/pipx/venvs/ansible-core/bin/python -m pip install hcloud
# - name: Install ansible-lint
# run: sudo apt-get install -y ansible-lint
# - name: Molecule version
# run: molecule --version
# env:
# ansible_python_interpreter: "/usr/bin/python3"
# - name: Run tests
# working-directory: ./controls/roles/${{ matrix.tests.role }}
# run: molecule test -s ${{ matrix.tests.test }}
# env:
# HCLOUD_TOKEN: ${{ secrets.HCLOUD_TOKEN }}
# ansible_python_interpreter: "/usr/bin/python3"
# # destroying is necessary when previous task failed and didn't clean up properly
# - name: Destroy previous testing VMs
# if: ${{ failure() || cancelled() }}
# working-directory: ./controls/roles/${{ matrix.tests.role }}
# run: molecule destroy -s ${{ matrix.tests.test }}
# env:
# HCLOUD_TOKEN: ${{ secrets.HCLOUD_TOKEN }}
# ansible_python_interpreter: "/usr/bin/python3"

update-package:
strategy:
matrix:
tests: [{ role: "update-package", test: "default" }]
fail-fast: false
concurrency: molecule-test-${{ matrix.tests.role }}-${{ matrix.tests.test }}
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v5
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.12"
- name: Install depencencies
run: |
pip install ansible==13.3.0
pip install molecule==25.12.0
pip install "molecule[docker.lint]"
pip install molecule-plugins==25.8.12
pip install "molecule-plugins[docker]"
pip install molecule-hetznercloud
pip install docker
pip install hcloud
ansible-galaxy collection install community.docker
- name: Install dependency for pipx
run: |
/opt/pipx/venvs/ansible-core/bin/python -m pip install ansible==13.3.0
/opt/pipx/venvs/ansible-core/bin/python -m pip install molecule==25.12.0
/opt/pipx/venvs/ansible-core/bin/python -m pip install "molecule[docker.lint]"
/opt/pipx/venvs/ansible-core/bin/python -m pip install molecule-plugins==25.8.12
/opt/pipx/venvs/ansible-core/bin/python -m pip install "molecule-plugins[docker]"
/opt/pipx/venvs/ansible-core/bin/python -m pip install molecule-hetznercloud
/opt/pipx/venvs/ansible-core/bin/python -m pip install docker
/opt/pipx/venvs/ansible-core/bin/python -m pip install hcloud
- name: Install ansible-lint
run: sudo apt-get install -y ansible-lint
- name: Molecule version
run: molecule --version
env:
ansible_python_interpreter: "/usr/bin/python3"
- name: Run tests
working-directory: ./controls/roles/${{ matrix.tests.role }}
run: molecule test -s ${{ matrix.tests.test }}
env:
HCLOUD_TOKEN: ${{ secrets.HCLOUD_TOKEN }}
ansible_python_interpreter: "/usr/bin/python3"
# destroying is necessary when previous task failed and didn't clean up properly
- name: Destroy previous testing VMs
if: ${{ failure() || cancelled() }}
working-directory: ./controls/roles/${{ matrix.tests.role }}
run: molecule destroy -s ${{ matrix.tests.test }}
env:
HCLOUD_TOKEN: ${{ secrets.HCLOUD_TOKEN }}
ansible_python_interpreter: "/usr/bin/python3"
# update-package:
# strategy:
# matrix:
# tests: [{ role: "update-package", test: "default" }]
# fail-fast: false
# concurrency: molecule-test-${{ matrix.tests.role }}-${{ matrix.tests.test }}
# runs-on: ubuntu-24.04
# steps:
# - uses: actions/checkout@v5
# - name: Set up Python
# uses: actions/setup-python@v6
# with:
# python-version: "3.12"
# - name: Install depencencies
# run: |
# pip install ansible==13.3.0
# pip install molecule==25.12.0
# pip install "molecule[docker.lint]"
# pip install molecule-plugins==25.8.12
# pip install "molecule-plugins[docker]"
# pip install molecule-hetznercloud
# pip install docker
# pip install hcloud
# ansible-galaxy collection install community.docker
# - name: Install dependency for pipx
# run: |
# /opt/pipx/venvs/ansible-core/bin/python -m pip install ansible==13.3.0
# /opt/pipx/venvs/ansible-core/bin/python -m pip install molecule==25.12.0
# /opt/pipx/venvs/ansible-core/bin/python -m pip install "molecule[docker.lint]"
# /opt/pipx/venvs/ansible-core/bin/python -m pip install molecule-plugins==25.8.12
# /opt/pipx/venvs/ansible-core/bin/python -m pip install "molecule-plugins[docker]"
# /opt/pipx/venvs/ansible-core/bin/python -m pip install molecule-hetznercloud
# /opt/pipx/venvs/ansible-core/bin/python -m pip install docker
# /opt/pipx/venvs/ansible-core/bin/python -m pip install hcloud
# - name: Install ansible-lint
# run: sudo apt-get install -y ansible-lint
# - name: Molecule version
# run: molecule --version
# env:
# ansible_python_interpreter: "/usr/bin/python3"
# - name: Run tests
# working-directory: ./controls/roles/${{ matrix.tests.role }}
# run: molecule test -s ${{ matrix.tests.test }}
# env:
# HCLOUD_TOKEN: ${{ secrets.HCLOUD_TOKEN }}
# ansible_python_interpreter: "/usr/bin/python3"
# # destroying is necessary when previous task failed and didn't clean up properly
# - name: Destroy previous testing VMs
# if: ${{ failure() || cancelled() }}
# working-directory: ./controls/roles/${{ matrix.tests.role }}
# run: molecule destroy -s ${{ matrix.tests.test }}
# env:
# HCLOUD_TOKEN: ${{ secrets.HCLOUD_TOKEN }}
# ansible_python_interpreter: "/usr/bin/python3"

restart-services:
strategy:
matrix:
tests: [{ role: "restart-services", test: "default" }]
fail-fast: false
concurrency: molecule-test-${{ matrix.tests.role }}-${{ matrix.tests.test }}
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v5
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v6
with:
python-version: "3.12"
- name: Install depencencies
Expand Down Expand Up @@ -294,11 +294,11 @@ jobs:
# ]
# fail-fast: false
# concurrency: molecule-test-${{ matrix.tests.role }}-${{ matrix.tests.test }}
# runs-on: ubuntu-22.04
# runs-on: ubuntu-24.04
# steps:
# - uses: actions/checkout@v5
# - name: Set up Python
# uses: actions/setup-python@v4
# uses: actions/setup-python@v6
# with:
# python-version: '3.9'
# - name: Install depencencies
Expand Down Expand Up @@ -349,11 +349,11 @@ jobs:
tests: [{ role: "setup", test: "default" }]
fail-fast: false
concurrency: molecule-test-${{ matrix.tests.role }}-${{ matrix.tests.test }}
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v5
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v6
with:
python-version: "3.12"
- name: Install depencencies
Expand Down Expand Up @@ -456,11 +456,11 @@ jobs:
]
fail-fast: false
concurrency: molecule-test-${{ matrix.tests.role }}-${{ matrix.tests.test }}
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v5
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v6
with:
python-version: "3.12"
- name: Install depencencies
Expand Down Expand Up @@ -513,11 +513,11 @@ jobs:
tests: [{ role: "ssv-key-generator", test: "default" }]
fail-fast: false
concurrency: molecule-test-${{ matrix.tests.role }}-${{ matrix.tests.test }}
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v5
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v6
with:
python-version: "3.12"
- name: Install depencencies
Expand Down Expand Up @@ -574,11 +574,11 @@ jobs:
]
fail-fast: false
concurrency: molecule-test-${{ matrix.tests.role }}-${{ matrix.tests.test }}
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v5
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v6
with:
python-version: "3.12"
- name: Install depencencies
Expand Down Expand Up @@ -636,11 +636,11 @@ jobs:
]
fail-fast: false
concurrency: molecule-test-${{ matrix.tests.role }}-${{ matrix.tests.test }}
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v5
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v6
with:
python-version: "3.12"
- name: Install depencencies
Expand Down
2 changes: 1 addition & 1 deletion controls/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
update_cache: yes
become: true
changed_when: false
when: ansible_distribution == "Ubuntu"
when: ansible_facts['distribution'] == "Ubuntu"

# - name: Install python for Ansible (CentOS 8)
# raw: yum install -y crontabs
# become: true
# changed_when: false
# when: ansible_distribution == "CentOS"
# when: ansible_facts['distribution'] == "CentOS"
5 changes: 2 additions & 3 deletions controls/roles/configure-firewall/tasks/packages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,13 @@
name:
- ufw
- fail2ban
when: ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu'
when: ansible_facts['distribution'] == 'Debian' or ansible_facts['distribution'] == 'Ubuntu'

- name: Install ufw, fail2ban
yum:
name:
- ufw
- fail2ban
state: present
when: ansible_distribution == "CentOS"

when: ansible_facts['distribution'] == "CentOS"
# EOF
Loading
Loading