Add bash role
This commit is contained in:
parent
f65c4858ab
commit
5be5f80179
5 changed files with 53 additions and 0 deletions
15
dotfiles.yml
Normal file
15
dotfiles.yml
Normal file
|
@ -0,0 +1,15 @@
|
|||
---
|
||||
|
||||
- name: Set up development machine
|
||||
hosts: localhost
|
||||
roles:
|
||||
- bash
|
||||
#- dircolors
|
||||
#- git
|
||||
#- hushlogin
|
||||
#- mintty
|
||||
#- python
|
||||
#- readline
|
||||
#- ssh
|
||||
#- tmux
|
||||
#- vim
|
5
hosts
Normal file
5
hosts
Normal file
|
@ -0,0 +1,5 @@
|
|||
[local]
|
||||
localhost
|
||||
|
||||
[local:vars]
|
||||
ansible_connection=local
|
BIN
roles/bash/tasks/.main.yml.swp
Normal file
BIN
roles/bash/tasks/.main.yml.swp
Normal file
Binary file not shown.
33
roles/bash/tasks/main.yml
Normal file
33
roles/bash/tasks/main.yml
Normal file
|
@ -0,0 +1,33 @@
|
|||
---
|
||||
- name: Remove pre-installed bash configurations which could cause conflicts
|
||||
file:
|
||||
state: absent
|
||||
path: "~/.{{ item }}"
|
||||
loop:
|
||||
- bash_logout
|
||||
- profile
|
||||
|
||||
- name: Create the bash cache and config directories
|
||||
file:
|
||||
path: "~/.{{ item }}/bash"
|
||||
state: directory
|
||||
loop:
|
||||
- cache
|
||||
- config
|
||||
|
||||
- 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
|
Loading…
Add table
Reference in a new issue