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
Compare revisions
ea4be358769f2d6e7cf601520354adcf3c34268f to 7a6a69eba60124ab96f58d1ece32c5034a539977
Compare revisions
Changes are shown as if the
source
revision was being merged into the
target
revision.
Learn more about comparing revisions.
Source
ansible/roles/drupal
Select target project
No results found
7a6a69eba60124ab96f58d1ece32c5034a539977
Select Git revision
Swap
Target
ansible/roles/drupal
Select target project
ansible/roles/drupal
max/drupal
ericzillmann/drupal
3 results
ea4be358769f2d6e7cf601520354adcf3c34268f
Select Git revision
Show changes
Only incoming changes from source
Include changes to target since source was created
Compare
Commits on Source (1)
gitlab-ci-cd/drupal#12
Add optional tasks to reset locales after a Drupal site deployment
· 7a6a69eb
jurgenhaas
authored
4 years ago
7a6a69eb
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
defaults/main.yml
+1
-0
1 addition, 0 deletions
defaults/main.yml
tasks/install.yml
+9
-0
9 additions, 0 deletions
tasks/install.yml
tasks/main.yml
+1
-0
1 addition, 0 deletions
tasks/main.yml
tasks/reset-locale.yml
+41
-0
41 additions, 0 deletions
tasks/reset-locale.yml
with
52 additions
and
0 deletions
defaults/main.yml
View file @
7a6a69eb
...
...
@@ -24,6 +24,7 @@ drupal_post_deploy_tasks:
-
updatedb
-
config-import sync
-
dev-modules {{ (drupal.dev_mode|default(false))|ternary("on","off") }}
-
php:eval "node_access_rebuild();"
-
sset system.maintenance_mode
0
-
cache-rebuild
...
...
This diff is collapsed.
Click to expand it.
tasks/install.yml
View file @
7a6a69eb
...
...
@@ -390,6 +390,7 @@
changed_when
:
no
tags
:
-
deploy
-
reset-locale
-
name
:
Post Deploy Tasks
include_tasks
:
deploy/post-tasks.yml
...
...
@@ -398,3 +399,11 @@
loop_var
:
drupal_domain
tags
:
-
deploy
-
name
:
Reset Locale
include_tasks
:
reset-locale.yml
with_items
:
'
{{
drupal.domains
}}'
loop_control
:
loop_var
:
drupal_domain
tags
:
-
reset-locale
This diff is collapsed.
Click to expand it.
tasks/main.yml
View file @
7a6a69eb
...
...
@@ -36,6 +36,7 @@
-
deploy
-
SetPermissions
-
mysql
-
reset-locale
-
name
:
Install HAProxy redirects collector
include_tasks
:
haproxy_redirects_collector.yml
...
...
This diff is collapsed.
Click to expand it.
tasks/reset-locale.yml
0 → 100644
View file @
7a6a69eb
---
# file: roles/drupal/tasks/reset-locale.yml
-
block
:
-
name
:
Set default facts
set_fact
:
drushAlias
:
'
@{{
drupal.id
}}.{{
drupal_domain.shortname|default("default")
}}'
drushAliasValidate
:
"
'@{{
drupal.id
}}.{{
drupal_domain.shortname|default('default')
}}':"
-
name
:
Set facts for Drush
8
set_fact
:
drushAlias
:
'
@{{
inventory_hostname
}}{{
drushSubkey
}}.{{
drupal_domain.shortname|default("default")
}}'
drushAliasValidate
:
'
@{{
inventory_hostname
}}{{
drushSubkey
}}.{{
drupal_domain.shortname|default("default")
}}'
when
:
drush_version_main|default('8') == '8'
-
name
:
Reset locale
shell
:
drush -y {{ drushAlias }} {{ item }}
args
:
chdir
:
'
{{
webRoot
}}'
with_items
:
-
sql:query "truncate locales_location;"
-
sql:query "truncate locales_source;"
-
sql:query "truncate locales_target;"
-
sql:query "truncate locale_file;"
-
sql:query "delete from key_value where collection='locale.translation_status';"
-
sdel locale.translation_last_checked
-
locale:check
-
locale:update
changed_when
:
no
when
:
drushAliasValidate in drush_aliases.stdout_lines
-
name
:
Import extra locale files
shell
:
drush -y {{ drushAlias }} locale:import {{ item.lang }} {{ item.file }} --type=custom --override=all
args
:
chdir
:
'
{{
webRoot
}}'
with_items
:
'
{{
drupal_domain.extra_locales|default([])
}}'
changed_when
:
no
when
:
drushAliasValidate in drush_aliases.stdout_lines
tags
:
-
reset-locale
This diff is collapsed.
Click to expand it.