refactor: use the yml extension for every yaml file
Lint Markdown files / markdown-lint (push) Successful in 14s
Molecule / Molecule (push) Successful in 5m19s
Ansible Linter / ansible-lint (push) Successful in 4m22s

The repository mixed both extensions, the molecule scenario used yml while the role itself used yaml. The yml
extension is the one ansible-galaxy and molecule generate, so it is applied throughout and across the sibling roles.

The include_tasks calls in tasks/main.yml and tasks/create_unix_user.yml name their target explicitly and were
adjusted accordingly, otherwise the role would no longer find the included task files.

Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
2026-09-10 22:06:43 +02:00
co-authored by Copilot
parent e580de5e4c
commit afd4288ebd
15 changed files with 6 additions and 6 deletions
+32
View File
@@ -0,0 +1,32 @@
---
- name: "Determine shell rc directory"
ansible.builtin.set_fact:
# path_join examples: https://docs.ansible.com/ansible/latest/collections/ansible/builtin/path_join_filter.html#examples
_shell_rc_file: "{{ (_unix_users_home, '.bashrc.d', shell_rc_file.file) | path_join }}"
- name: "Create shell rc directory: {{ _shell_rc_file | dirname }}"
ansible.builtin.file:
path: "{{ _shell_rc_file | dirname }}"
owner: "{{ unix_user.key }}"
group: "{{ unix_user.value.group | default('users') }}"
mode: "0755"
state: "directory"
- name: "Create shell rc file: {{ _shell_rc_file }}"
ansible.builtin.template:
src: shell_rc_file.j2
dest: "{{ _shell_rc_file }}"
owner: "{{ unix_user.key }}"
group: "{{ unix_user.value.group | default('users') }}"
mode: "0644"
- name: "Source shell rc file: {{ _shell_rc_file }}"
ansible.builtin.lineinfile:
path: "{{ _unix_users_home }}/.bashrc"
line: "source \"{{ _shell_rc_file }}\""
create: true
owner: "{{ unix_user.key }}"
group: "{{ unix_user.value.group | default('users') }}"
mode: "0644"
state: "present"