From 664426aa60f86491636e9a42249f480783d7595e Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Wed, 11 Apr 2018 00:04:35 +0800 Subject: radicale: setup git repo --- roles/radicale/tasks/main.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/roles/radicale/tasks/main.yml b/roles/radicale/tasks/main.yml index a39a50c..4350c33 100644 --- a/roles/radicale/tasks/main.yml +++ b/roles/radicale/tasks/main.yml @@ -17,6 +17,28 @@ group: radicale mode: 0700 +- name: initialize git repo + become_user: radicale + command: git init + args: + chdir: "{{ radicale.home }}" + creates: "{{ radicale.home }}/.git" + when: radicale.git + +- name: config git user name + become_user: radicale + command: git config user.name Radicale + args: + chdir: "{{ radicale.home }}" + when: radicale.git + +- name: config git user email + become_user: radicale + command: git config user.email radicale@localhost + args: + chdir: "{{ radicale.home }}" + when: radicale.git + - name: generate config file template: src: config.j2 -- cgit v1.2.2