54 lines
1.1 KiB
YAML
54 lines
1.1 KiB
YAML
- name: Install latest bash (Debian)
|
|
when: ansible_os_family == "Debian"
|
|
become: yes
|
|
apt:
|
|
name: "{{ item }}"
|
|
state: latest
|
|
update_cache: yes
|
|
loop:
|
|
- bash
|
|
- bash-completion
|
|
|
|
- name: Install latest bash (macOS)
|
|
when: ansible_os_family == "Darwin"
|
|
homebrew:
|
|
name: "{{ item }}"
|
|
state: latest
|
|
loop:
|
|
- bash
|
|
- bash-completion
|
|
|
|
- name: Remove pre-installed bash configurations which could cause conflicts
|
|
file:
|
|
state: absent
|
|
path: "~/.{{ item }}"
|
|
loop:
|
|
- bash_logout
|
|
- profile
|
|
|
|
- name: Ensure existence of directories used in bashrc
|
|
file:
|
|
path: "{{ item }}"
|
|
state: directory
|
|
loop:
|
|
- "~/.cache/bash"
|
|
- "~/.config/bash"
|
|
- "~/.local/share/bash-completion/completions"
|
|
- "~/.local/share/less"
|
|
|
|
- name: Deploy bash profile
|
|
file:
|
|
src: "{{ role_path }}/files/profile"
|
|
dest: ~/.config/bash/profile
|
|
state: link
|
|
force: yes
|
|
|
|
- name: Make sure bash will find our profile
|
|
file:
|
|
src: ~/.config/bash/profile
|
|
dest: "~/.{{ item }}"
|
|
state: link
|
|
force: yes
|
|
loop:
|
|
- bashrc
|
|
- bash_profile
|