From e9133534c4c79e7a56d6a02aade20fa0aca8c959 Mon Sep 17 00:00:00 2001 From: Fernando Schauenburg Date: Fri, 15 Nov 2019 20:02:19 +0000 Subject: [PATCH] Add git role --- dotfiles.yml | 2 +- {dotfiles/.config/git => roles/git/files}/config | 0 {dotfiles/.config/git => roles/git/files}/ignore | 0 roles/git/tasks/main.yml | 16 ++++++++++++++++ 4 files changed, 17 insertions(+), 1 deletion(-) rename {dotfiles/.config/git => roles/git/files}/config (100%) rename {dotfiles/.config/git => roles/git/files}/ignore (100%) create mode 100644 roles/git/tasks/main.yml diff --git a/dotfiles.yml b/dotfiles.yml index fc70638..963ddac 100644 --- a/dotfiles.yml +++ b/dotfiles.yml @@ -8,7 +8,7 @@ roles: - bash - dircolors - #- git + - git - hushlogin - mintty - python diff --git a/dotfiles/.config/git/config b/roles/git/files/config similarity index 100% rename from dotfiles/.config/git/config rename to roles/git/files/config diff --git a/dotfiles/.config/git/ignore b/roles/git/files/ignore similarity index 100% rename from dotfiles/.config/git/ignore rename to roles/git/files/ignore diff --git a/roles/git/tasks/main.yml b/roles/git/tasks/main.yml new file mode 100644 index 0000000..294c5e1 --- /dev/null +++ b/roles/git/tasks/main.yml @@ -0,0 +1,16 @@ +--- +- name: Create the git config directory + file: + path: ~/.config/git + state: directory + +- name: Deploy git config + file: + src: "{{ role_path }}/files/{{ item }}" + dest: "~/.config/git/{{ item }}" + state: link + force: yes + loop: + - config + - ignore +