File tree Expand file tree Collapse file tree 14 files changed +57
-23
lines changed
ssh_hardening_custom_tests Expand file tree Collapse file tree 14 files changed +57
-23
lines changed Original file line number Diff line number Diff line change @@ -37,14 +37,19 @@ jobs:
37
37
fail-fast : false
38
38
matrix :
39
39
molecule_distro :
40
+ - almalinux8
41
+ - almalinux9
42
+ # - almalinux10 # problem with baseline
40
43
- centosstream9
41
44
- rocky8
42
45
- rocky9
46
+ # - rocky10 # problem with baseline
43
47
- ubuntu2004
44
48
- ubuntu2204
45
49
- ubuntu2404
46
50
- debian11
47
51
- debian12
52
+ - debian13
48
53
# - amazon # geerlingguy.mysql does not support fedora
49
54
# - arch # geerlingguy.mysql does not support arch
50
55
- opensuse_tumbleweed
71
76
pip install "ansible-core<2.17"
72
77
ansible-galaxy collection install 'community.crypto:<3.0.0'
73
78
working-directory : ansible_collections/devsec/hardening
74
- if : matrix.molecule_distro == 'rocky8'
79
+ if : matrix.molecule_distro == 'rocky8' || matrix.molecule_distro == 'almalinux8'
75
80
76
81
# that was a hard one to fix. robert did it thankfully
77
82
# https://github.com/robertdebock/ansible-role-mysql/commit/7562e99099b06282391ab7ed102b393a0406d212
Original file line number Diff line number Diff line change @@ -36,14 +36,19 @@ jobs:
36
36
fail-fast : false
37
37
matrix :
38
38
molecule_distro :
39
+ - almalinux8
40
+ - almalinux9
41
+ - almalinux10
39
42
- centosstream9
40
43
- rocky8
41
44
- rocky9
45
+ - rocky10
42
46
- ubuntu2004
43
47
- ubuntu2204
44
48
- ubuntu2404
45
49
- debian11
46
50
- debian12
51
+ - debian13
47
52
- amazon2023
48
53
# - arch # needs to be fixed
49
54
# - opensuse_tumbleweed # needs to be fixed
70
75
pip install "ansible-core<2.17"
71
76
ansible-galaxy collection install 'community.crypto:<3.0.0'
72
77
working-directory : ansible_collections/devsec/hardening
73
- if : matrix.molecule_distro == 'rocky8'
78
+ if : matrix.molecule_distro == 'rocky8' || matrix.molecule_distro == 'almalinux8'
74
79
75
80
# Molecule has problems detecting the proper location for installing roles
76
81
# https://github.com/ansible/molecule/issues/3806
Original file line number Diff line number Diff line change @@ -39,16 +39,21 @@ jobs:
39
39
- molecule_distro : opensuse_tumbleweed
40
40
molecule_docker_command : " /usr/lib/systemd/systemd"
41
41
molecule_distro :
42
+ - almalinux8
43
+ - almalinux9
44
+ - almalinux10
42
45
- centosstream9
43
46
- rocky8
44
47
- rocky9
48
+ - rocky10
45
49
- fedora39
46
50
- fedora40
47
51
- ubuntu2004
48
52
- ubuntu2204
49
53
- ubuntu2404
50
54
- debian11
51
55
- debian12
56
+ - debian13
52
57
- amazon2023
53
58
- arch
54
59
molecule_docker_command :
75
80
pip install "ansible-core<2.17"
76
81
ansible-galaxy collection install 'community.crypto:<3.0.0'
77
82
working-directory : ansible_collections/devsec/hardening
78
- if : matrix.molecule_distro == 'rocky8'
83
+ if : matrix.molecule_distro == 'rocky8' || matrix.molecule_distro == 'almalinux8'
79
84
80
85
- name : Test with molecule
81
86
run : molecule test -s os_hardening
Original file line number Diff line number Diff line change 36
36
fail-fast : false
37
37
matrix :
38
38
molecule_distro :
39
+ - almalinux/8
40
+ - almalinux/9
41
+ # - almalinux/10 # boot loop
39
42
- generic/centos9s
40
43
- generic/rocky8
41
44
- generic/rocky9
69
72
pip install "ansible-core<2.17"
70
73
ansible-galaxy collection install 'community.crypto:<3.0.0'
71
74
working-directory : ansible_collections/devsec/hardening
72
- if : matrix.molecule_distro == 'generic/rocky8' || matrix.molecule_distro == 'generic/opensuse15'
75
+ if : >
76
+ matrix.molecule_distro == 'generic/rocky8' ||
77
+ matrix.molecule_distro == 'almalinux/8' ||
78
+ matrix.molecule_distro == 'generic/opensuse15'
73
79
74
80
- name : Update Vagrant Box
75
81
run : |
Original file line number Diff line number Diff line change @@ -42,16 +42,21 @@ jobs:
42
42
- molecule_distro : alpine
43
43
molecule_docker_command : " /sbin/init"
44
44
molecule_distro :
45
+ - almalinux8
46
+ - almalinux9
47
+ - almalinux10
45
48
- centosstream9
46
49
- rocky8
47
50
- rocky9
51
+ - rocky10
48
52
- fedora39
49
53
- fedora40
50
54
- ubuntu2004
51
55
- ubuntu2204
52
56
- ubuntu2404
53
57
- debian11
54
58
- debian12
59
+ - debian13
55
60
- amazon2023
56
61
- arch
57
62
molecule_docker_command :
78
83
pip install "ansible-core<2.17"
79
84
ansible-galaxy collection install 'community.crypto:<3.0.0'
80
85
working-directory : ansible_collections/devsec/hardening
81
- if : matrix.molecule_distro == 'rocky8'
86
+ if : matrix.molecule_distro == 'rocky8' || matrix.molecule_distro == 'almalinux8'
82
87
83
88
- name : Test with molecule
84
89
run : molecule test -s ssh_hardening
Original file line number Diff line number Diff line change @@ -42,16 +42,21 @@ jobs:
42
42
- molecule_distro : alpine
43
43
molecule_docker_command : " /sbin/init"
44
44
molecule_distro :
45
+ - almalinux8
46
+ - almalinux9
47
+ - almalinux10
45
48
- centosstream9
46
49
- rocky8
47
50
- rocky9
51
+ - rocky10
48
52
- fedora39
49
53
- fedora40
50
54
- ubuntu2004
51
55
- ubuntu2204
52
56
- ubuntu2404
53
57
- debian11
54
58
- debian12
59
+ - debian13
55
60
- amazon2023
56
61
- arch
57
62
molecule_docker_command :
78
83
pip install "ansible-core<2.17"
79
84
ansible-galaxy collection install 'community.crypto:<3.0.0'
80
85
working-directory : ansible_collections/devsec/hardening
81
- if : matrix.molecule_distro == 'rocky8'
86
+ if : matrix.molecule_distro == 'rocky8' || matrix.molecule_distro == 'almalinux8'
82
87
83
88
- name : Test with molecule
84
89
run : molecule test -s ssh_hardening_custom_tests
Original file line number Diff line number Diff line change @@ -14,9 +14,9 @@ This collection provides battle tested hardening for:
14
14
15
15
- Linux operating systems:
16
16
- CentOS Stream 9
17
- - AlmaLinux 8/9
18
- - Rocky Linux 8/9
19
- - Debian 11/12
17
+ - AlmaLinux 8/9/10
18
+ - Rocky Linux 8/9/10
19
+ - Debian 11/12/13
20
20
- Ubuntu 20.04/22.04/24.04
21
21
- Amazon Linux (some roles supported)
22
22
- Arch Linux (some roles supported)
Original file line number Diff line number Diff line change 59
59
- python3-libselinux
60
60
when : ansible_facts.distribution == 'Fedora'
61
61
62
+ - name : Install required tools on AlmaLinux
63
+ ansible.builtin.dnf :
64
+ name :
65
+ - initscripts
66
+ when : ansible_facts.distribution == 'AlmaLinux'
67
+
62
68
- name : Install required tools on Arch
63
69
community.general.pacman :
64
70
name :
84
90
ansible.posix.mount :
85
91
path : /boot/efi
86
92
state : unmounted
87
- when : ansible_facts.distribution == 'Fedora'
88
93
89
94
- name : Include YUM prepare tasks
90
95
ansible.builtin.include_tasks : prepare_tasks/yum.yml
Original file line number Diff line number Diff line change 75
75
update_cache : true
76
76
when : ansible_facts.os_family == 'Archlinux'
77
77
78
- - name : Create ssh host keys # noqa ignore-errors
78
+ - name : Create ssh host keys # noqa ignore-errors no-changed-when
79
79
ansible.builtin.command : ssh-keygen -A
80
- when : not ((ansible_facts.os_family in ['Oracle Linux', 'RedHat']) and ansible_facts.distribution_major_version < '7')
81
- or ansible_facts.distribution == "Fedora"
82
- or ansible_facts.distribution == "Amazon"
83
- or ansible_facts.os_family == "Suse"
84
- changed_when : false
85
80
ignore_errors : true
Original file line number Diff line number Diff line change 75
75
update_cache : true
76
76
when : ansible_facts.os_family == 'Alpine'
77
77
78
- - name : Create ssh host keys # noqa ignore-errors
78
+ - name : Create ssh host keys # noqa ignore-errors no-changed-when
79
79
ansible.builtin.command : ssh-keygen -A
80
- when : not ((ansible_facts.os_family in ['Oracle Linux', 'RedHat']) and ansible_facts.distribution_major_version < '7')
81
- or ansible_facts.distribution == "Fedora"
82
- or ansible_facts.distribution == "Amazon"
83
- or ansible_facts.os_family == "Suse"
84
- changed_when : false
85
80
ignore_errors : true
You can’t perform that action at this time.
0 commit comments