Copied from the environment repository's local role. The files are identical except: galaxy namespace mortis; comments, the README and the guard failure messages scrubbed of environment references (issue numbers, playbooks, inventory groups, the caller role's fallback, history of the old vars/ files and of the variable renames), with the technical explanation kept; the README's run order now asks for the ansible_user key to be installed first instead of naming the environment's playbooks; the molecule scenario calls the role by its FQCN (mortis.kamino.sshd), follows the Kamino scenario conventions (kamino-molecule header, scenario.test_sequence) and no longer sets ANSIBLE_COLLECTIONS_PATH or ANSIBLE_ROLES_PATH. No variable, default, argument_specs type or task logic changed; the test coverage is the same. The role uses ansible.builtin only, so galaxy.yml's dependencies are unchanged. The README Roadmap no longer lists sshd. Not verified locally: the molecule scenario (it runs on the kamino-molecule runner in CI) and ansible-test sanity (runs on push). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01MmzvM9skAvYcph2c9EiPcm
17 lines
403 B
YAML
17 lines
403 B
YAML
---
|
|
- name: Ensure sshd config directory exists
|
|
become: true
|
|
ansible.builtin.file:
|
|
path: "{{ sshd_config_dir }}"
|
|
state: directory
|
|
mode: "0755"
|
|
|
|
- name: Install sshd hardening config
|
|
become: true
|
|
ansible.builtin.template:
|
|
src: 99-ansible-hardening.conf.j2
|
|
dest: "{{ sshd_config_dir }}/{{ sshd_dropin_file }}"
|
|
mode: "0644"
|
|
validate: sshd -t -f %s
|
|
notify: Restart SSH
|