Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arch support #303

Merged
merged 2 commits into from
Aug 22, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .kitchen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,15 @@ platforms:
- sed -i '/systemd/d' /etc/pam.d/common-session
- systemctl enable sshd.service

- name: arch-ansible-latest
driver:
image: rndmh3ro/docker-arch-ansible:latest
platform: arch
run_command: /usr/lib/systemd/systemd
provision_command:
- sed -i '/nologin/d' /etc/pam.d/sshd
- systemctl enable sshd.service

verifier:
name: inspec
sudo: true
Expand Down
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ env:
init=/lib/systemd/systemd
- distro=opensuse_tumbleweed
run_opts="--privileged"
- distro=arch
init=/usr/lib/systemd/systemd
run_opts="--privileged"

before_install:
# Pull container
Expand Down
1 change: 1 addition & 0 deletions meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ galaxy_info:
- name: Amazon
- name: Fedora
- name: openSUSE
- name: ArchLinux
galaxy_tags:
- system
- security
Expand Down
7 changes: 6 additions & 1 deletion tasks/pam.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
package:
name: '{{ os_packages_pam_ccreds }}'
state: 'absent'
when:
- ansible_facts.os_family != 'Archlinux'

- name: remove pam_cracklib, because it does not play nice with passwdqc
apt:
Expand Down Expand Up @@ -121,7 +123,9 @@
- name: Gather package facts
package_facts:
manager: auto
when: ansible_facts.os_family != 'Suse'
when:
- ansible_facts.os_family != 'Suse'
- ansible_facts.os_family != 'Archlinux'

- name: NSA 2.3.3.5 Upgrade Password Hashing Algorithm to SHA-512
template:
Expand All @@ -132,4 +136,5 @@
group: 'root'
when:
- ansible_facts.os_family != 'Suse'
- ansible_facts.os_family != 'Archlinux'
- "'libuser' in ansible_facts.packages"
1 change: 1 addition & 0 deletions tasks/sysctl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
owner: 'root'
group: 'root'
mode: '0440'
state: touch

- name: set Daemon umask, do config for rhel-family | NSA 2.2.4.1
template:
Expand Down
5 changes: 5 additions & 0 deletions tests/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,13 @@
- name: install required tools on SuSE
shell: "zypper -n install python-xml"
when: ansible_facts.os_family == 'Suse'
- name: install required tools on arch
pacman:
name: awk
when: ansible_facts.os_family == 'Archlinux'
- name: create recursing symlink to test minimize access
shell: "rm -f /usr/bin/zzz && ln -s /usr/bin /usr/bin/zzz"

vars:
os_security_users_allow: change_user
os_security_kernel_enable_core_dump: true
Expand Down
25 changes: 25 additions & 0 deletions vars/Archlinux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---

os_nologin_shell_path: '/sbin/nologin'

os_shadow_perms:
owner: root
group: root
mode: '0600'

os_passwd_perms:
owner: root
group: root
mode: '0644'

os_env_umask: '027'

os_auth_uid_min: 1000
os_auth_gid_min: 1000
os_auth_sys_uid_min: 500
os_auth_sys_uid_max: 999
os_auth_sys_gid_min: 500
os_auth_sys_gid_max: 999

modprobe_package: 'kmod'
auditd_package: 'audit'