From 5be5f80179534b96e8cb2aa1a21d50c9a2d3f355 Mon Sep 17 00:00:00 2001 From: Fernando Schauenburg Date: Fri, 15 Nov 2019 17:11:24 +0000 Subject: [PATCH] Add bash role --- dotfiles.yml | 15 ++++++++ hosts | 5 +++ .../.config/bash => roles/bash/files}/profile | 0 roles/bash/tasks/.main.yml.swp | Bin 0 -> 12288 bytes roles/bash/tasks/main.yml | 33 ++++++++++++++++++ 5 files changed, 53 insertions(+) create mode 100644 dotfiles.yml create mode 100644 hosts rename {dotfiles/.config/bash => roles/bash/files}/profile (100%) create mode 100644 roles/bash/tasks/.main.yml.swp create mode 100644 roles/bash/tasks/main.yml 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 0000000000000000000000000000000000000000..80343adb9a52f0e51b9f12f5d13d5025be0776ec GIT binary patch literal 12288 zcmeI2KW`H;7>D07g4*)u17O0+l2b0{$o930s+5@x#?DYLrGAO!WQYZ^yGB*-RqwpPp3F(J-)Xq+RYt8yGZol)4RRr zKey@5d7=Z^GqQAkS?W?XtX3Ha6P-Cerp}C+)z-Lz$P& z@vvB4g-6%`8(7&u<+7-~Nw;q9wEVl*8`s2@%a2wr!!NJ_Hoykh02^QfY=8~00XDF{ z2Ha?ao+AFau!O7Oy0LH#w|rp(Y=8~00XDz}*Z><~18jf|umLu}2G-DkOo=XR5}gA7 z|Nrd!|Hn4b2k;iW0w>@Fn1B*I0ej#!xB)JK?^{IQz-RCgyadm{A;^FNZO{T+;49|* z0^Wl+;5C@$SVNB-nGLW3Hoykh02^QfY=8~00XFde2E=@egg+&{KQh{%oThrP?lfK8 z7Fv%wp*z#2t2$z=Z0N8~I&>6yIS4(evaTZ<$8q!MNaRip#bnZ$J#D%jff1bR&hlP; zI{R#1KYfQHQOY4o?#h7@wlZoOPaNh&A+o$og|3X4y|ikqrE?23>(e!m+MgZYA4%6o z^te7w9wzh)nU8rNE3XqSWC~`|+^DY8W*nmWvWpJ>Dtgx_Xcev>7GL`kXSG7H=(h+l zZGY^VzYjZG=$@_|&F^HLW63tvn<^8la7ce~#Shg`A1INkOjd=f*Ioy#jC8p!Ek#j8 FzW~pk@Ff5M literal 0 HcmV?d00001 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