Skip to content
Snippets Groups Projects
Commit 477b2b69 authored by jurgenhaas's avatar jurgenhaas
Browse files

ansible-inventories/arocom#197 Improve logging of git updates

parent 75c3dde5
Branches
No related tags found
No related merge requests found
......@@ -40,7 +40,7 @@
weekday='{{ drupal.src.cron.weekday|default(omit) }}'
hour='{{ drupal.src.cron.hour|default(omit) }}'
minute='{{ drupal.src.cron.minute|default(omit) }}'
job='{{ webRoot }}/.update >/dev/null 2>&1'
job='{{ webRoot }}/.update >>{{ webRoot }}/../log/git-update.log 2>&1'
user='root'
when: drupal.src.cron is defined
......
#!/usr/bin/env bash
echo '>> {{ apacheUser }}'
date
{% set path=[webRoot, drupal.src.git.target2|default(drupal.src.git.target)]|join('') %}
cd {{ path }}
echo '> chown/chmod'
chown -R {{ apacheUser }}:{{ apacheUser }} {{ path }}
chmod -R g+w {{ path }}
echo '> git fetch'
git fetch origin
if [ -f 'ansible.sh' ]; then
echo '> ansible.sh'
./ansible.sh
fi
echo 'git pull'
git pull origin master
if [ -f 'ansible.patch' ]; then
echo '> ansible.patch'
patch -p1 -N < ansible.patch
fi
echo '> chown/chmod'
chown -R {{ apacheUser }}:{{ apacheUser }} {{ path }}
chmod -R ug+r,ug-w,o-w,o-r {{ path }}
if [ -d '{{ webRoot }}{{ drupal.configRoot|default("/config") }}' ]; then
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment