added modular bash command-picker

This commit is contained in:
2026-10-03 16:56:55 -06:00
parent 681efc10f8
commit 0a284d08bc
5 changed files with 87 additions and 8 deletions
+43
View File
@@ -0,0 +1,43 @@
- name: Create .bashrc.d directory
file:
path: /home/robert/.bashrc.d
state: directory
owner: robert
group: robert
mode: '0755'
- name: Install command picker
copy:
src: files/command-picker/command-picker.sh
dest: /home/robert/.bashrc.d/command-picker.sh
owner: robert
group: robert
mode: '0644'
- name: Create commands directory
file:
path: /home/robert/.config/commands
state: directory
owner: robert
group: robert
mode: '0755'
- name: Install Linux command library
copy:
src: files/command-picker/linux.txt
dest: /home/robert/.config/commands/linux.txt
owner: robert
group: robert
mode: '0644'
- name: Add .bashrc.d loader to .bashrc
blockinfile:
path: /home/robert/.bashrc
marker: "# {mark} ANSIBLE MANAGED COMMAND PICKER"
block: |
# Load Bash configuration snippets
if [ -d "$HOME/.bashrc.d" ]; then
for file in "$HOME/.bashrc.d/"*.sh; do
[ -r "$file" ] && . "$file"
done
fi