File tree 9 files changed +40
-66
lines changed
9 files changed +40
-66
lines changed Original file line number Diff line number Diff line change @@ -60,17 +60,14 @@ jobs:
60
60
uses : actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5
61
61
with :
62
62
python-version : 3.12
63
+ cache : ' pip'
63
64
64
65
- name : Install dependencies
65
- run : |
66
- sudo apt install git
67
- python -m pip install --no-cache-dir --upgrade pip
68
- pip install -r requirements.txt
66
+ run : pip install -r requirements.txt
69
67
working-directory : ansible_collections/devsec/hardening
70
68
71
69
- name : Downgrade Ansible for Rocky 8 tests
72
- run : |
73
- pip install "ansible-core<2.17"
70
+ run : pip install "ansible-core<2.17"
74
71
working-directory : ansible_collections/devsec/hardening
75
72
if : matrix.molecule_distro == 'rocky8'
76
73
96
93
/home/runner/.ansible/roles
97
94
98
95
- name : Test with molecule
99
- run : |
100
- molecule --version
101
- molecule test -s mysql_hardening
96
+ run : molecule test -s mysql_hardening
102
97
env :
103
98
MOLECULE_DISTRO : ${{ matrix.molecule_distro }}
104
99
working-directory : ansible_collections/devsec/hardening
Original file line number Diff line number Diff line change @@ -59,17 +59,14 @@ jobs:
59
59
uses : actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5
60
60
with :
61
61
python-version : 3.12
62
+ cache : ' pip'
62
63
63
64
- name : Install dependencies
64
- run : |
65
- sudo apt install git
66
- python -m pip install --no-cache-dir --upgrade pip
67
- pip install -r requirements.txt
65
+ run : pip install -r requirements.txt
68
66
working-directory : ansible_collections/devsec/hardening
69
67
70
68
- name : Downgrade Ansible for Rocky 8 tests
71
- run : |
72
- pip install "ansible-core<2.17"
69
+ run : pip install "ansible-core<2.17"
73
70
working-directory : ansible_collections/devsec/hardening
74
71
if : matrix.molecule_distro == 'rocky8'
75
72
85
82
/home/runner/.ansible/roles
86
83
87
84
- name : Test with molecule
88
- run : |
89
- molecule --version
90
- molecule test -s nginx_hardening
85
+ run : molecule test -s nginx_hardening
91
86
env :
92
87
MOLECULE_DISTRO : ${{ matrix.molecule_distro }}
93
88
working-directory : ansible_collections/devsec/hardening
Original file line number Diff line number Diff line change 35
35
strategy :
36
36
fail-fast : false
37
37
matrix :
38
+ include :
39
+ - molecule_distro : opensuse_tumbleweed
40
+ molecule_docker_command : " /usr/lib/systemd/systemd"
41
+ molecule_docker_command :
42
+ - " /lib/systemd/systemd"
38
43
molecule_distro :
39
44
- centosstream9
40
45
- rocky8
47
52
- debian11
48
53
- debian12
49
54
- amazon2023
50
- - opensuse_tumbleweed
51
55
- arch
52
56
steps :
53
57
- name : Checkout repo
@@ -60,27 +64,20 @@ jobs:
60
64
uses : actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5
61
65
with :
62
66
python-version : 3.12
67
+ cache : ' pip'
63
68
64
69
- name : Install dependencies
65
- run : |
66
- sudo apt install git
67
- python -m pip install --no-cache-dir --upgrade pip
68
- pip install -r requirements.txt
70
+ run : pip install -r requirements.txt
69
71
working-directory : ansible_collections/devsec/hardening
70
72
71
73
- name : Downgrade Ansible for Rocky 8 tests
72
- run : |
73
- pip install "ansible-core<2.17"
74
+ run : pip install "ansible-core<2.17"
74
75
working-directory : ansible_collections/devsec/hardening
75
76
if : matrix.molecule_distro == 'rocky8'
76
77
77
78
- name : Test with molecule
78
- run : |
79
- if [ "$MOLECULE_DISTRO" = "opensuse_tumbleweed" ]; then
80
- export MOLECULE_DOCKER_COMMAND="/usr/lib/systemd/systemd"
81
- fi
82
- molecule --version
83
- molecule test -s os_hardening
79
+ run : molecule test -s os_hardening
84
80
env :
85
81
MOLECULE_DISTRO : ${{ matrix.molecule_distro }}
82
+ MOLECULE_DOCKER_COMMAND : ${{ matrix.molecule_docker_command }}
86
83
working-directory : ansible_collections/devsec/hardening
Original file line number Diff line number Diff line change 77
77
- name : Test with molecule
78
78
run : |
79
79
source ~/.venv/ansible-collection-hardening/bin/activate
80
- molecule --version
81
80
molecule test -s os_hardening_vm
82
81
env :
83
82
MOLECULE_DISTRO : ${{ matrix.molecule_distro }}
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ on: # yamllint disable-line rule:truthy
12
12
paths :
13
13
- ' roles/**/meta/argument_specs.yml'
14
14
- ' roles/**/meta/main.yml'
15
+ - ' requirements.txt'
15
16
16
17
jobs :
17
18
readme :
@@ -32,12 +33,14 @@ jobs:
32
33
uses : actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5
33
34
with :
34
35
python-version : 3.12
36
+ cache : ' pip'
35
37
36
- - name : Install aar_doc
37
- run : pip3 install aar_doc
38
+ - name : Install dependencies
39
+ run : pip install -r requirements.txt
40
+ working-directory : ansible_collections/devsec/hardening
38
41
39
- - name : Run aar_doc
40
- run : aar_doc roles/${{ matrix.roles }} markdown
42
+ - name : Run aar-doc
43
+ run : aar-doc roles/${{ matrix.roles }} markdown
41
44
42
45
- name : Output diff
43
46
run : git diff roles/${{ matrix.roles }}/README.md
Original file line number Diff line number Diff line change @@ -67,24 +67,19 @@ jobs:
67
67
uses : actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5
68
68
with :
69
69
python-version : 3.12
70
+ cache : ' pip'
70
71
71
72
- name : Install dependencies
72
- run : |
73
- sudo apt install git
74
- python -m pip install --no-cache-dir --upgrade pip
75
- pip install -r requirements.txt
73
+ run : pip install -r requirements.txt
76
74
working-directory : ansible_collections/devsec/hardening
77
75
78
76
- name : Downgrade Ansible for Rocky 8 tests
79
- run : |
80
- pip install "ansible-core<2.17"
77
+ run : pip install "ansible-core<2.17"
81
78
working-directory : ansible_collections/devsec/hardening
82
79
if : matrix.molecule_distro == 'rocky8'
83
80
84
81
- name : Test with molecule
85
- run : |
86
- molecule --version
87
- molecule test -s ssh_hardening
82
+ run : molecule test -s ssh_hardening
88
83
env :
89
84
MOLECULE_DISTRO : ${{ matrix.molecule_distro }}
90
85
MOLECULE_DOCKER_COMMAND : ${{ matrix.molecule_docker_command }}
Original file line number Diff line number Diff line change @@ -47,13 +47,10 @@ jobs:
47
47
submodules : true
48
48
49
49
- name : Update Vagrant Box
50
- run : |
51
- vagrant box update --box generic/${{ matrix.molecule_distro }} || true
50
+ run : vagrant box update --box generic/${{ matrix.molecule_distro }} || true
52
51
53
52
- name : Test with molecule
54
- run : |
55
- molecule --version
56
- molecule test -s ssh_hardening_bsd
53
+ run : molecule test -s ssh_hardening_bsd
57
54
env :
58
55
MOLECULE_DISTRO : ${{ matrix.molecule_distro }}
59
56
working-directory : ansible_collections/devsec/hardening
Original file line number Diff line number Diff line change @@ -67,24 +67,19 @@ jobs:
67
67
uses : actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5
68
68
with :
69
69
python-version : 3.12
70
+ cache : ' pip'
70
71
71
72
- name : Install dependencies
72
- run : |
73
- sudo apt install git
74
- python -m pip install --no-cache-dir --upgrade pip
75
- pip install -r requirements.txt
73
+ run : pip install -r requirements.txt
76
74
working-directory : ansible_collections/devsec/hardening
77
75
78
76
- name : Downgrade Ansible for Rocky 8 tests
79
- run : |
80
- pip install "ansible-core<2.17"
77
+ run : pip install "ansible-core<2.17"
81
78
working-directory : ansible_collections/devsec/hardening
82
79
if : matrix.molecule_distro == 'rocky8'
83
80
84
81
- name : Test with molecule
85
- run : |
86
- molecule --version
87
- molecule test -s ssh_hardening_custom_tests
82
+ run : molecule test -s ssh_hardening_custom_tests
88
83
env :
89
84
MOLECULE_DISTRO : ${{ matrix.molecule_distro }}
90
85
MOLECULE_DOCKER_COMMAND : ${{ matrix.molecule_docker_command }}
Original file line number Diff line number Diff line change 1
- molecule
2
- molecule-plugins [docker ]
3
- yamllint
1
+ molecule == 24.9.0
2
+ molecule-plugins [docker ]== 23.5.3
4
3
ansible-core == 2.17.5
5
- ansible-lint
6
- docker
7
- flake8
8
- jmespath
4
+ docker == 7.1.0
5
+ jmespath == 1.0.1
6
+ aar-doc == 2.0.0
You can’t perform that action at this time.
0 commit comments