From 1de0515af9cce05110b02ad82832e975535f0d61 Mon Sep 17 00:00:00 2001 From: Abhijeet Kasurde Date: Fri, 13 Apr 2018 20:58:39 +0530 Subject: [PATCH] nmcli: change default value of autoconnect (#38686) There was discrepancy between documentation and actual code. Fixes: #38671 Signed-off-by: Abhijeet Kasurde (cherry picked from commit f1cd2542653dd8274025858fdaca057c285bd6d0) --- .../fragments/38671-nmcli_autoconnect_value_correction.yaml | 2 ++ lib/ansible/modules/net_tools/nmcli.py | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 changelogs/fragments/38671-nmcli_autoconnect_value_correction.yaml diff --git a/changelogs/fragments/38671-nmcli_autoconnect_value_correction.yaml b/changelogs/fragments/38671-nmcli_autoconnect_value_correction.yaml new file mode 100644 index 00000000000..4842e1a72d9 --- /dev/null +++ b/changelogs/fragments/38671-nmcli_autoconnect_value_correction.yaml @@ -0,0 +1,2 @@ +bugfixes: +- nmcli change default value of autoconnect diff --git a/lib/ansible/modules/net_tools/nmcli.py b/lib/ansible/modules/net_tools/nmcli.py index 18e334dea3b..07a2ed6e650 100644 --- a/lib/ansible/modules/net_tools/nmcli.py +++ b/lib/ansible/modules/net_tools/nmcli.py @@ -34,7 +34,7 @@ options: - Whether the device should exist or not, taking action if the state is different from what is stated. autoconnect: required: False - default: "yes" + default: True type: bool description: - Whether the connection should start on boot. @@ -1210,7 +1210,7 @@ def main(): # Parsing argument file module = AnsibleModule( argument_spec=dict( - autoconnect=dict(required=False, default=None, type='bool'), + autoconnect=dict(required=False, default=True, type='bool'), state=dict(required=True, choices=['present', 'absent'], type='str'), conn_name=dict(required=True, type='str'), master=dict(required=False, default=None, type='str'),