feat(role): Initial commit

This commit is contained in:
2025-04-02 02:39:25 +02:00
parent 523022da40
commit d72ad298b2
14 changed files with 177 additions and 9 deletions

View File

@@ -0,0 +1,15 @@
# SPDX-License-Identifier: MIT
- name: 'For local account ''{{ local_account }}'' get list of bash include files'
changed_when: false
register: 'bashcon_canonical_bashrc_includes_actual'
ansible.builtin.shell: |
ls -1 {% if local_account != 'root' %}/home{% endif %}/{{ local_account }}/.config/bash/bashrc-includes.d
- name: 'For local account ''{{ local_account }}'' delete unneeded bash include files'
when: 'item not in bashcon_canonical_bashrc_includes_desired'
loop_control:
label: 'If unneeded delete bashrc include file ''{{ item }}'''
loop: '{{ bashcon_canonical_bashrc_includes_actual.stdout_lines }}'
ansible.builtin.file:
path: '{% if local_account != ''root'' %}/home{% endif %}/{{ local_account }}/.config/bash/bashrc-includes.d/{{ item }}'
state: 'absent'