From b376e3e146bfb4e2689073ef0069d58cabaca465 Mon Sep 17 00:00:00 2001 From: Sagi Shnaidman Date: Tue, 29 Mar 2022 13:04:35 +0300 Subject: [PATCH] Fix ansible-lint issues for newest version Change-Id: I8238b5d5e49c2a4a8ed3228de23349092c9e1220 Signed-off-by: Sagi Shnaidman --- plugins/inventory/openstack.py | 14 ++++++++------ plugins/modules/address_scope.py | 2 +- plugins/modules/image.py | 2 +- plugins/modules/lb_health_monitor.py | 4 ++-- plugins/modules/routers_info.py | 1 + plugins/modules/subnet.py | 2 +- 6 files changed, 14 insertions(+), 11 deletions(-) diff --git a/plugins/inventory/openstack.py b/plugins/inventory/openstack.py index 9dbe478d..064ada9d 100644 --- a/plugins/inventory/openstack.py +++ b/plugins/inventory/openstack.py @@ -25,7 +25,7 @@ options: show_all: description: toggles showing all vms vs only those with a working IP type: bool - default: 'no' + default: false inventory_hostname: description: | What to register as the inventory hostname. @@ -47,7 +47,7 @@ options: 'ansible_ssh_host' facts. This might be desired when using jump or bastion hosts and the name is the FQDN of the host. type: bool - default: 'no' + default: false expand_hostvars: description: | Run extra commands on each host to fill in additional @@ -56,7 +56,7 @@ options: (Note, the default value of this is opposite from the default old openstack.py inventory script's option expand_hostvars) type: bool - default: 'no' + default: false private: description: | Use the private interface of each server, if it has one, as @@ -64,12 +64,13 @@ options: running ansible inside a server in the cloud and would rather communicate to your servers over the private network. type: bool - default: 'no' + default: false only_clouds: description: | List of clouds from clouds.yaml to use, instead of using the whole list. type: list + elements: str default: [] fail_on_errors: description: | @@ -80,12 +81,12 @@ options: default value of this is opposite from the old openstack.py inventory script's option fail_on_errors) type: bool - default: 'no' + default: false all_projects: description: | Lists servers from all projects type: bool - default: 'no' + default: false clouds_yaml_path: description: | Override path to clouds.yaml file. If this value is given it @@ -94,6 +95,7 @@ options: /etc/ansible/openstack.yml to the regular locations documented at https://docs.openstack.org/os-client-config/latest/user/configuration.html#config-files type: list + elements: str env: - name: OS_CLIENT_CONFIG_FILE compose: diff --git a/plugins/modules/address_scope.py b/plugins/modules/address_scope.py index 1d2aa303..eb5b187a 100644 --- a/plugins/modules/address_scope.py +++ b/plugins/modules/address_scope.py @@ -30,7 +30,7 @@ options: ip_version: description: - The IP version of the subnet 4 or 6 - default: 4 + default: '4' type: str choices: ['4', '6'] shared: diff --git a/plugins/modules/image.py b/plugins/modules/image.py index 31cdf001..387197a9 100644 --- a/plugins/modules/image.py +++ b/plugins/modules/image.py @@ -61,7 +61,7 @@ options: description: - Prevent image from being deleted type: bool - default: 'no' + default: false filename: description: - The path to the file which has to be uploaded diff --git a/plugins/modules/lb_health_monitor.py b/plugins/modules/lb_health_monitor.py index 0d45d370..94de4485 100644 --- a/plugins/modules/lb_health_monitor.py +++ b/plugins/modules/lb_health_monitor.py @@ -45,7 +45,7 @@ options: - The number of successful checks before changing the operating status of the member to ONLINE. max_retries_down: type: 'str' - default: 3 + default: '3' description: - The number of allowed check failures before changing the operating status of the member to ERROR. A valid value is from 1 to 10. The default is 3. resp_timeout: @@ -60,7 +60,7 @@ options: type: bool expected_codes: type: 'str' - default: 200 + default: '200' description: - The list of HTTP status codes expected in response from the member to declare it healthy. Specify one of the following values A single value, such as 200 diff --git a/plugins/modules/routers_info.py b/plugins/modules/routers_info.py index 7d18ab02..0f25cd02 100644 --- a/plugins/modules/routers_info.py +++ b/plugins/modules/routers_info.py @@ -49,6 +49,7 @@ options: description: - A list of tags to filter the list result by. Resources that match all tags in this list will be returned. type: list + elements: str requirements: - "python >= 3.6" - "openstacksdk" diff --git a/plugins/modules/subnet.py b/plugins/modules/subnet.py index 98b735ba..dfe1eaca 100644 --- a/plugins/modules/subnet.py +++ b/plugins/modules/subnet.py @@ -39,7 +39,7 @@ options: ip_version: description: - The IP version of the subnet 4 or 6 - default: 4 + default: '4' type: str choices: ['4', '6'] enable_dhcp: