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
78f67e88
Commit
78f67e88
authored
7 years ago
by
jurgenhaas
Browse files
Options
Downloads
Patches
Plain Diff
Implement checks for config export to make sure it doesn't fail
parent
ca3fc237
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tasks/collect_config/gitcomposer.yml
+36
-25
36 additions, 25 deletions
tasks/collect_config/gitcomposer.yml
tasks/collect_config/main.yml
+31
-22
31 additions, 22 deletions
tasks/collect_config/main.yml
with
67 additions
and
47 deletions
tasks/collect_config/gitcomposer.yml
+
36
−
25
View file @
78f67e88
---
# file: roles/drupal/tasks/config_collect/gitcomposer.yml
-
name
:
"
File
Modes
and
Ownership
for
Repository"
file
:
path
:
'
{{
webRoot
}}/.git'
state
:
'
directory'
owner
:
'
root'
group
:
'
root'
mode
:
'
u+rwX,g+rwX,o+rX'
recurse
:
yes
-
name
:
"
Commit
and
push
files"
shell
:
'
git
{{
item
}}'
-
name
:
"
Check
Git
Status"
shell
:
'
git
status
-s'
args
:
chdir
:
'
{{
webRoot
}}'
become
:
false
with_items
:
-
'
add
config/*'
-
'
config
user.email
"deployment@lakedrops.com"'
-
'
config
user.name
"Auto
Config
Export"'
-
'
commit
-am
"[ci
skip]
Config
change
on
server"'
-
'
push'
register
:
git_status
-
block
:
-
name
:
"
File
Modes
and
Ownership
for
Repository"
file
:
path
:
'
{{
webRoot
}}/.git'
state
:
'
directory'
owner
:
'
root'
group
:
'
root'
mode
:
'
u+rwX,g+rwX,o+rX'
recurse
:
yes
-
name
:
"
Commit
and
push
files"
shell
:
'
git
{{
item
}}'
args
:
chdir
:
'
{{
webRoot
}}'
become
:
false
with_items
:
-
'
add
config/*'
-
'
config
user.email
"deployment@lakedrops.com"'
-
'
config
user.name
"Auto
Config
Export"'
-
'
commit
-am
"[ci
skip]
Config
change
on
server"'
-
'
push'
-
name
:
"
File
Modes
and
Ownership
for
Repository"
file
:
path
:
'
{{
webRoot
}}/.git'
state
:
'
directory'
owner
:
'
root'
group
:
'
{{
drupal.src.name
}}'
mode
:
'
ug+rw,o+r,o-w'
recurse
:
yes
-
name
:
"
File
Modes
and
Ownership
for
Repository"
file
:
path
:
'
{{
webRoot
}}/.git'
state
:
'
directory'
owner
:
'
root'
group
:
'
{{
drupal.src.name
}}'
mode
:
'
ug+rw,o+r,o-w'
recurse
:
yes
when
:
git_status.stdout != ''
This diff is collapsed.
Click to expand it.
tasks/collect_config/main.yml
+
31
−
22
View file @
78f67e88
...
...
@@ -20,25 +20,34 @@
installSource={{ drupal.src|default([]) }}
tags
:
always
-
name
:
"
Move
exported
config
to
working
copy"
command
:
'
mv
{{
pathExport
}}
{{
pathWorking
}}'
-
name
:
"
Read
file
name
in
working
copy"
shell
:
'
ls
{{
pathWorking
}}
-1'
register
:
list_config_files
-
name
:
"
Copy
working
copy
to
config
path"
copy
:
src
:
'
{{
pathWorking
}}/{{
item
}}'
dest
:
'
{{
pathConfig
}}/{{
item
}}'
remote_src
:
yes
owner
:
'
{{
apacheUser
}}'
group
:
'
{{
apacheUser
}}'
with_items
:
'
{{
list_config_files.stdout_lines
}}'
-
include_tasks
:
'
{{
installSource.mode|default("none")
}}.yml'
-
name
:
"
Delete
working
copy"
file
:
path
:
'
{{
pathWorking
}}'
state
:
absent
-
name
:
"
Check
if
export
path
exists"
stat
:
path
:
"
{{
pathExport
}}"
register
:
path_export_stat
-
block
:
-
name
:
"
Move
exported
config
to
working
copy"
command
:
'
mv
{{
pathExport
}}
{{
pathWorking
}}'
-
name
:
"
Read
file
name
in
working
copy"
shell
:
'
ls
{{
pathWorking
}}
-1'
register
:
list_config_files
-
name
:
"
Copy
working
copy
to
config
path"
copy
:
src
:
'
{{
pathWorking
}}/{{
item
}}'
dest
:
'
{{
pathConfig
}}/{{
item
}}'
remote_src
:
yes
owner
:
'
{{
apacheUser
}}'
group
:
'
{{
apacheUser
}}'
with_items
:
'
{{
list_config_files.stdout_lines
}}'
-
include_tasks
:
'
{{
installSource.mode|default("none")
}}.yml'
-
name
:
"
Delete
working
copy"
file
:
path
:
'
{{
pathWorking
}}'
state
:
absent
when
:
path_export_stat.stat.exists
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