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
2155cad4
Commit
2155cad4
authored
4 years ago
by
jurgenhaas
Browse files
Options
Downloads
Patches
Plain Diff
Finalize script drupal-data-copy
parent
a57217ae
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tasks/copy_data/main.yml
+28
-34
28 additions, 34 deletions
tasks/copy_data/main.yml
with
28 additions
and
34 deletions
tasks/copy_data/main.yml
+
28
−
34
View file @
2155cad4
...
...
@@ -3,43 +3,37 @@
-
block
:
-
name
:
Set facts without jails
set_fact
:
webRoot
:
/var/www{{ drupal.webRoot|default("") }}
cronUser
:
root
apacheUser
:
www-data
apacheLogDir
:
/var/log/apache2
drushSubkey
:
'
{{
drupal.drush_subkey|default("")
}}'
when
:
drupal.jail is not defined
-
name
:
Set facts without jails
set_fact
:
webRoot
:
/var/www{{ drupal.webRoot|default("") }}
apacheUser
:
www-data
when
:
drupal.jail is not defined
-
name
:
Set facts with jails
set_fact
:
webRoot
:
'
{{
jailroot
}}/{{
drupal.jail.name
}}/var/www{{
drupal.webRoot|default("")
}}'
cronUser
:
'
{{
drupal.jail.name
}}'
apacheUser
:
'
{{
drupal.jail.name
}}'
apacheLogDir
:
'
{{
jailroot
}}/{{
drupal.jail.name
}}/var/log/apache2'
drushSubkey
:
.{{ drupal.jail.name }}
when
:
drupal.jail is defined
-
name
:
Set facts with jails
set_fact
:
webRoot
:
'
{{
jailroot
}}/{{
drupal.jail.name
}}/var/www{{
drupal.webRoot|default("")
}}'
apacheUser
:
'
{{
drupal.jail.name
}}'
when
:
drupal.jail is defined
-
name
:
Execute Drush Commands
shell
:
drush -y {{ item }}
args
:
chdir
:
'
{{
webRoot
}}'
with_items
:
-
sql:sync --create-db @{{ drupal.id }}.{{ branch }} @{{ drupal.id }}.{{ destination_branch }}
-
rsync @{{ drupal.id }}.{{ branch }}:%files/ @{{ drupal.id }}.{{ destination_branch }}:%files -- --chown={{ apacheUser }}:{{ apacheUser }} --safe-links
--max-size=20M
-
c
r
-
updatedb
-
config-import sync
-
name
:
Execute Drush Commands
shell
:
drush -y {{ item }}
args
:
chdir
:
'
{{
webRoot
}}'
with_items
:
-
sql:sync --create-db @{{ drupal.id }}
_stages
.{{ branch }} @{{ drupal.id }}
_stages
.{{ destination_branch }}
-
rsync @{{ drupal.id }}
_stages
.{{ branch }}:%files/ @{{ drupal.id }}
_stages
.{{ destination_branch }}:%files -- --chown={{ apacheUser }}:{{ apacheUser }} --safe-links
-
c
ache-rebuild
-
updatedb
-
config-import sync
-
name
:
Set files ownership
file
:
path
:
'
{{
webRoot
}}/files'
owner
:
'
{{
apacheUser
}}'
group
:
'
{{
apacheUser
}}'
mode
:
ug+rw
recurse
:
yes
follow
:
no
-
name
:
Set files ownership
file
:
path
:
'
{{
webRoot
}}/files'
owner
:
'
{{
apacheUser
}}'
group
:
'
{{
apacheUser
}}'
mode
:
ug+rw
recurse
:
yes
follow
:
no
tags
:
-
copy_db_and_assets
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