From 719b99a96e737916efa7a00c9f64dc6e859fd3e0 Mon Sep 17 00:00:00 2001 From: bverschueren Date: Thu, 18 Oct 2018 14:25:54 +0200 Subject: [PATCH] ovirt_host_network: check for empty user_opts (#46695) Signed-off-by: Ondra Machacek --- .../ovirt_host_network_check_for_empty_user_opts.yaml | 2 ++ lib/ansible/modules/cloud/ovirt/ovirt_host_network.py | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/ovirt_host_network_check_for_empty_user_opts.yaml diff --git a/changelogs/fragments/ovirt_host_network_check_for_empty_user_opts.yaml b/changelogs/fragments/ovirt_host_network_check_for_empty_user_opts.yaml new file mode 100644 index 00000000000..a0b4c237455 --- /dev/null +++ b/changelogs/fragments/ovirt_host_network_check_for_empty_user_opts.yaml @@ -0,0 +1,2 @@ +bugfixes: + - ovirt_host_network - check for empty user_opts (https://github.com/ansible/ansible/pull/47283). diff --git a/lib/ansible/modules/cloud/ovirt/ovirt_host_network.py b/lib/ansible/modules/cloud/ovirt/ovirt_host_network.py index 243b6134d40..8f5d3e23a6f 100644 --- a/lib/ansible/modules/cloud/ovirt/ovirt_host_network.py +++ b/lib/ansible/modules/cloud/ovirt/ovirt_host_network.py @@ -221,7 +221,8 @@ def get_bond_options(mode, usr_opts): ) opts_dict = DEFAULT_MODE_OPTS.get(mode, {}) - opts_dict.update(**usr_opts) + if usr_opts is not None: + opts_dict.update(**usr_opts) options.extend( [otypes.Option(name=opt, value=value)