diff --git a/dotfiles.yml b/dotfiles.yml new file mode 100644 index 0000000..ee71cf6 --- /dev/null +++ b/dotfiles.yml @@ -0,0 +1,15 @@ +--- + +- name: Set up development machine + hosts: localhost + roles: + - bash + #- dircolors + #- git + #- hushlogin + #- mintty + #- python + #- readline + #- ssh + #- tmux + #- vim diff --git a/hosts b/hosts new file mode 100644 index 0000000..f4687cf --- /dev/null +++ b/hosts @@ -0,0 +1,5 @@ +[local] +localhost + +[local:vars] +ansible_connection=local diff --git a/dotfiles/.config/bash/profile b/roles/bash/files/profile similarity index 100% rename from dotfiles/.config/bash/profile rename to roles/bash/files/profile diff --git a/roles/bash/tasks/.main.yml.swp b/roles/bash/tasks/.main.yml.swp new file mode 100644 index 0000000..80343ad Binary files /dev/null and b/roles/bash/tasks/.main.yml.swp differ diff --git a/roles/bash/tasks/main.yml b/roles/bash/tasks/main.yml new file mode 100644 index 0000000..5aed636 --- /dev/null +++ b/roles/bash/tasks/main.yml @@ -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