Skip to content

Commit 11d187e

Browse files
authored
update supported OS in meta and fix linting (#572)
Signed-off-by: Sebastian Gumprich <[email protected]> Signed-off-by: Sebastian Gumprich <[email protected]>
1 parent fbea75a commit 11d187e

File tree

10 files changed

+29
-65
lines changed

10 files changed

+29
-65
lines changed

.github/workflows/ansible-lint.yml

Lines changed: 1 addition & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -15,43 +15,4 @@ jobs:
1515
# replace "master" with any valid ref
1616
uses: ansible/ansible-lint-action@main
1717
with:
18-
# [required]
19-
# Paths to ansible files (i.e., playbooks, tasks, handlers etc..)
20-
# or valid Ansible directories according to the Ansible role
21-
# directory structure.
22-
# If you want to lint multiple ansible files, use the following syntax
23-
# targets: |
24-
# playbook_1.yml
25-
# playbook_2.yml
26-
targets: "roles/"
27-
# [optional]
28-
# Arguments to override a package and its version to be set explicitly.
29-
# Must follow the example syntax.
30-
# override-deps: |
31-
# ansible==2.9
32-
# ansible-lint==4.2.0
33-
override-deps: |
34-
rich>=9.5.1,<11.0.0
35-
# [optional]
36-
# Arguments to be passed to the ansible-lint
37-
38-
# Options:
39-
# -q quieter, although not silent output
40-
# -p parseable output in the format of pep8
41-
# --parseable-severity parseable output including severity of rule
42-
# -r RULESDIR specify one or more rules directories using one or
43-
# more -r arguments. Any -r flags override the default
44-
# rules in ansiblelint/rules, unless -R is also used.
45-
# -R Use default rules in ansiblelint/rules in addition to
46-
# any extra
47-
# rules directories specified with -r. There is no need
48-
# to specify this if no -r flags are used
49-
# -t TAGS only check rules whose id/tags match these values
50-
# -x SKIP_LIST only check rules whose id/tags do not match these
51-
# values
52-
# --nocolor disable colored output
53-
# --exclude=EXCLUDE_PATHS
54-
# path to directories or files to skip. This option is
55-
# repeatable.
56-
# -c C Specify configuration file to use. Defaults to ".ansible-lint"
57-
args: ""
18+
path: "roles/"

galaxy.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
---
12
namespace: devsec
23
name: hardening
34
version: 8.0.0

roles/mysql_hardening/meta/main.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,17 @@ galaxy_info:
88
platforms:
99
- name: EL
1010
versions:
11-
- 6
12-
- 7
11+
- "7"
12+
- "8"
1313
- name: Ubuntu
1414
versions:
15-
- xenial
1615
- bionic
16+
- focal
17+
- jammy
1718
- name: Debian
1819
versions:
19-
- jessie
20+
- bullseye
21+
- buster
2022
- name: Amazon
2123
- name: Fedora
2224
galaxy_tags:

roles/nginx_hardening/meta/main.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ galaxy_info:
88
platforms:
99
- name: EL
1010
versions:
11-
- 6
12-
- 7
11+
- "7"
12+
- "8"
1313
- name: Ubuntu
1414
versions:
15-
- xenial
1615
- bionic
16+
- focal
17+
- jammy
1718
- name: Debian
1819
versions:
19-
- stretch
2020
- buster
2121
- bullseye
2222
galaxy_tags:

roles/os_hardening/meta/main.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,22 @@ galaxy_info:
88
platforms:
99
- name: EL
1010
versions:
11-
- 7
12-
- 8
11+
- "7"
12+
- "8"
1313
- name: Ubuntu
1414
versions:
15-
- xenial
1615
- bionic
16+
- focal
17+
- jammy
1718
- name: Debian
1819
versions:
19-
- stretch
2020
- buster
2121
- bullseye
2222
- name: Amazon
2323
- name: Fedora
24-
- name: Archlinux
24+
- name: ArchLinux
2525
- name: SmartOS
26-
- name: openSUSE
26+
- name: opensuse
2727
galaxy_tags:
2828
- system
2929
- security

roles/os_hardening/tasks/minimize_access.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# also see: https://github.com/dev-sec/ansible-os-hardening/issues/219
77
- name: Find files with write-permissions for group
88
shell: "find -L {{ item }} -perm /go+w -type f" # noqa command-instead-of-shell
9-
with_flattened:
9+
with_community.general.flattened:
1010
- '/usr/local/sbin'
1111
- '/usr/local/bin'
1212
- '/usr/sbin'

roles/os_hardening/tasks/rhosts.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,3 @@
1515
file:
1616
dest: '/etc/hosts.equiv'
1717
state: 'absent'
18-

roles/os_hardening/tasks/suid_sgid.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
state: 'file'
77
follow: 'yes'
88
failed_when: false
9-
with_flattened:
9+
with_community.general.flattened:
1010
- '{{ os_security_suid_sgid_system_blacklist }}'
1111
- '{{ os_security_suid_sgid_blacklist }}'
1212

@@ -27,6 +27,6 @@
2727
mode: 'a-s'
2828
state: 'file'
2929
follow: 'yes'
30-
with_flattened:
30+
with_community.general.flattened:
3131
- '{{ suid | default([]) | difference(os_security_suid_sgid_whitelist) }}'
3232
when: os_security_suid_sgid_remove_from_unknown | bool

roles/os_hardening/tasks/user_accounts.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
shell: '{{ os_nologin_shell_path }}'
4444
password: '*'
4545
createhome: false
46-
with_flattened:
46+
with_community.general.flattened:
4747
- '{{ sys_accs_cond | default([]) | difference(os_ignore_users) | list }}'
4848

4949
- name: get all home directories in /home, but skip ignored users

roles/ssh_hardening/meta/main.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,22 @@ galaxy_info:
88
platforms:
99
- name: EL
1010
versions:
11-
- 7
12-
- 8
11+
- "7"
12+
- "8"
1313
- name: Ubuntu
1414
versions:
15-
- xenial
1615
- bionic
16+
- focal
17+
- jammy
1718
- name: Debian
1819
versions:
19-
- stretch
2020
- buster
21+
- bullseye
2122
- name: Amazon
2223
- name: Fedora
23-
- name: Archlinux
24+
- name: ArchLinux
2425
- name: SmartOS
25-
- name: openSUSE
26+
- name: opensuse
2627
galaxy_tags:
2728
- system
2829
- security

0 commit comments

Comments
 (0)