Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
servers-config
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gruppo Sistemisti
servers-config
Commits
233a67d3
Commit
233a67d3
authored
Mar 02, 2018
by
Mattia Rizzolo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
deploy: use a real temporary directory
Signed-off-by:
Mattia Rizzolo
<
mattia@debian.org
>
parent
d49f9cc1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
6 deletions
+4
-6
deploy
deploy
+4
-6
No files found.
deploy
View file @
233a67d3
...
@@ -7,7 +7,6 @@ DIR_PLAYBOOKS="playbooks"
...
@@ -7,7 +7,6 @@ DIR_PLAYBOOKS="playbooks"
DIR_ENVIRONMENTS
=
"envs"
DIR_ENVIRONMENTS
=
"envs"
DIR_ROLES
=
"roles"
DIR_ROLES
=
"roles"
DIR_GROUP_VARS
=
"group_vars"
DIR_GROUP_VARS
=
"group_vars"
DIR_TEMP
=
".deploy-ansible-home"
FILE_VAULT_PASSWORD
=
"vault-password"
FILE_VAULT_PASSWORD
=
"vault-password"
...
@@ -57,8 +56,10 @@ if [[ ! -f "${playbook_file}" ]]; then
...
@@ -57,8 +56,10 @@ if [[ ! -f "${playbook_file}" ]]; then
fi
fi
# Create the temporary working directory
# Create the temporary working directory
rm
-rf
"
${
DIR_TEMP
}
"
DIR_TEMP
=
"
$(
mktemp
-d
-t
deploy-ansible-home-XXXXXXX
)
"
mkdir
-p
"
${
DIR_TEMP
}
/play"
function
cleanup
()
{
rm
-rf
"
$DIR_TEMP
"
;
}
mkdir
-p
"
$DIR_TEMP
/play"
trap
cleanup EXIT
ln
-s
"
`
readlink
-f
"
${
DIR_ROLES
}
"
`
"
"
${
DIR_TEMP
}
/play/roles"
ln
-s
"
`
readlink
-f
"
${
DIR_ROLES
}
"
`
"
"
${
DIR_TEMP
}
/play/roles"
ln
-s
"
`
readlink
-f
"
${
DIR_GROUP_VARS
}
"
`
"
"
${
DIR_TEMP
}
/play/group_vars"
ln
-s
"
`
readlink
-f
"
${
DIR_GROUP_VARS
}
"
`
"
"
${
DIR_TEMP
}
/play/group_vars"
...
@@ -77,6 +78,3 @@ fi
...
@@ -77,6 +78,3 @@ fi
"
${
DIR_TEMP
}
/play/playbook.yml"
\
"
${
DIR_TEMP
}
/play/playbook.yml"
\
${
vault_flags
}
\
${
vault_flags
}
\
||
true
||
true
# Remove temporary directory
rm
-rf
"
${
DIR_TEMP
}
"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment