Skip to content

Commit 0741b75

Browse files
authored
Merge pull request #157 from dev-sec/defaults
move defaults to os-specific vars
2 parents c310e15 + 6d81e33 commit 0741b75

File tree

5 files changed

+39
-16
lines changed

5 files changed

+39
-16
lines changed

.travis.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,13 @@ env:
1515
version: latest
1616
init: /sbin/init
1717

18-
- distro: oracle7
19-
init: /usr/lib/systemd/systemd
20-
run_opts: "--privileged --volume=/sys/fs/cgroup:/sys/fs/cgroup:ro"
21-
version: latest
18+
# oracle 7 does not support ansible 2.4 yet
19+
# check oracle-epel if it is supported
20+
# http://yum.oracle.com/repo/OracleLinux/OL7/developer_EPEL/x86_64/index.html
21+
# - distro: oracle7
22+
# init: /usr/lib/systemd/systemd
23+
# run_opts: "--privileged --volume=/sys/fs/cgroup:/sys/fs/cgroup:ro"
24+
# version: latest
2225

2326
- distro: ubuntu1604
2427
version: latest

defaults/main.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
os_desktop_enable: false
22
os_env_extra_user_paths: []
3-
os_env_umask: '027'
43
os_auth_pw_max_age: 60
54
os_auth_pw_min_age: 7 # discourage password cycling
65
os_auth_retries: 5
@@ -11,12 +10,6 @@ os_auth_pam_passwdqc_enable: true
1110
os_auth_pam_passwdqc_options: 'min=disabled,disabled,16,12,8' # used in RHEL6
1211
os_auth_pam_pwquality_options: 'try_first_pass retry=3 type=' # used in RHEL7
1312
os_auth_root_ttys: [console, tty1, tty2, tty3, tty4, tty5, tty6]
14-
os_auth_uid_min: 1000
15-
os_auth_gid_min: 1000
16-
os_auth_sys_uid_min: 100
17-
os_auth_sys_uid_max: 999
18-
os_auth_sys_gid_min: 100
19-
os_auth_sys_gid_max: 999
2013

2114
os_chfn_restrict: ''
2215
# may contain: change_user

vars/Debian.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ os_nologin_shell_path: '/usr/sbin/nologin'
88
modprobe_package: 'kmod'
99

1010
# Different distros use different standards for /etc/shadow perms, e.g.
11-
# RHEL derivatives use root:root 0600, whereas Debian-based use root:shadow 0640.
11+
# RHEL derivatives use root:root 0000, whereas Debian-based use root:shadow 0640.
1212
# You must provide key/value pairs for owner, group, and mode if overriding.
1313
os_shadow_perms:
1414
owner: root
@@ -19,3 +19,12 @@ os_passwd_perms:
1919
owner: root
2020
group: root
2121
mode: '0644'
22+
23+
os_env_umask: '027'
24+
25+
os_auth_uid_min: 1000
26+
os_auth_gid_min: 1000
27+
os_auth_sys_uid_min: 100
28+
os_auth_sys_uid_max: 999
29+
os_auth_sys_gid_min: 100
30+
os_auth_sys_gid_max: 999

vars/Oracle Linux.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,23 @@ os_packages_pam_cracklib: 'pam_cracklib'
44
os_nologin_shell_path: '/sbin/nologin'
55

66
# Different distros use different standards for /etc/shadow perms, e.g.
7-
# RHEL derivatives use root:root 0600, whereas Debian-based use root:shadow 0640.
7+
# RHEL derivatives use root:root 0000, whereas Debian-based use root:shadow 0640.
88
# You must provide key/value pairs for owner, group, and mode if overriding.
99
os_shadow_perms:
1010
owner: root
1111
group: root
12-
mode: '0600'
12+
mode: '0000'
1313

1414
os_passwd_perms:
1515
owner: root
1616
group: root
1717
mode: '0644'
18+
19+
os_env_umask: '077'
20+
21+
os_auth_uid_min: 1000
22+
os_auth_gid_min: 1000
23+
os_auth_sys_uid_min: 201
24+
os_auth_sys_uid_max: 999
25+
os_auth_sys_gid_min: 201
26+
os_auth_sys_gid_max: 999

vars/RedHat.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,23 @@ os_packages_pam_cracklib: 'pam_cracklib'
88
os_nologin_shell_path: '/sbin/nologin'
99

1010
# Different distros use different standards for /etc/shadow perms, e.g.
11-
# RHEL derivatives use root:root 0600, whereas Debian-based use root:shadow 0640.
11+
# RHEL derivatives use root:root 0000, whereas Debian-based use root:shadow 0640.
1212
# You must provide key/value pairs for owner, group, and mode if overriding.
1313
os_shadow_perms:
1414
owner: root
1515
group: root
16-
mode: '0600'
16+
mode: '0000'
1717

1818
os_passwd_perms:
1919
owner: root
2020
group: root
2121
mode: '0644'
22+
23+
os_env_umask: '077'
24+
25+
os_auth_uid_min: 1000
26+
os_auth_gid_min: 1000
27+
os_auth_sys_uid_min: 201
28+
os_auth_sys_uid_max: 999
29+
os_auth_sys_gid_min: 201
30+
os_auth_sys_gid_max: 999

0 commit comments

Comments
 (0)