1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

nmcli should not return error if trying to delete an absent connection (#20677)

This commit is contained in:
Keisuke.K 2017-08-17 03:57:57 +09:00 committed by Chris Alfonso
parent c9cfc9be07
commit de27e8d228

View file

@ -1155,8 +1155,8 @@ def main():
module.exit_json(changed=True)
(rc, out, err)=nmcli.down_connection()
(rc, out, err)=nmcli.remove_connection()
if rc!=0:
module.fail_json(name =('No Connection named %s exists' % nmcli.conn_name), msg=err, rc=rc)
if rc!=0:
module.fail_json(name =('No Connection named %s exists' % nmcli.conn_name), msg=err, rc=rc)
elif nmcli.state=='present':
if nmcli.connection_exists():