Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
drupal
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Ansible
Roles
drupal
Commits
477b2b69
Commit
477b2b69
authored
8 years ago
by
jurgenhaas
Browse files
Options
Downloads
Patches
Plain Diff
ansible-inventories/arocom#197 Improve logging of git updates
parent
75c3dde5
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tasks/users/gitscript.yml
+1
-1
1 addition, 1 deletion
tasks/users/gitscript.yml
templates/scripts/update/gitscript
+14
-0
14 additions, 0 deletions
templates/scripts/update/gitscript
with
15 additions
and
1 deletion
tasks/users/gitscript.yml
+
1
−
1
View file @
477b2b69
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
templates/scripts/update/gitscript
+
14
−
0
View file @
477b2b69
#!/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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment