Files
ansible_pull_master/tasks/command-picker.yml
T

44 lines
1.0 KiB
YAML

- 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