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"
|
when: ansible_os_family == "Debian"
|
||||||
become: yes
|
become: yes
|
||||||
apt:
|
apt:
|
||||||
name: "{{ item }}"
|
|
||||||
state: latest
|
|
||||||
update_cache: yes
|
update_cache: yes
|
||||||
loop:
|
state: latest
|
||||||
|
name:
|
||||||
- bash
|
- bash
|
||||||
- bash-completion
|
- bash-completion
|
||||||
|
|
||||||
- name: Install latest bash (macOS)
|
|
||||||
|
- name: Install latest bash with homebrew
|
||||||
when: ansible_os_family == "Darwin"
|
when: ansible_os_family == "Darwin"
|
||||||
homebrew:
|
homebrew:
|
||||||
name: "{{ item }}"
|
|
||||||
state: latest
|
state: latest
|
||||||
loop:
|
name:
|
||||||
- bash
|
- bash
|
||||||
- bash-completion
|
- bash-completion
|
||||||
|
|
||||||
|
|
||||||
- name: Remove pre-installed bash configurations which could cause conflicts
|
- name: Remove pre-installed bash configurations which could cause conflicts
|
||||||
file:
|
file:
|
||||||
|
path: ~/{{ item }}
|
||||||
state: absent
|
state: absent
|
||||||
path: "~/.{{ item }}"
|
|
||||||
loop:
|
loop:
|
||||||
- bash_logout
|
- .bash_logout
|
||||||
- profile
|
- .profile
|
||||||
|
|
||||||
|
|
||||||
- name: Ensure existence of directories used in bashrc
|
- name: Ensure existence of directories used in bashrc
|
||||||
file:
|
file:
|
||||||
path: "{{ item }}"
|
path: ~/{{ item }}
|
||||||
state: directory
|
state: directory
|
||||||
loop:
|
loop:
|
||||||
- "~/.config/bash"
|
- .config/bash
|
||||||
- "~/.local/share/bash"
|
- .local/share/bash
|
||||||
- "~/.local/share/bash-completion/completions"
|
- .local/share/bash-completion/completions
|
||||||
- "~/.local/share/less"
|
- .local/share/less
|
||||||
|
|
||||||
|
|
||||||
- name: Deploy bash profile
|
- name: Deploy bash profile
|
||||||
file:
|
file:
|
||||||
|
@ -43,12 +45,13 @@
|
||||||
state: link
|
state: link
|
||||||
force: yes
|
force: yes
|
||||||
|
|
||||||
|
|
||||||
- name: Make sure bash will find our profile
|
- name: Make sure bash will find our profile
|
||||||
file:
|
file:
|
||||||
src: ~/.config/bash/profile
|
src: ~/.config/bash/profile
|
||||||
dest: "~/.{{ item }}"
|
dest: ~/.{{ item }}
|
||||||
state: link
|
state: link
|
||||||
force: yes
|
force: yes
|
||||||
loop:
|
loop:
|
||||||
- bashrc
|
- .bashrc
|
||||||
- bash_profile
|
- .bash_profile
|
||||||
|
|
Loading…
Add table
Reference in a new issue