toansible: Use lineinfile for bash rc files
This commit is contained in:
parent
3b2a441320
commit
55237f8a58
3 changed files with 9 additions and 3 deletions
|
@ -13,12 +13,18 @@
|
||||||
- bash-completion
|
- bash-completion
|
||||||
when: ansible_distribution == 'Debian'
|
when: ansible_distribution == 'Debian'
|
||||||
|
|
||||||
- name: Copy files
|
- name: Copy rc files
|
||||||
copy: src={{ item.src }} dest={{ item.dest }} backup=true
|
copy: src={{ item.src }} dest={{ item.dest }} backup=true
|
||||||
with_items:
|
with_items:
|
||||||
- { src: 'inputrc', dest: '~/.inputrc' }
|
- { src: 'inputrc', dest: '~/.inputrc' }
|
||||||
- { src: 'bash_profile', dest: '~/.bash_profile' }
|
- { src: 'bash_profile.ansible', dest: '~/.bash_profile.ansible' }
|
||||||
- { src: 'bashrc', dest: '~/.bashrc' }
|
- { src: 'bashrc.ansible', dest: '~/.bashrc.ansible' }
|
||||||
|
|
||||||
|
- name: Source rc.ansible files
|
||||||
|
lineinfile: path={{ item.path }} line={{ item.line }} create=true insertbefore=BOF
|
||||||
|
with_items:
|
||||||
|
- { path: '~/.bashrc', line: '. "$HOME"/.bashrc.ansible' }
|
||||||
|
- { path: '~/.bash_profile', line: '. "$HOME"/.bash_profile.ansible' }
|
||||||
|
|
||||||
- name: Clone bash-git-prompt
|
- name: Clone bash-git-prompt
|
||||||
git:
|
git:
|
||||||
|
|
Loading…
Add table
Reference in a new issue