diff --git a/dotfiles.yml b/dotfiles.yml index 963ddac..7a19a57 100644 --- a/dotfiles.yml +++ b/dotfiles.yml @@ -6,6 +6,7 @@ xdg_cache_home: "~/.cache" xdg_data_home: "~/.local/share" roles: + - bin - bash - dircolors - git diff --git a/dotfiles/.local/bin/vboxmount b/roles/bin/files/vboxmount similarity index 100% rename from dotfiles/.local/bin/vboxmount rename to roles/bin/files/vboxmount diff --git a/roles/bin/tasks/main.yml b/roles/bin/tasks/main.yml new file mode 100644 index 0000000..8950d0d --- /dev/null +++ b/roles/bin/tasks/main.yml @@ -0,0 +1,15 @@ +--- +- name: Create local bin directory + file: + path: ~/.local/bin + state: directory + +- name: Deploy local commands + file: + src: "{{ item }}" + dest: "~/.local/bin/{{ item | basename }}" + state: link + force: yes + with_fileglob: + - ./* + diff --git a/dotfiles/.local/bin/git-churn b/roles/git/files/bin/git-churn similarity index 100% rename from dotfiles/.local/bin/git-churn rename to roles/git/files/bin/git-churn diff --git a/dotfiles/.local/bin/git-what-the-hell-just-happened b/roles/git/files/bin/git-what-the-hell-just-happened similarity index 100% rename from dotfiles/.local/bin/git-what-the-hell-just-happened rename to roles/git/files/bin/git-what-the-hell-just-happened diff --git a/dotfiles/.local/bin/git-wtf b/roles/git/files/bin/git-wtf similarity index 100% rename from dotfiles/.local/bin/git-wtf rename to roles/git/files/bin/git-wtf diff --git a/roles/git/tasks/main.yml b/roles/git/tasks/main.yml index 294c5e1..cb2727d 100644 --- a/roles/git/tasks/main.yml +++ b/roles/git/tasks/main.yml @@ -14,3 +14,17 @@ - config - ignore +- name: Create bin directory for additional git commands + file: + path: ~/.local/bin + state: directory + +- name: Deploy additional git commands + file: + src: "{{ item }}" + dest: "~/.local/bin/{{ item | basename }}" + state: link + force: yes + with_fileglob: + - ./bin/* +