mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Fix check_rc variable
This commit is contained in:
parent
ee14c490c4
commit
2a91734778
1 changed files with 3 additions and 2 deletions
|
@ -226,7 +226,7 @@ def target_loggedon(module, target, portal=None, port=None):
|
||||||
module.fail_json(cmd=cmd, rc=rc, msg=err)
|
module.fail_json(cmd=cmd, rc=rc, msg=err)
|
||||||
|
|
||||||
|
|
||||||
def target_login(module, target, portal=None, port=None, check_rc=True):
|
def target_login(module, target, check_rc, portal=None, port=None):
|
||||||
node_auth = module.params['node_auth']
|
node_auth = module.params['node_auth']
|
||||||
node_user = module.params['node_user']
|
node_user = module.params['node_user']
|
||||||
node_pass = module.params['node_pass']
|
node_pass = module.params['node_pass']
|
||||||
|
@ -368,6 +368,7 @@ def main():
|
||||||
|
|
||||||
# return json dict
|
# return json dict
|
||||||
result = {'changed': False}
|
result = {'changed': False}
|
||||||
|
check_rc = True
|
||||||
|
|
||||||
if discover:
|
if discover:
|
||||||
if check:
|
if check:
|
||||||
|
@ -408,7 +409,7 @@ def main():
|
||||||
result['devicenodes'] += target_device_node(target)
|
result['devicenodes'] += target_device_node(target)
|
||||||
elif not check:
|
elif not check:
|
||||||
if login:
|
if login:
|
||||||
target_login(module, target, portal, port, check_rc)
|
target_login(module, target, check_rc, portal, port)
|
||||||
# give udev some time
|
# give udev some time
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
result['devicenodes'] += target_device_node(target)
|
result['devicenodes'] += target_device_node(target)
|
||||||
|
|
Loading…
Reference in a new issue