ansible: fix bash role syntax for consistency
This commit is contained in:
parent
ce68613438
commit
3d626c4ee0
1 changed files with 36 additions and 33 deletions
|
@ -1,40 +1,42 @@
|
|||
- name: Install latest bash (Debian)
|
||||
- name: Install latest bash with apt
|
||||
when: ansible_os_family == "Debian"
|
||||
become: yes
|
||||
apt:
|
||||
name: "{{ item }}"
|
||||
state: latest
|
||||
update_cache: yes
|
||||
loop:
|
||||
state: latest
|
||||
name:
|
||||
- bash
|
||||
- bash-completion
|
||||
|
||||
- name: Install latest bash (macOS)
|
||||
|
||||
- name: Install latest bash with homebrew
|
||||
when: ansible_os_family == "Darwin"
|
||||
homebrew:
|
||||
name: "{{ item }}"
|
||||
state: latest
|
||||
loop:
|
||||
name:
|
||||
- bash
|
||||
- bash-completion
|
||||
|
||||
|
||||
- name: Remove pre-installed bash configurations which could cause conflicts
|
||||
file:
|
||||
path: ~/{{ item }}
|
||||
state: absent
|
||||
path: "~/.{{ item }}"
|
||||
loop:
|
||||
- bash_logout
|
||||
- profile
|
||||
- .bash_logout
|
||||
- .profile
|
||||
|
||||
|
||||
- name: Ensure existence of directories used in bashrc
|
||||
file:
|
||||
path: "{{ item }}"
|
||||
path: ~/{{ item }}
|
||||
state: directory
|
||||
loop:
|
||||
- "~/.config/bash"
|
||||
- "~/.local/share/bash"
|
||||
- "~/.local/share/bash-completion/completions"
|
||||
- "~/.local/share/less"
|
||||
- .config/bash
|
||||
- .local/share/bash
|
||||
- .local/share/bash-completion/completions
|
||||
- .local/share/less
|
||||
|
||||
|
||||
- name: Deploy bash profile
|
||||
file:
|
||||
|
@ -43,12 +45,13 @@
|
|||
state: link
|
||||
force: yes
|
||||
|
||||
|
||||
- name: Make sure bash will find our profile
|
||||
file:
|
||||
src: ~/.config/bash/profile
|
||||
dest: "~/.{{ item }}"
|
||||
dest: ~/.{{ item }}
|
||||
state: link
|
||||
force: yes
|
||||
loop:
|
||||
- bashrc
|
||||
- bash_profile
|
||||
- .bashrc
|
||||
- .bash_profile
|
||||
|
|
Loading…
Add table
Reference in a new issue