diff options
author | Aaron LI <aly@aaronly.me> | 2018-04-10 23:19:10 +0800 |
---|---|---|
committer | Aaron LI <aly@aaronly.me> | 2018-04-10 23:19:10 +0800 |
commit | d42ad1300b589b8e49093a024ebf24c111c33fbf (patch) | |
tree | 817e75bad457d20d693aa2aa2a3a8487bc1cacc4 /roles/radicale | |
parent | 87c6e2caf082fbc68b721b5384861b283c0d7582 (diff) | |
download | ansible-dfly-vps-d42ad1300b589b8e49093a024ebf24c111c33fbf.tar.bz2 |
radicale: add 'git' variable to toggle versioning with git
Diffstat (limited to 'roles/radicale')
-rw-r--r-- | roles/radicale/templates/config.j2 | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/roles/radicale/templates/config.j2 b/roles/radicale/templates/config.j2 index 182cad1..8b23cd8 100644 --- a/roles/radicale/templates/config.j2 +++ b/roles/radicale/templates/config.j2 @@ -65,9 +65,12 @@ type = owner_only type = multifilesystem filesystem_folder = {{ radicale.home }} +{% if radicale.git %} +{% set git = "/usr/local/bin/git" %} # Command that is run after changes to storage # See: http://radicale.org/versioning/ -hook = ([ -d .git ] || /usr/local/bin/git init) && /usr/local/bin/git add -A && (/usr/local/bin/git diff --cached --quiet || /usr/local/bin/git commit -m "Changes by %(user)s") +hook = ([ -d .git ] || {{git}} init) && {{git}} add -A && ({{git}} diff --cached --quiet || {{git}} commit -m "Changes by %(user)s") +{% endif %} # Web interface backend |