feat(ansible): add linux-baseline role and day0_linux_baseline playbook

Introduces a single, idempotent baseline role to supersede the
overlapping day0-baseline and common roles. Capabilities are
feature-flagged so they can be toggled per-host:

  - packages (common + OS-family + per-host extras)
  - timezone + locale
  - chrony time sync against sundial
  - baseline users (jarvis admin account with SSH key + NOPASSWD sudo)
  - SSH hardening via /etc/ssh/sshd_config.d/ drop-in
  - unattended security upgrades (Debian family)
  - sysctl drop-in at /etc/sysctl.d/99-mk-labs.conf
  - journald retention caps
  - branded MOTD

Ubuntu/Debian is first-class; vars/RedHat.yml provides a placeholder
for future distros via the ansible_os_family pattern.

The legacy day0-baseline and common roles remain in place for now and
will be removed during the playbook cleanup sweep, alongside the
existing playbook naming inconsistencies.
This commit is contained in:
Hermes Agent service account
2026-05-29 20:40:04 -05:00
parent 1dfa7889ab
commit 91b5817e5f
25 changed files with 741 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
---
- name: Restart chrony
ansible.builtin.systemd:
name: "{{ baseline_chrony_service }}"
state: restarted
- name: Restart sshd
ansible.builtin.systemd:
name: "{{ baseline_sshd_service }}"
state: restarted
- name: Reload sysctl
ansible.builtin.command:
cmd: sysctl --system
changed_when: false
- name: Restart systemd-journald
ansible.builtin.systemd:
name: systemd-journald
state: restarted