Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
kypo-ansible-runner
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Insights
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
MUNI-KYPO-CRP
backend-python
kypo-ansible-runner
Commits
562a732e
Commit
562a732e
authored
4 years ago
by
Kamil Andoniadis
Committed by
Daniel Tovarňák
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Resolve "Networking Ansible Stage doesn't fail when it cannot access the remote repository"
parent
ff575e40
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
kypo-ansible-runner.sh
+9
-4
9 additions, 4 deletions
kypo-ansible-runner.sh
with
9 additions
and
4 deletions
kypo-ansible-runner.sh
+
9
−
4
View file @
562a732e
...
@@ -49,22 +49,27 @@ if [ $? != 0 ]; then
...
@@ -49,22 +49,27 @@ if [ $? != 0 ]; then
exit
1
exit
1
fi
fi
git clone
$REPO_URL
ansible_repo
git clone
$REPO_URL
ansible_repo
||
exit
1
cd
ansible_repo
cd
ansible_repo
||
exit
1
if
[
$REVISION
]
;
then
if
[
$REVISION
]
;
then
git checkout
$REVISION
||
exit
1
git checkout
$REVISION
||
exit
1
fi
fi
git submodule update
--init
--recursive
git submodule update
--init
--recursive
||
exit
1
cd
provisioning
||
exit
1
cd
provisioning
||
exit
1
REQUIREMENTS_FILE
=
"requirements.yml"
REQUIREMENTS_FILE
=
"requirements.yml"
if
[
-f
$REQUIREMENTS_FILE
]
;
then
if
[
-f
$REQUIREMENTS_FILE
]
;
then
ansible-galaxy
install
-r
$REQUIREMENTS_FILE
-p
roles
ansible-galaxy
install
-r
$REQUIREMENTS_FILE
-p
roles
||
exit
1
fi
fi
PRE_PLAYBOOK_FILE
=
"pre-playbook.yml"
PRE_PLAYBOOK_FILE
=
"pre-playbook.yml"
if
[
-f
$PRE_PLAYBOOK_FILE
]
;
then
if
[
-f
$PRE_PLAYBOOK_FILE
]
;
then
ansible-playbook
$PRE_PLAYBOOK_FILE
-i
"
${
INVENTORY_FILE
}
"
-vv
ansible-playbook
$PRE_PLAYBOOK_FILE
-i
"
${
INVENTORY_FILE
}
"
-vv
ANSIBLE_ERROR
=
$?
if
[
"
$ANSIBLE_ERROR
"
!=
0
]
then
exit
$ANSIBLE_ERROR
fi
fi
fi
PLAYBOOK_FILE
=
"playbook.yml"
PLAYBOOK_FILE
=
"playbook.yml"
...
...
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