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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
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
Show 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
...
@@ -51,7 +51,7 @@ md5sum = 4bcb07c1a9223e2d956651aa25d23654
[template-ansible-promise]
[template-ansible-promise]
filename = template/ansible-promise.in
filename = template/ansible-promise.in
md5sum =
b7e87479a289f472b634a046b44b5257
md5sum =
a8cf453d20f01c707f02c4b4014580d8
[template-kvm-run]
[template-kvm-run]
filename = template/template-kvm-run.in
filename = template/template-kvm-run.in
...
...
software/kvm/template/ansible-promise.in
View file @
0a23601b
...
@@ -17,8 +17,9 @@ result_failed_ignore = '127.0.0.1_FAILED_IGNORED'
...
@@ -17,8 +17,9 @@ result_failed_ignore = '127.0.0.1_FAILED_IGNORED'
def
get_log
(
res
):
def
get_log
(
res
):
log
=
""
log
=
""
if
type
(
res
)
==
type
(
dict
()):
if
type
(
res
)
==
type
(
dict
()):
log
=
'>> Running task: %s, args [%s]
\
n
'
%
(
res
[
'invocation'
][
'module_name'
],
module_name
=
res
[
'invocation'
].
get
(
'module_name'
,
'unkown_module_name'
)
res
[
'invocation'
][
'module_args'
])
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
:
for
field
in
FIELDS
:
if
field
in
res
.
keys
():
if
field
in
res
.
keys
():
# use default encoding, check out sys.setdefaultencoding
# use default encoding, check out sys.setdefaultencoding
...
...
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