Skip to content

Commit

Permalink
fix(tests): re-instate centos and ubuntu actions
Browse files Browse the repository at this point in the history
  • Loading branch information
mattwillsher committed Jun 7, 2024
1 parent 22b562b commit dd68e95
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 1 deletion.
43 changes: 43 additions & 0 deletions .github/workflows/ansible-centos-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,35 @@ name: Run Ansible Check on CentOS
on: [push, pull_request]

jobs:
centos-6:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

# Workaround missing support for end_host in old ansible
- run: "sed -i -e 's/meta: end_host/assert:\\n that: __sshd_os_supported|bool/' tasks/install.yml"
- run: >-
printf '%s\n%s\n%s\n%s'
'- name: Convert variables to facts for testing with old Ansible version (pre 2.7)'
' ansible.builtin.set_fact:'
' __sshd_skip_virt_env: "{{ __sshd_skip_virt_env }}"'
' __sshd_config_file: "{{ __sshd_config_file }}"'
>> tasks/variables.yml
- run: >-
sed -i -e '/public: true/d'
tests/tasks/restore.yml
tests/tests_duplicate_role.yml
tests/tests_os_defaults.yml
tests/tests_firewall_selinux.yml
- run: "sed -i -e 's/ansible.builtin.//g' -e 's/ansible.posix.//g' */*.yml */*/*.yml"

- name: ansible check with centos 6
uses: roles-ansible/check-ansible-centos-centos6-action@master
with:
group: local
hosts: localhost
targets: "tests/tests_*.yml"

centos-7:
runs-on: ubuntu-latest
steps:
Expand All @@ -18,6 +47,20 @@ jobs:
hosts: localhost
targets: "tests/tests_*.yml"

centos-8:
runs-on: ubuntu-latest
steps:
- name: checkout PR
uses: actions/checkout@v4

- name: ansible check with centos 8
uses: roles-ansible/check-ansible-centos-centos8-action@master
with:
group: local
hosts: localhost
targets: "tests/tests_*.yml"
requirements: tests/requirements.yml

centos-9:
runs-on: ubuntu-latest
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ansible-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
uses: actions/checkout@v4

- name: ansible check with ubuntu:latest
uses: mattwillsher/check-ansible-ubuntu-latest-action@master
uses: roles-ansible/check-ansible-ubuntu-latest-action@master
with:
group: local
hosts: localhost
Expand Down

0 comments on commit dd68e95

Please sign in to comment.