aboutsummaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
authorAaron LI <aly@aaronly.me>2018-04-11 00:04:35 +0800
committerAaron LI <aly@aaronly.me>2018-04-11 00:04:35 +0800
commit664426aa60f86491636e9a42249f480783d7595e (patch)
tree58bef5fd0a08a4845864c17f763a4a8d7bda48e7 /roles
parenteed95ea4f7c3edf5f2c221eac5eb23c1cf5cfb7d (diff)
downloadansible-dfly-vps-664426aa60f86491636e9a42249f480783d7595e.tar.bz2
radicale: setup git repo
Diffstat (limited to 'roles')
-rw-r--r--roles/radicale/tasks/main.yml22
1 files changed, 22 insertions, 0 deletions
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