Add bash role

This commit is contained in:
Fernando Schauenburg 2019-11-15 17:11:24 +00:00
parent f65c4858ab
commit 5be5f80179
5 changed files with 53 additions and 0 deletions

15
dotfiles.yml Normal file
View 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
View file

@ -0,0 +1,5 @@
[local]
localhost
[local:vars]
ansible_connection=local

Binary file not shown.

33
roles/bash/tasks/main.yml Normal file
View 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