Skip to content

Commit e3b0e2b

Browse files
authored
Merge pull request #30 from Appsilon/feat/rhel9_support
feat/rhel9 support
2 parents 126f10b + b2c8238 commit e3b0e2b

File tree

9 files changed

+56
-26
lines changed

9 files changed

+56
-26
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
- name: Set up Python 3
2121
uses: actions/setup-python@v5
2222
with:
23-
python-version: '3.x'
23+
python-version: '3.12'
2424

2525
- name: Install test dependencies
2626
run: pip install ansible-lint[community,yamllint]
@@ -43,16 +43,15 @@ jobs:
4343
matrix:
4444
include:
4545
- distro: ubuntu2004
46-
ansible-version: '>=2.11.5'
4746
scenario: 'default'
4847
- distro: ubuntu2204
49-
ansible-version: '>=2.11.5'
5048
scenario: 'default'
5149
- distro: ubuntu2204
52-
ansible-version: '>=2.11.5'
5350
scenario: 'jupyter-system'
51+
platform: instance-jupyter-system
5452
- distro: rockylinux8
55-
ansible-version: '>=2.11.5'
53+
scenario: 'default'
54+
- distro: rockylinux9
5655
scenario: 'default'
5756

5857
steps:
@@ -64,17 +63,18 @@ jobs:
6463
- name: Set up Python 3
6564
uses: actions/setup-python@v5
6665
with:
67-
python-version: '3.x'
66+
python-version: '3.12'
6867

6968
- name: Install test dependencies
70-
run: pip install 'ansible${{ matrix.ansible-version }}' molecule molecule-plugins[docker] docker
69+
run: pip install -r requirements.txt
7170

7271
- name: Run Molecule tests
7372
run: |
74-
molecule test -s "${{ matrix.scenario }}"
73+
molecule test -s "${{ matrix.scenario }}" --platform-name ${MOLECULE_PLATFORM:-instance}
7574
env:
7675
ANSIBLE_FORCE_COLOR: '1'
7776
ANSIBLE_VERBOSITY: '2'
7877
MOLECULE_DEBUG: '1'
7978
MOLECULE_DISTRO: "${{ matrix.distro }}"
79+
MOLECULE_PLATFORM: "${{ matrix.platform }}"
8080
PY_COLORS: '1'

molecule/default/converge.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
22
- name: Converge
33
hosts: all
4-
become: true
54
pre_tasks:
65
- name: Include vars
76
include_vars: "{{ playbook_dir }}/../../tests/vars/main.yml"

molecule/default/prepare.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
---
22
- name: Prepare
33
hosts: all
4-
become: true
54
tasks: []

molecule/default/verify.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
22
- name: Verify
33
hosts: all
4-
become: true
54
pre_tasks:
65
- name: Include vars
76
ansible.builtin.include_vars: "{{ playbook_dir }}/../../tests/vars/main.yml"

requirements.txt

Lines changed: 37 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,37 @@
1-
ansible
2-
ansible-lint
3-
boto3
4-
docker
5-
molecule
6-
molecule-docker
7-
molecule-ec2
8-
yamllint
1+
ansible==9.3.0
2+
ansible-compat==4.1.11
3+
ansible-core==2.16.4
4+
attrs==23.2.0
5+
bracex==2.4
6+
certifi==2024.2.2
7+
cffi==1.16.0
8+
charset-normalizer==3.3.2
9+
click==8.1.7
10+
click-help-colors==0.9.4
11+
cryptography==42.0.5
12+
distro==1.9.0
13+
docker==7.0.0
14+
enrich==1.2.7
15+
idna==3.6
16+
Jinja2==3.1.3
17+
jsonschema==4.21.1
18+
jsonschema-specifications==2023.12.1
19+
markdown-it-py==3.0.0
20+
MarkupSafe==2.1.5
21+
mdurl==0.1.2
22+
molecule==24.2.0
23+
molecule-plugins==23.5.3
24+
packaging==23.2
25+
pluggy==1.4.0
26+
pycparser==2.21
27+
Pygments==2.17.2
28+
PyYAML==6.0.1
29+
referencing==0.33.0
30+
requests==2.31.0
31+
resolvelib==1.0.1
32+
rich==13.7.1
33+
rpds-py==0.18.0
34+
selinux==0.3.0
35+
subprocess-tee==0.4.1
36+
urllib3==2.2.1
37+
wcmatch==8.5.1

tasks/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
- "_{{ ansible_distribution_release }}.yml"
77
- "_{{ (ansible_distribution + '-' + ansible_distribution_major_version) | lower }}.yml"
88
- "_{{ ansible_distribution | lower }}.yml"
9+
- "_{{ (ansible_os_family + '-' + ansible_distribution_major_version) | lower }}.yml"
910
- _default.yml
1011
tags:
1112
- configuration

tasks/redhat/main.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
---
22
- name: Install Python | Install dependecies
3-
ansible.builtin.yum:
3+
ansible.builtin.dnf:
44
name: "{{ system_dependecies }}"
5+
state: present
6+
when: system_dependecies is defined
7+
58

69
- name: Install Python | Download rpm package
710
ansible.builtin.get_url:
@@ -14,7 +17,7 @@
1417
- python-install-setup-versions
1518

1619
- name: Install Python | Install rpm package
17-
ansible.builtin.yum:
20+
ansible.builtin.dnf:
1821
name: "{{ downloads_path }}/python-{{ item }}-1-1.x86_64.rpm"
1922
disable_gpg_check: true
2023
state: present

vars/_redhat-8.yml

Lines changed: 0 additions & 5 deletions
This file was deleted.

vars/_redhat-9.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# vars file
2+
---
3+
system_dependecies:
4+
- libev-devel
5+
python_download_url: "https://cdn.rstudio.com/python/rhel-9/pkgs"

0 commit comments

Comments
 (0)