Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Justin
slapos
Commits
0a23601b
Commit
0a23601b
authored
Dec 13, 2021
by
Thomas Gambier
🚴🏼
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
software/kvm: handle absence of module_name or module_args in ansible promise
parent
a3af8c12
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
software/kvm/buildout.hash.cfg
software/kvm/buildout.hash.cfg
+1
-1
software/kvm/template/ansible-promise.in
software/kvm/template/ansible-promise.in
+4
-3
No files found.
software/kvm/buildout.hash.cfg
View file @
0a23601b
...
...
@@ -51,7 +51,7 @@ md5sum = 4bcb07c1a9223e2d956651aa25d23654
[template-ansible-promise]
filename = template/ansible-promise.in
md5sum =
b7e87479a289f472b634a046b44b5257
md5sum =
a8cf453d20f01c707f02c4b4014580d8
[template-kvm-run]
filename = template/template-kvm-run.in
...
...
software/kvm/template/ansible-promise.in
View file @
0a23601b
...
...
@@ -17,11 +17,12 @@ result_failed_ignore = '127.0.0.1_FAILED_IGNORED'
def
get_log
(
res
):
log
=
""
if
type
(
res
)
==
type
(
dict
()):
log
=
'>> Running task: %s, args [%s]
\
n
'
%
(
res
[
'invocation'
][
'module_name'
],
res
[
'invocation'
][
'module_args'
])
module_name
=
res
[
'invocation'
].
get
(
'module_name'
,
'unkown_module_name'
)
module_args
=
res
[
'invocation'
].
get
(
'module_args'
,
'unkown_module_args'
)
log
=
'>> Running task: %s, args [%s]
\
n
'
%
(
module_name
,
module_args
)
for
field
in
FIELDS
:
if
field
in
res
.
keys
():
# use default encoding, check out sys.setdefaultencoding
# use default encoding, check out sys.setdefaultencoding
log
+=
'
\
n
{0}:
\
n
{1}'
.
format
(
field
,
res
[
field
])
return
log
...
...
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