From b26df2a00852368abe28576efc0d535300d9f8ff Mon Sep 17 00:00:00 2001 From: "patchback[bot]" <45432694+patchback[bot]@users.noreply.github.com> Date: Tue, 1 Nov 2022 18:06:30 +0000 Subject: [PATCH] Fix non-matching defaults in docs (#5446) (#5451) * Allow to pass options as lookup options. * Adjust tests. * Fix non-matching defaults. (cherry picked from commit a978bff2c72abcd7e395c868492df37566505daa) Co-authored-by: Felix Fontein --- .../fragments/5444-passwordstore-options.yml | 2 + plugins/doc_fragments/influxdb.py | 2 + plugins/doc_fragments/ldap.py | 1 + plugins/doc_fragments/utm.py | 1 + plugins/lookup/passwordstore.py | 74 ++++++++++--------- .../modules/cloud/atomic/atomic_container.py | 1 + .../cloud/dimensiondata/dimensiondata_vlan.py | 3 + .../modules/cloud/huawei/hwc_ecs_instance.py | 1 + plugins/modules/cloud/huawei/hwc_evs_disk.py | 1 + .../modules/cloud/huawei/hwc_network_vpc.py | 1 + plugins/modules/cloud/huawei/hwc_vpc_eip.py | 1 + .../cloud/huawei/hwc_vpc_peering_connect.py | 1 + plugins/modules/cloud/huawei/hwc_vpc_port.py | 1 + .../modules/cloud/huawei/hwc_vpc_subnet.py | 1 + plugins/modules/cloud/linode/linode.py | 1 + plugins/modules/cloud/memset/memset_zone.py | 1 + .../cloud/memset/memset_zone_record.py | 3 + plugins/modules/cloud/misc/rhevm.py | 1 + plugins/modules/cloud/misc/serverless.py | 2 + plugins/modules/cloud/misc/terraform.py | 1 + .../oneandone/oneandone_firewall_policy.py | 5 ++ .../oneandone/oneandone_load_balancer.py | 5 ++ .../oneandone/oneandone_monitoring_policy.py | 11 +++ .../oneandone/oneandone_private_network.py | 2 + plugins/modules/cloud/packet/packet_device.py | 1 + .../cloud/profitbricks/profitbricks.py | 2 + .../cloud/profitbricks/profitbricks_volume.py | 4 +- plugins/modules/cloud/pubnub/pubnub_blocks.py | 4 +- plugins/modules/cloud/rackspace/rax.py | 4 + plugins/modules/cloud/rackspace/rax_cbs.py | 1 + plugins/modules/cloud/rackspace/rax_clb.py | 1 + plugins/modules/cloud/rackspace/rax_files.py | 1 + .../cloud/rackspace/rax_files_objects.py | 1 + plugins/modules/cloud/rackspace/rax_meta.py | 1 + .../modules/cloud/rackspace/rax_mon_check.py | 2 + .../modules/cloud/rackspace/rax_mon_entity.py | 2 + .../cloud/rackspace/rax_scaling_group.py | 2 + .../scaleway/scaleway_container_registry.py | 1 + plugins/modules/cloud/scaleway/scaleway_lb.py | 1 + plugins/modules/cloud/softlayer/sl_vm.py | 1 + .../spotinst/spotinst_aws_elastigroup.py | 6 ++ .../modules/cloud/univention/udm_dns_zone.py | 2 + plugins/modules/cloud/univention/udm_group.py | 2 + plugins/modules/cloud/univention/udm_user.py | 3 + plugins/modules/database/mssql/mssql_db.py | 2 + plugins/modules/files/iso_customize.py | 2 + plugins/modules/files/xml.py | 1 + plugins/modules/identity/onepassword_info.py | 1 - .../modules/monitoring/sensu/sensu_check.py | 4 - plugins/modules/monitoring/statsd.py | 1 + plugins/modules/net_tools/dnsmadeeasy.py | 1 - .../modules/net_tools/infinity/infinity.py | 5 -- plugins/modules/net_tools/ldap/ldap_entry.py | 1 + plugins/modules/notification/mail.py | 2 + .../modules/packaging/language/composer.py | 1 + .../packaging/language/maven_artifact.py | 1 + plugins/modules/packaging/os/opkg.py | 1 + plugins/modules/packaging/os/pacman.py | 6 +- .../packaging/os/redhat_subscription.py | 1 - plugins/modules/packaging/os/sorcery.py | 1 + .../lenovoxcc/xcc_redfish_command.py | 1 + .../manageiq/manageiq_tenant.py | 2 +- .../redfish/redfish_command.py | 3 + .../redfish/redfish_config.py | 4 + .../remote_management/stacki/stacki_host.py | 2 + .../source_control/gitlab/gitlab_hook.py | 1 + plugins/modules/storage/zfs/zfs.py | 1 + plugins/modules/storage/zfs/zfs_facts.py | 1 + plugins/modules/system/aix_lvol.py | 2 + plugins/modules/system/java_cert.py | 1 - plugins/modules/system/lvg.py | 2 + plugins/modules/system/selinux_permissive.py | 1 + plugins/modules/web_infrastructure/jira.py | 1 + .../sophos_utm/utm_aaa_group.py | 6 ++ .../sophos_utm/utm_dns_host.py | 2 + .../utm_network_interface_address.py | 1 + .../sophos_utm/utm_proxy_location.py | 3 + .../tasks/password_tests.yml | 16 ++-- .../lookup_passwordstore/tasks/tests.yml | 4 +- 79 files changed, 187 insertions(+), 63 deletions(-) create mode 100644 changelogs/fragments/5444-passwordstore-options.yml diff --git a/changelogs/fragments/5444-passwordstore-options.yml b/changelogs/fragments/5444-passwordstore-options.yml new file mode 100644 index 0000000000..a25c9a2fef --- /dev/null +++ b/changelogs/fragments/5444-passwordstore-options.yml @@ -0,0 +1,2 @@ +minor_changes: + - "passwordstore lookup plugin - allow options to be passed lookup options instead of being part of the term strings (https://github.com/ansible-collections/community.general/pull/5444)." diff --git a/plugins/doc_fragments/influxdb.py b/plugins/doc_fragments/influxdb.py index f9e08550bd..6aedd5ad39 100644 --- a/plugins/doc_fragments/influxdb.py +++ b/plugins/doc_fragments/influxdb.py @@ -43,6 +43,7 @@ options: - The path on which InfluxDB server is accessible - Only available when using python-influxdb >= 5.1.0 type: str + default: '' version_added: '0.2.0' validate_certs: description: @@ -80,4 +81,5 @@ options: description: - HTTP(S) proxy to use for Requests to connect to InfluxDB server. type: dict + default: {} ''' diff --git a/plugins/doc_fragments/ldap.py b/plugins/doc_fragments/ldap.py index 28e9d2fdae..c73e5080be 100644 --- a/plugins/doc_fragments/ldap.py +++ b/plugins/doc_fragments/ldap.py @@ -23,6 +23,7 @@ options: description: - The password to use with I(bind_dn). type: str + default: '' dn: required: true description: diff --git a/plugins/doc_fragments/utm.py b/plugins/doc_fragments/utm.py index d8b2305d23..73ad805035 100644 --- a/plugins/doc_fragments/utm.py +++ b/plugins/doc_fragments/utm.py @@ -17,6 +17,7 @@ options: - Is needed for some modules type: dict required: false + default: {} utm_host: description: - The REST Endpoint of the Sophos UTM. diff --git a/plugins/lookup/passwordstore.py b/plugins/lookup/passwordstore.py index ce1f4ee852..1106bbc473 100644 --- a/plugins/lookup/passwordstore.py +++ b/plugins/lookup/passwordstore.py @@ -21,17 +21,15 @@ DOCUMENTATION = ''' _terms: description: query key. required: true - passwordstore: - description: - - Location of the password store. - - 'The value is decided by checking the following in order:' - - If set, this value is used. - - If C(directory) is set, that value will be used. - - If I(backend=pass), then C(~/.password-store) is used. - - If I(backend=gopass), then the C(path) field in C(~/.config/gopass/config.yml) is used, - falling back to C(~/.local/share/gopass/stores/root) if not defined. directory: - description: The directory of the password store. + description: + - The directory of the password store. + - If I(backend=pass), the default is C(~/.password-store) is used. + - If I(backend=gopass), then the default is the C(path) field in C(~/.config/gopass/config.yml), + falling back to C(~/.local/share/gopass/stores/root) if C(path) is not defined in the gopass config. + type: path + vars: + - name: passwordstore env: - name: PASSWORD_STORE_DIR create: @@ -55,9 +53,11 @@ DOCUMENTATION = ''' default: false subkey: description: Return a specific subkey of the password. When set to C(password), always returns the first line. + type: str default: password userpass: description: Specify a password to save, instead of a generated one. + type: str length: description: The length of the generated password. type: integer @@ -67,7 +67,7 @@ DOCUMENTATION = ''' type: bool default: false nosymbols: - description: use alphanumeric characters. + description: Use alphanumeric characters. type: bool default: false missing: @@ -129,6 +129,8 @@ DOCUMENTATION = ''' - pass - gopass version_added: 5.2.0 + notes: + - The lookup supports passing all options as lookup parameters since community.general 6.0.0. ''' EXAMPLES = """ ansible.cfg: | @@ -136,7 +138,7 @@ ansible.cfg: | lock=readwrite locktimeout=45s -playbook.yml: | +tasks.yml: | --- # Debug is used for examples, BAD IDEA to show passwords on screen @@ -146,45 +148,49 @@ playbook.yml: | - name: Basic lookup. Warns if example/test does not exist and returns empty string ansible.builtin.debug: - msg: "{{ lookup('community.general.passwordstore', 'example/test missing=warn')}}" + msg: "{{ lookup('community.general.passwordstore', 'example/test', missing='warn')}}" - name: Create pass with random 16 character password. If password exists just give the password ansible.builtin.debug: var: mypassword vars: - mypassword: "{{ lookup('community.general.passwordstore', 'example/test create=true')}}" + mypassword: "{{ lookup('community.general.passwordstore', 'example/test', create=true)}}" - name: Create pass with random 16 character password. If password exists just give the password ansible.builtin.debug: var: mypassword vars: - mypassword: "{{ lookup('community.general.passwordstore', 'example/test missing=create')}}" + mypassword: "{{ lookup('community.general.passwordstore', 'example/test', missing='create')}}" - name: Prints 'abc' if example/test does not exist, just give the password otherwise ansible.builtin.debug: var: mypassword vars: - mypassword: "{{ lookup('community.general.passwordstore', 'example/test missing=empty') | default('abc', true) }}" + mypassword: >- + {{ lookup('community.general.passwordstore', 'example/test', missing='empty') + | default('abc', true) }} - name: Different size password ansible.builtin.debug: - msg: "{{ lookup('community.general.passwordstore', 'example/test create=true length=42')}}" + msg: "{{ lookup('community.general.passwordstore', 'example/test', create=true, length=42)}}" - - name: Create password and overwrite the password if it exists. As a bonus, this module includes the old password inside the pass file + - name: >- + Create password and overwrite the password if it exists. + As a bonus, this module includes the old password inside the pass file ansible.builtin.debug: - msg: "{{ lookup('community.general.passwordstore', 'example/test create=true overwrite=true')}}" + msg: "{{ lookup('community.general.passwordstore', 'example/test', create=true, overwrite=true)}}" - name: Create an alphanumeric password ansible.builtin.debug: - msg: "{{ lookup('community.general.passwordstore', 'example/test create=true nosymbols=true') }}" + msg: "{{ lookup('community.general.passwordstore', 'example/test', create=true, nosymbols=true) }}" - name: Return the value for user in the KV pair user, username ansible.builtin.debug: - msg: "{{ lookup('community.general.passwordstore', 'example/test subkey=user')}}" + msg: "{{ lookup('community.general.passwordstore', 'example/test', subkey='user')}}" - name: Return the entire password file content ansible.builtin.set_fact: - passfilecontent: "{{ lookup('community.general.passwordstore', 'example/test returnall=true')}}" + passfilecontent: "{{ lookup('community.general.passwordstore', 'example/test', returnall=true)}}" """ RETURN = """ @@ -320,7 +326,7 @@ class LookupModule(LookupBase): raise AnsibleError('Passwordstore directory \'{0}\' does not exist'.format(self.paramvals['directory'])) # Set PASSWORD_STORE_UMASK if umask is set - if 'umask' in self.paramvals: + if self.paramvals.get('umask') is not None: if len(self.paramvals['umask']) != 3: raise AnsibleError('Passwordstore umask must have a length of 3.') elif int(self.paramvals['umask'][0]) > 3: @@ -435,8 +441,7 @@ class LookupModule(LookupBase): unit_to_seconds = {"s": 1, "m": 60, "h": 3600} self.lock_timeout = int(timeout[:-1]) * unit_to_seconds[timeout[-1]] - directory = variables.get('passwordstore', os.environ.get('PASSWORD_STORE_DIR', None)) - + directory = self.get_option('directory') if directory is None: if self.backend == 'gopass': try: @@ -448,16 +453,17 @@ class LookupModule(LookupBase): directory = os.path.expanduser('~/.password-store') self.paramvals = { - 'subkey': 'password', + 'subkey': self.get_option('subkey'), 'directory': directory, - 'create': False, - 'returnall': False, - 'overwrite': False, - 'nosymbols': False, - 'userpass': '', - 'length': 16, - 'backup': False, - 'missing': 'error', + 'create': self.get_option('create'), + 'returnall': self.get_option('returnall'), + 'overwrite': self.get_option('overwrite'), + 'nosymbols': self.get_option('nosymbols'), + 'userpass': self.get_option('userpass') or '', + 'length': self.get_option('length'), + 'backup': self.get_option('backup'), + 'missing': self.get_option('missing'), + 'umask': self.get_option('umask'), } def run(self, terms, variables, **kwargs): diff --git a/plugins/modules/cloud/atomic/atomic_container.py b/plugins/modules/cloud/atomic/atomic_container.py index 586b1254c2..c32e617a22 100644 --- a/plugins/modules/cloud/atomic/atomic_container.py +++ b/plugins/modules/cloud/atomic/atomic_container.py @@ -61,6 +61,7 @@ options: - The values specified here will be used at installation time as --set arguments for atomic install. type: list elements: str + default: [] ''' EXAMPLES = r''' diff --git a/plugins/modules/cloud/dimensiondata/dimensiondata_vlan.py b/plugins/modules/cloud/dimensiondata/dimensiondata_vlan.py index b06566b8e6..ca25374dcb 100644 --- a/plugins/modules/cloud/dimensiondata/dimensiondata_vlan.py +++ b/plugins/modules/cloud/dimensiondata/dimensiondata_vlan.py @@ -31,6 +31,7 @@ options: description: - A description of the VLAN. type: str + default: '' network_domain: description: - The Id or name of the target network domain. @@ -40,11 +41,13 @@ options: description: - The base address for the VLAN's IPv4 network (e.g. 192.168.1.0). type: str + default: '' private_ipv4_prefix_size: description: - The size of the IPv4 address space, e.g 24. - Required, if C(private_ipv4_base_address) is specified. type: int + default: 0 state: description: - The desired state for the target VLAN. diff --git a/plugins/modules/cloud/huawei/hwc_ecs_instance.py b/plugins/modules/cloud/huawei/hwc_ecs_instance.py index 8026c0f2f6..10d913f9b5 100644 --- a/plugins/modules/cloud/huawei/hwc_ecs_instance.py +++ b/plugins/modules/cloud/huawei/hwc_ecs_instance.py @@ -33,6 +33,7 @@ options: description: - The timeouts for each operations. type: dict + default: {} suboptions: create: description: diff --git a/plugins/modules/cloud/huawei/hwc_evs_disk.py b/plugins/modules/cloud/huawei/hwc_evs_disk.py index e319821c9f..7b5a99fb7f 100644 --- a/plugins/modules/cloud/huawei/hwc_evs_disk.py +++ b/plugins/modules/cloud/huawei/hwc_evs_disk.py @@ -33,6 +33,7 @@ options: description: - The timeouts for each operations. type: dict + default: {} suboptions: create: description: diff --git a/plugins/modules/cloud/huawei/hwc_network_vpc.py b/plugins/modules/cloud/huawei/hwc_network_vpc.py index 2f08f20313..78f5925e0c 100644 --- a/plugins/modules/cloud/huawei/hwc_network_vpc.py +++ b/plugins/modules/cloud/huawei/hwc_network_vpc.py @@ -33,6 +33,7 @@ options: description: - The timeouts for each operations. type: dict + default: {} suboptions: create: description: diff --git a/plugins/modules/cloud/huawei/hwc_vpc_eip.py b/plugins/modules/cloud/huawei/hwc_vpc_eip.py index a86338052e..e14fb0e502 100644 --- a/plugins/modules/cloud/huawei/hwc_vpc_eip.py +++ b/plugins/modules/cloud/huawei/hwc_vpc_eip.py @@ -33,6 +33,7 @@ options: description: - The timeouts for each operations. type: dict + default: {} suboptions: create: description: diff --git a/plugins/modules/cloud/huawei/hwc_vpc_peering_connect.py b/plugins/modules/cloud/huawei/hwc_vpc_peering_connect.py index 89955d2091..01c52932ba 100644 --- a/plugins/modules/cloud/huawei/hwc_vpc_peering_connect.py +++ b/plugins/modules/cloud/huawei/hwc_vpc_peering_connect.py @@ -34,6 +34,7 @@ options: description: - The timeouts for each operations. type: dict + default: {} suboptions: create: description: diff --git a/plugins/modules/cloud/huawei/hwc_vpc_port.py b/plugins/modules/cloud/huawei/hwc_vpc_port.py index dadc76c064..aac9636f88 100644 --- a/plugins/modules/cloud/huawei/hwc_vpc_port.py +++ b/plugins/modules/cloud/huawei/hwc_vpc_port.py @@ -33,6 +33,7 @@ options: description: - The timeouts for each operations. type: dict + default: {} suboptions: create: description: diff --git a/plugins/modules/cloud/huawei/hwc_vpc_subnet.py b/plugins/modules/cloud/huawei/hwc_vpc_subnet.py index d38150dfc3..4b192a5682 100644 --- a/plugins/modules/cloud/huawei/hwc_vpc_subnet.py +++ b/plugins/modules/cloud/huawei/hwc_vpc_subnet.py @@ -33,6 +33,7 @@ options: description: - The timeouts for each operations. type: dict + default: {} suboptions: create: description: diff --git a/plugins/modules/cloud/linode/linode.py b/plugins/modules/cloud/linode/linode.py index c19770dc41..5304ed3d89 100644 --- a/plugins/modules/cloud/linode/linode.py +++ b/plugins/modules/cloud/linode/linode.py @@ -37,6 +37,7 @@ options: description: - Add the instance to a Display Group in Linode Manager. type: str + default: '' linode_id: description: - Unique ID of a linode server. This value is read-only in the sense that diff --git a/plugins/modules/cloud/memset/memset_zone.py b/plugins/modules/cloud/memset/memset_zone.py index f402e0e0f4..9731e3a943 100644 --- a/plugins/modules/cloud/memset/memset_zone.py +++ b/plugins/modules/cloud/memset/memset_zone.py @@ -44,6 +44,7 @@ options: - The default TTL for all records created in the zone. This must be a valid int from U(https://www.memset.com/apidocs/methods_dns.html#dns.zone_create). type: int + default: 0 choices: [ 0, 300, 600, 900, 1800, 3600, 7200, 10800, 21600, 43200, 86400 ] force: required: false diff --git a/plugins/modules/cloud/memset/memset_zone_record.py b/plugins/modules/cloud/memset/memset_zone_record.py index 5082475176..c114532f90 100644 --- a/plugins/modules/cloud/memset/memset_zone_record.py +++ b/plugins/modules/cloud/memset/memset_zone_record.py @@ -44,11 +44,13 @@ options: description: - C(SRV) and C(TXT) record priority, in the range 0 > 999 (inclusive). type: int + default: 0 record: required: false description: - The subdomain to create. type: str + default: '' type: required: true description: @@ -65,6 +67,7 @@ options: description: - The record's TTL in seconds (will inherit zone's TTL if not explicitly set). This must be a valid int from U(https://www.memset.com/apidocs/methods_dns.html#dns.zone_record_create). + default: 0 choices: [ 0, 300, 600, 900, 1800, 3600, 7200, 10800, 21600, 43200, 86400 ] type: int zone: diff --git a/plugins/modules/cloud/misc/rhevm.py b/plugins/modules/cloud/misc/rhevm.py index 2542511bea..994f737093 100644 --- a/plugins/modules/cloud/misc/rhevm.py +++ b/plugins/modules/cloud/misc/rhevm.py @@ -54,6 +54,7 @@ options: description: - The RHEV/oVirt cluster in which you want you VM to start. type: str + default: '' datacenter: description: - The RHEV/oVirt datacenter in which you want you VM to start. diff --git a/plugins/modules/cloud/misc/serverless.py b/plugins/modules/cloud/misc/serverless.py index 2819adae59..4d36ba679a 100644 --- a/plugins/modules/cloud/misc/serverless.py +++ b/plugins/modules/cloud/misc/serverless.py @@ -35,11 +35,13 @@ options: - The name of the serverless framework project stage to deploy to. - This uses the serverless framework default "dev". type: str + default: '' region: description: - AWS region to deploy the service to. - This parameter defaults to C(us-east-1). type: str + default: '' deploy: description: - Whether or not to deploy artifacts after building them. diff --git a/plugins/modules/cloud/misc/terraform.py b/plugins/modules/cloud/misc/terraform.py index 7b6fbc5126..615c125cf3 100644 --- a/plugins/modules/cloud/misc/terraform.py +++ b/plugins/modules/cloud/misc/terraform.py @@ -105,6 +105,7 @@ options: resources selected here will also auto-include any dependencies. type: list elements: str + default: [] lock: description: - Enable statefile locking, if you use a service that accepts locks (such diff --git a/plugins/modules/cloud/oneandone/oneandone_firewall_policy.py b/plugins/modules/cloud/oneandone/oneandone_firewall_policy.py index 9d9f042f2b..23203e8d05 100644 --- a/plugins/modules/cloud/oneandone/oneandone_firewall_policy.py +++ b/plugins/modules/cloud/oneandone/oneandone_firewall_policy.py @@ -48,6 +48,7 @@ options: (port_from, port_to, and source) type: list elements: dict + default: [] add_server_ips: description: - A list of server identifiers (id or name) to be assigned to a firewall policy. @@ -55,12 +56,14 @@ options: type: list elements: str required: false + default: [] remove_server_ips: description: - A list of server IP ids to be unassigned from a firewall policy. Used in combination with update state. type: list elements: str required: false + default: [] add_rules: description: - A list of rules that will be added to an existing firewall policy. @@ -68,12 +71,14 @@ options: type: list elements: dict required: false + default: [] remove_rules: description: - A list of rule ids that will be removed from an existing firewall policy. Used in combination with update state. type: list elements: str required: false + default: [] description: description: - Firewall policy description. maxLength=256 diff --git a/plugins/modules/cloud/oneandone/oneandone_load_balancer.py b/plugins/modules/cloud/oneandone/oneandone_load_balancer.py index 3407e264ad..04aefde63a 100644 --- a/plugins/modules/cloud/oneandone/oneandone_load_balancer.py +++ b/plugins/modules/cloud/oneandone/oneandone_load_balancer.py @@ -86,6 +86,7 @@ options: port_balancer, and port_server parameters, in addition to source parameter, which is optional. type: list elements: dict + default: [] description: description: - Description of the load balancer. maxLength=256 @@ -98,12 +99,14 @@ options: type: list elements: str required: false + default: [] remove_server_ips: description: - A list of server IP ids to be unassigned from a load balancer. Used in combination with update state. type: list elements: str required: false + default: [] add_rules: description: - A list of rules that will be added to an existing load balancer. @@ -111,12 +114,14 @@ options: type: list elements: dict required: false + default: [] remove_rules: description: - A list of rule ids that will be removed from an existing load balancer. Used in combination with update state. type: list elements: str required: false + default: [] wait: description: - wait for the instance to be in state 'running' before returning diff --git a/plugins/modules/cloud/oneandone/oneandone_monitoring_policy.py b/plugins/modules/cloud/oneandone/oneandone_monitoring_policy.py index cd9ee40ca2..46c68e86e0 100644 --- a/plugins/modules/cloud/oneandone/oneandone_monitoring_policy.py +++ b/plugins/modules/cloud/oneandone/oneandone_monitoring_policy.py @@ -62,6 +62,7 @@ options: and value is used to advise when the value is exceeded. type: list elements: dict + default: [] suboptions: cpu: description: @@ -88,6 +89,7 @@ options: - Array of ports that will be monitoring. type: list elements: dict + default: [] suboptions: protocol: description: @@ -112,6 +114,7 @@ options: - Array of processes that will be monitoring. type: list elements: dict + default: [] suboptions: process: description: @@ -128,48 +131,56 @@ options: type: list elements: dict required: false + default: [] add_processes: description: - Processes to add to the monitoring policy. type: list elements: dict required: false + default: [] add_servers: description: - Servers to add to the monitoring policy. type: list elements: str required: false + default: [] remove_ports: description: - Ports to remove from the monitoring policy. type: list elements: str required: false + default: [] remove_processes: description: - Processes to remove from the monitoring policy. type: list elements: str required: false + default: [] remove_servers: description: - Servers to remove from the monitoring policy. type: list elements: str required: false + default: [] update_ports: description: - Ports to be updated on the monitoring policy. type: list elements: dict required: false + default: [] update_processes: description: - Processes to be updated on the monitoring policy. type: list elements: dict required: false + default: [] wait: description: - wait for the instance to be in state 'running' before returning diff --git a/plugins/modules/cloud/oneandone/oneandone_private_network.py b/plugins/modules/cloud/oneandone/oneandone_private_network.py index 36633716f7..a6db23310a 100644 --- a/plugins/modules/cloud/oneandone/oneandone_private_network.py +++ b/plugins/modules/cloud/oneandone/oneandone_private_network.py @@ -62,11 +62,13 @@ options: - List of server identifiers (name or id) to be added to the private network. type: list elements: str + default: [] remove_members: description: - List of server identifiers (name or id) to be removed from the private network. type: list elements: str + default: [] wait: description: - wait for the instance to be in state 'running' before returning diff --git a/plugins/modules/cloud/packet/packet_device.py b/plugins/modules/cloud/packet/packet_device.py index e8452f99eb..6b78406a6e 100644 --- a/plugins/modules/cloud/packet/packet_device.py +++ b/plugins/modules/cloud/packet/packet_device.py @@ -136,6 +136,7 @@ options: - URL of custom iPXE script for provisioning. - More about custom iPXE for Packet devices at U(https://help.packet.net/technical/infrastructure/custom-ipxe). type: str + default: '' always_pxe: description: diff --git a/plugins/modules/cloud/profitbricks/profitbricks.py b/plugins/modules/cloud/profitbricks/profitbricks.py index 42e6a1314b..cb41491464 100644 --- a/plugins/modules/cloud/profitbricks/profitbricks.py +++ b/plugins/modules/cloud/profitbricks/profitbricks.py @@ -38,6 +38,7 @@ options: - Public SSH keys allowing access to the virtual machine. type: list elements: str + default: [] datacenter: description: - The datacenter to provision this virtual machine. @@ -74,6 +75,7 @@ options: - list of instance ids, currently only used when state='absent' to remove instances. type: list elements: str + default: [] count: description: - The number of virtual machines to create. diff --git a/plugins/modules/cloud/profitbricks/profitbricks_volume.py b/plugins/modules/cloud/profitbricks/profitbricks_volume.py index a49948b4bf..2d449fd92a 100644 --- a/plugins/modules/cloud/profitbricks/profitbricks_volume.py +++ b/plugins/modules/cloud/profitbricks/profitbricks_volume.py @@ -50,7 +50,7 @@ options: - Public SSH keys allowing access to the virtual machine. type: list elements: str - required: false + default: [] disk_type: description: - The disk type of the volume. @@ -81,7 +81,7 @@ options: - list of instance ids, currently only used when state='absent' to remove instances. type: list elements: str - required: false + default: [] subscription_user: description: - The ProfitBricks username. Overrides the PB_SUBSCRIPTION_ID environment variable. diff --git a/plugins/modules/cloud/pubnub/pubnub_blocks.py b/plugins/modules/cloud/pubnub/pubnub_blocks.py index 8e9a56bdf5..9942c57134 100644 --- a/plugins/modules/cloud/pubnub/pubnub_blocks.py +++ b/plugins/modules/cloud/pubnub/pubnub_blocks.py @@ -37,6 +37,7 @@ options: same play)." required: false type: str + default: '' password: description: - Password which match to account to which specified C(email) belong. @@ -44,6 +45,7 @@ options: same play)." required: false type: str + default: '' cache: description: > In case if single play use blocks management module few times it is @@ -58,7 +60,7 @@ options: manage blocks." - "User's account will be used if value not set or empty." type: str - required: false + default: '' application: description: - "Name of target PubNub application for which blocks configuration on diff --git a/plugins/modules/cloud/rackspace/rax.py b/plugins/modules/cloud/rackspace/rax.py index 35f88dde81..b35384173a 100644 --- a/plugins/modules/cloud/rackspace/rax.py +++ b/plugins/modules/cloud/rackspace/rax.py @@ -82,17 +82,20 @@ options: default: false extra_client_args: type: dict + default: {} description: - A hash of key/value pairs to be used when creating the cloudservers client. This is considered an advanced option, use it wisely and with caution. extra_create_args: type: dict + default: {} description: - A hash of key/value pairs to be used when creating a new server. This is considered an advanced option, use it wisely and with caution. files: type: dict + default: {} description: - Files to insert into the instance. remotefilename:localcontent flavor: @@ -124,6 +127,7 @@ options: - keypair meta: type: dict + default: {} description: - A hash of metadata to associate with the instance name: diff --git a/plugins/modules/cloud/rackspace/rax_cbs.py b/plugins/modules/cloud/rackspace/rax_cbs.py index cde1d98755..dd8bcefa35 100644 --- a/plugins/modules/cloud/rackspace/rax_cbs.py +++ b/plugins/modules/cloud/rackspace/rax_cbs.py @@ -26,6 +26,7 @@ options: C(name). This option requires C(pyrax>=1.9.3). meta: type: dict + default: {} description: - A hash of metadata to associate with the volume. name: diff --git a/plugins/modules/cloud/rackspace/rax_clb.py b/plugins/modules/cloud/rackspace/rax_clb.py index 8e5db34e50..7d45c865f0 100644 --- a/plugins/modules/cloud/rackspace/rax_clb.py +++ b/plugins/modules/cloud/rackspace/rax_clb.py @@ -28,6 +28,7 @@ options: default: LEAST_CONNECTIONS meta: type: dict + default: {} description: - A hash of metadata to associate with the instance name: diff --git a/plugins/modules/cloud/rackspace/rax_files.py b/plugins/modules/cloud/rackspace/rax_files.py index 6599c88d16..1c549827cc 100644 --- a/plugins/modules/cloud/rackspace/rax_files.py +++ b/plugins/modules/cloud/rackspace/rax_files.py @@ -27,6 +27,7 @@ options: - The container to use for container or metadata operations. meta: type: dict + default: {} description: - A hash of items to set as metadata values on a container private: diff --git a/plugins/modules/cloud/rackspace/rax_files_objects.py b/plugins/modules/cloud/rackspace/rax_files_objects.py index a7c36e6920..82bedffddb 100644 --- a/plugins/modules/cloud/rackspace/rax_files_objects.py +++ b/plugins/modules/cloud/rackspace/rax_files_objects.py @@ -38,6 +38,7 @@ options: - Used to set an expiration in seconds on an uploaded file or folder. meta: type: dict + default: {} description: - Items to set as metadata values on an uploaded file or folder. method: diff --git a/plugins/modules/cloud/rackspace/rax_meta.py b/plugins/modules/cloud/rackspace/rax_meta.py index 7937696f88..33acad365c 100644 --- a/plugins/modules/cloud/rackspace/rax_meta.py +++ b/plugins/modules/cloud/rackspace/rax_meta.py @@ -30,6 +30,7 @@ options: - Server name to modify metadata for meta: type: dict + default: {} description: - A hash of metadata to associate with the instance author: "Matt Martz (@sivel)" diff --git a/plugins/modules/cloud/rackspace/rax_mon_check.py b/plugins/modules/cloud/rackspace/rax_mon_check.py index adbd7e7600..c6259dab47 100644 --- a/plugins/modules/cloud/rackspace/rax_mon_check.py +++ b/plugins/modules/cloud/rackspace/rax_mon_check.py @@ -87,6 +87,7 @@ options: I(ip_addresses) hash to resolve an IP address to target. details: type: dict + default: {} description: - Additional details specific to the check type. Must be a hash of strings between 1 and 255 characters long, or an array or object containing 0 to @@ -98,6 +99,7 @@ options: default: false metadata: type: dict + default: {} description: - Hash of arbitrary key-value pairs to accompany this check if it fires. Keys and values must be strings between 1 and 255 characters long. diff --git a/plugins/modules/cloud/rackspace/rax_mon_entity.py b/plugins/modules/cloud/rackspace/rax_mon_entity.py index e8dabef69e..cc502496dc 100644 --- a/plugins/modules/cloud/rackspace/rax_mon_entity.py +++ b/plugins/modules/cloud/rackspace/rax_mon_entity.py @@ -38,6 +38,7 @@ options: bound. Necessary to collect C(agent.) rax_mon_checks against this entity. named_ip_addresses: type: dict + default: {} description: - Hash of IP addresses that may be referenced by name by rax_mon_checks added to this entity. Must be a dictionary of with keys that are names @@ -45,6 +46,7 @@ options: addresses. metadata: type: dict + default: {} description: - Hash of arbitrary C(name), C(value) pairs that are passed to associated rax_mon_alarms. Names and values must all be between 1 and 255 characters diff --git a/plugins/modules/cloud/rackspace/rax_scaling_group.py b/plugins/modules/cloud/rackspace/rax_scaling_group.py index 6389f91a26..ef31cbb031 100644 --- a/plugins/modules/cloud/rackspace/rax_scaling_group.py +++ b/plugins/modules/cloud/rackspace/rax_scaling_group.py @@ -37,6 +37,7 @@ options: - manual files: type: dict + default: {} description: - 'Files to insert into the instance. Hash of C(remotepath: localpath)' flavor: @@ -66,6 +67,7 @@ options: required: true meta: type: dict + default: {} description: - A hash of metadata to associate with the instance min_entities: diff --git a/plugins/modules/cloud/scaleway/scaleway_container_registry.py b/plugins/modules/cloud/scaleway/scaleway_container_registry.py index ed10ddf292..294be2cb4c 100644 --- a/plugins/modules/cloud/scaleway/scaleway_container_registry.py +++ b/plugins/modules/cloud/scaleway/scaleway_container_registry.py @@ -60,6 +60,7 @@ options: description: - Description of the container registry. type: str + default: '' privacy_policy: type: str diff --git a/plugins/modules/cloud/scaleway/scaleway_lb.py b/plugins/modules/cloud/scaleway/scaleway_lb.py index b323064012..124cba5945 100644 --- a/plugins/modules/cloud/scaleway/scaleway_lb.py +++ b/plugins/modules/cloud/scaleway/scaleway_lb.py @@ -66,6 +66,7 @@ options: tags: type: list elements: str + default: [] description: - List of tags to apply to the load-balancer diff --git a/plugins/modules/cloud/softlayer/sl_vm.py b/plugins/modules/cloud/softlayer/sl_vm.py index 851f7a7f53..56b3ccdd39 100644 --- a/plugins/modules/cloud/softlayer/sl_vm.py +++ b/plugins/modules/cloud/softlayer/sl_vm.py @@ -143,6 +143,7 @@ options: - List of ssh keys by their Id to be assigned to a virtual instance. type: list elements: str + default: [] post_uri: description: - URL of a post provisioning script to be loaded and executed on virtual instance. diff --git a/plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py b/plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py index 40d0270800..df2b8d84db 100644 --- a/plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py +++ b/plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py @@ -503,6 +503,12 @@ options: Only works if wait_for_instances is True. type: int + do_not_update: + description: + - TODO document. + type: list + default: [] + ''' EXAMPLES = ''' # Basic configuration YAML example diff --git a/plugins/modules/cloud/univention/udm_dns_zone.py b/plugins/modules/cloud/univention/udm_dns_zone.py index 9b80368536..b75cbe95ac 100644 --- a/plugins/modules/cloud/univention/udm_dns_zone.py +++ b/plugins/modules/cloud/univention/udm_dns_zone.py @@ -43,11 +43,13 @@ options: nameserver: type: list elements: str + default: [] description: - List of appropriate name servers. Required if I(state=present). interfaces: type: list elements: str + default: [] description: - List of interface IP addresses, on which the server should response this zone. Required if I(state=present). diff --git a/plugins/modules/cloud/univention/udm_group.py b/plugins/modules/cloud/univention/udm_group.py index 034cdca1c3..74916cfee2 100644 --- a/plugins/modules/cloud/univention/udm_group.py +++ b/plugins/modules/cloud/univention/udm_group.py @@ -45,11 +45,13 @@ options: - define the whole ldap position of the group, e.g. C(cn=g123m-1A,cn=classes,cn=schueler,cn=groups,ou=schule,dc=example,dc=com). type: str + default: '' ou: required: false description: - LDAP OU, e.g. school for LDAP OU C(ou=school,dc=example,dc=com). type: str + default: '' subpath: required: false description: diff --git a/plugins/modules/cloud/univention/udm_user.py b/plugins/modules/cloud/univention/udm_user.py index 5fef1a337a..d5b26fbb28 100644 --- a/plugins/modules/cloud/univention/udm_user.py +++ b/plugins/modules/cloud/univention/udm_user.py @@ -169,6 +169,7 @@ options: description: - List of telephone numbers. type: list + default: [] postcode: description: - Postal code of users business address. @@ -200,11 +201,13 @@ options: join." aliases: [ sambaPrivileges ] type: list + default: [] samba_user_workstations: description: - Allow the authentication only on this Microsoft Windows host. aliases: [ sambaUserWorkstations ] type: list + default: [] sambahome: description: - Windows home path, e.g. C('\\$FQDN\$USERNAME'). diff --git a/plugins/modules/database/mssql/mssql_db.py b/plugins/modules/database/mssql/mssql_db.py index 7e64dcc2cc..a7d16b2710 100644 --- a/plugins/modules/database/mssql/mssql_db.py +++ b/plugins/modules/database/mssql/mssql_db.py @@ -27,10 +27,12 @@ options: description: - The username used to authenticate with type: str + default: '' login_password: description: - The password used to authenticate with type: str + default: '' login_host: description: - Host running the database diff --git a/plugins/modules/files/iso_customize.py b/plugins/modules/files/iso_customize.py index a6136cdd8f..c3a2ae2651 100644 --- a/plugins/modules/files/iso_customize.py +++ b/plugins/modules/files/iso_customize.py @@ -40,6 +40,7 @@ options: type: list required: false elements: str + default: [] add_files: description: - Allows to add and replace files in the ISO file. @@ -47,6 +48,7 @@ options: type: list required: false elements: dict + default: [] suboptions: src_file: description: diff --git a/plugins/modules/files/xml.py b/plugins/modules/files/xml.py index 05bbdf00c8..a35cc31ef0 100644 --- a/plugins/modules/files/xml.py +++ b/plugins/modules/files/xml.py @@ -40,6 +40,7 @@ options: - The namespace C(prefix:uri) mapping for the XPath expression. - Needs to be a C(dict), not a C(list) of items. type: dict + default: {} state: description: - Set or remove an xpath selection (node(s), attribute(s)). diff --git a/plugins/modules/identity/onepassword_info.py b/plugins/modules/identity/onepassword_info.py index 8118709b17..ddf8579cb1 100644 --- a/plugins/modules/identity/onepassword_info.py +++ b/plugins/modules/identity/onepassword_info.py @@ -86,7 +86,6 @@ options: description: - The secret key for your subdomain. - Only required for initial sign in. - default: {} required: false cli_path: type: path diff --git a/plugins/modules/monitoring/sensu/sensu_check.py b/plugins/modules/monitoring/sensu/sensu_check.py index 943a653249..07b7a060e1 100644 --- a/plugins/modules/monitoring/sensu/sensu_check.py +++ b/plugins/modules/monitoring/sensu/sensu_check.py @@ -53,14 +53,12 @@ options: elements: str description: - List of handlers to notify when the check fails - default: [] subscribers: type: list elements: str description: - List of subscribers/channels this check should run for - See sensu_subscribers to subscribe a machine to a channel - default: [] interval: type: int description: @@ -92,7 +90,6 @@ options: elements: str description: - Other checks this check depends on, if dependencies fail handling of this check will be disabled - default: [] metric: description: - Whether the check is a metric @@ -138,7 +135,6 @@ options: description: - A hash/dictionary of custom parameters for mixing to the configuration. - You can't rewrite others module parameters using this - default: {} source: type: str description: diff --git a/plugins/modules/monitoring/statsd.py b/plugins/modules/monitoring/statsd.py index 26c8e7c283..aed1c08397 100644 --- a/plugins/modules/monitoring/statsd.py +++ b/plugins/modules/monitoring/statsd.py @@ -62,6 +62,7 @@ options: type: str description: - The prefix to add to the metric. + default: '' value: type: int required: true diff --git a/plugins/modules/net_tools/dnsmadeeasy.py b/plugins/modules/net_tools/dnsmadeeasy.py index ec9e9951cd..cb27a5a68a 100644 --- a/plugins/modules/net_tools/dnsmadeeasy.py +++ b/plugins/modules/net_tools/dnsmadeeasy.py @@ -127,7 +127,6 @@ options: description: - Name or id of the contact list that the monitor will notify. - The default C('') means the Account Owner. - default: '' type: str httpFqdn: diff --git a/plugins/modules/net_tools/infinity/infinity.py b/plugins/modules/net_tools/infinity/infinity.py index 53fa7efd48..4b0e835209 100644 --- a/plugins/modules/net_tools/infinity/infinity.py +++ b/plugins/modules/net_tools/infinity/infinity.py @@ -42,27 +42,22 @@ options: description: - Network ID. type: str - default: '' ip_address: description: - IP Address for a reservation or a release. type: str - default: '' network_address: description: - Network address with CIDR format (e.g., 192.168.310.0). type: str - default: '' network_size: description: - Network bitmask (e.g. 255.255.255.220) or CIDR format (e.g., /26). type: str - default: '' network_name: description: - The name of a network. type: str - default: '' network_location: description: - The parent network id for a given network. diff --git a/plugins/modules/net_tools/ldap/ldap_entry.py b/plugins/modules/net_tools/ldap/ldap_entry.py index affdafeb6c..d15b31f6d3 100644 --- a/plugins/modules/net_tools/ldap/ldap_entry.py +++ b/plugins/modules/net_tools/ldap/ldap_entry.py @@ -37,6 +37,7 @@ options: entries are never modified. To assert specific attribute values on an existing entry, use M(community.general.ldap_attrs) module instead. type: dict + default: {} objectClass: description: - If I(state=present), value or list of values to use when creating diff --git a/plugins/modules/notification/mail.py b/plugins/modules/notification/mail.py index 697ed49ee7..9d01fc59a7 100644 --- a/plugins/modules/notification/mail.py +++ b/plugins/modules/notification/mail.py @@ -49,12 +49,14 @@ options: - This is a list, which may contain address and phrase portions. type: list elements: str + default: [] bcc: description: - The email-address(es) the mail is being 'blind' copied to. - This is a list, which may contain address and phrase portions. type: list elements: str + default: [] subject: description: - The subject of the email being sent. diff --git a/plugins/modules/packaging/language/composer.py b/plugins/modules/packaging/language/composer.py index 64310c760e..34a15edda5 100644 --- a/plugins/modules/packaging/language/composer.py +++ b/plugins/modules/packaging/language/composer.py @@ -31,6 +31,7 @@ options: type: str description: - Composer arguments like required package, version and so on. + default: '' executable: type: path description: diff --git a/plugins/modules/packaging/language/maven_artifact.py b/plugins/modules/packaging/language/maven_artifact.py index b909f509a4..754c2392ba 100644 --- a/plugins/modules/packaging/language/maven_artifact.py +++ b/plugins/modules/packaging/language/maven_artifact.py @@ -51,6 +51,7 @@ options: type: str description: - The maven classifier coordinate + default: '' extension: type: str description: diff --git a/plugins/modules/packaging/os/opkg.py b/plugins/modules/packaging/os/opkg.py index f7f3e6ab27..60d2adc958 100644 --- a/plugins/modules/packaging/os/opkg.py +++ b/plugins/modules/packaging/os/opkg.py @@ -47,6 +47,7 @@ options: - "remove" - "checksum" - "removal-of-dependent-packages" + default: "" type: str update_cache: description: diff --git a/plugins/modules/packaging/os/pacman.py b/plugins/modules/packaging/os/pacman.py index c8d6caebe5..1066f10e88 100644 --- a/plugins/modules/packaging/os/pacman.py +++ b/plugins/modules/packaging/os/pacman.py @@ -73,7 +73,7 @@ options: extra_args: description: - Additional option to pass to pacman when enforcing C(state). - default: + default: '' type: str update_cache: @@ -89,7 +89,7 @@ options: update_cache_extra_args: description: - Additional option to pass to pacman when enforcing C(update_cache). - default: + default: '' type: str upgrade: @@ -102,7 +102,7 @@ options: upgrade_extra_args: description: - Additional option to pass to pacman when enforcing C(upgrade). - default: + default: '' type: str reason: diff --git a/plugins/modules/packaging/os/redhat_subscription.py b/plugins/modules/packaging/os/redhat_subscription.py index 26b7d9df2a..69aa550c5d 100644 --- a/plugins/modules/packaging/os/redhat_subscription.py +++ b/plugins/modules/packaging/os/redhat_subscription.py @@ -152,7 +152,6 @@ options: When some attribute is not listed in the new list of attributes, the existing attribute will be removed from C(syspurpose.json) file. Unknown attributes are ignored. type: dict - default: {} suboptions: usage: description: Syspurpose attribute usage diff --git a/plugins/modules/packaging/os/sorcery.py b/plugins/modules/packaging/os/sorcery.py index 23070ad3b3..bd16da1f52 100644 --- a/plugins/modules/packaging/os/sorcery.py +++ b/plugins/modules/packaging/os/sorcery.py @@ -76,6 +76,7 @@ options: - especially useful for SCM and rsync grimoires - makes sense only in pair with C(update_cache) type: int + default: 0 ''' diff --git a/plugins/modules/remote_management/lenovoxcc/xcc_redfish_command.py b/plugins/modules/remote_management/lenovoxcc/xcc_redfish_command.py index 8a213d85ff..4fb0dfe178 100644 --- a/plugins/modules/remote_management/lenovoxcc/xcc_redfish_command.py +++ b/plugins/modules/remote_management/lenovoxcc/xcc_redfish_command.py @@ -70,6 +70,7 @@ options: - The list of media types appropriate for the image. type: list elements: str + default: [] image_url: description: - The URL of the image to insert or eject. diff --git a/plugins/modules/remote_management/manageiq/manageiq_tenant.py b/plugins/modules/remote_management/manageiq/manageiq_tenant.py index f696934b2f..0f4473092b 100644 --- a/plugins/modules/remote_management/manageiq/manageiq_tenant.py +++ b/plugins/modules/remote_management/manageiq/manageiq_tenant.py @@ -65,7 +65,7 @@ options: - ' - C(vms_allocated) (int): use null to remove the quota.' - ' - C(templates_allocated) (int): use null to remove the quota.' required: false - default: null + default: {} ''' EXAMPLES = ''' diff --git a/plugins/modules/remote_management/redfish/redfish_command.py b/plugins/modules/remote_management/redfish/redfish_command.py index 4ab519f5a4..43443cf38e 100644 --- a/plugins/modules/remote_management/redfish/redfish_command.py +++ b/plugins/modules/remote_management/redfish/redfish_command.py @@ -116,6 +116,7 @@ options: description: - Properties of account service to update. type: dict + default: {} version_added: '0.2.0' resource_id: required: false @@ -141,6 +142,7 @@ options: - List of target resource URIs to apply the update to. type: list elements: str + default: [] version_added: '0.2.0' update_creds: required: false @@ -172,6 +174,7 @@ options: - List of media types appropriate for the image. type: list elements: str + default: [] image_url: required: false description: diff --git a/plugins/modules/remote_management/redfish/redfish_config.py b/plugins/modules/remote_management/redfish/redfish_config.py index 0e7d1537bf..07ac2e1588 100644 --- a/plugins/modules/remote_management/redfish/redfish_config.py +++ b/plugins/modules/remote_management/redfish/redfish_config.py @@ -72,6 +72,7 @@ options: description: - Setting dict of manager services to update. type: dict + default: {} version_added: '0.2.0' resource_id: required: false @@ -91,6 +92,7 @@ options: description: - Setting dict of EthernetInterface on OOB controller. type: dict + default: {} version_added: '0.2.0' strip_etag_quotes: description: @@ -106,6 +108,7 @@ options: description: - Setting dict of HostInterface on OOB controller. type: dict + default: {} version_added: '4.1.0' hostinterface_id: required: false @@ -118,6 +121,7 @@ options: description: - Setting dict of Sessions. type: dict + default: {} version_added: '5.7.0' author: "Jose Delarosa (@jose-delarosa)" diff --git a/plugins/modules/remote_management/stacki/stacki_host.py b/plugins/modules/remote_management/stacki/stacki_host.py index 2e339bf280..d5f968c909 100644 --- a/plugins/modules/remote_management/stacki/stacki_host.py +++ b/plugins/modules/remote_management/stacki/stacki_host.py @@ -74,12 +74,14 @@ options: - Rack to be used in host creation. - Required if I(state) is C(present) and host does not yet exist. type: int + default: 0 rank: description: - Rank to be used in host creation. - In Stacki terminology, the rank is the position of the machine in a rack. - Required if I(state) is C(present) and host does not yet exist. type: int + default: 0 network: description: - Network to be configured in the host. diff --git a/plugins/modules/source_control/gitlab/gitlab_hook.py b/plugins/modules/source_control/gitlab/gitlab_hook.py index f69ed8f4e1..c10cb45324 100644 --- a/plugins/modules/source_control/gitlab/gitlab_hook.py +++ b/plugins/modules/source_control/gitlab/gitlab_hook.py @@ -55,6 +55,7 @@ options: - Branch name of wildcard to trigger hook on push events type: str version_added: '0.2.0' + default: '' issues_events: description: - Trigger hook on issues events. diff --git a/plugins/modules/storage/zfs/zfs.py b/plugins/modules/storage/zfs/zfs.py index a09a386f41..84e5c05b1f 100644 --- a/plugins/modules/storage/zfs/zfs.py +++ b/plugins/modules/storage/zfs/zfs.py @@ -38,6 +38,7 @@ options: - A dictionary of zfs properties to be set. - See the zfs(8) man page for more information. type: dict + default: {} notes: - C(check_mode) is supported, but in certain situations it may report a task as changed that will not be reported as changed when C(check_mode) is disabled. diff --git a/plugins/modules/storage/zfs/zfs_facts.py b/plugins/modules/storage/zfs/zfs_facts.py index ee0884f995..15eef706e5 100644 --- a/plugins/modules/storage/zfs/zfs_facts.py +++ b/plugins/modules/storage/zfs/zfs_facts.py @@ -52,6 +52,7 @@ options: description: - Specifies recursion depth. type: int + default: 0 ''' EXAMPLES = ''' diff --git a/plugins/modules/system/aix_lvol.py b/plugins/modules/system/aix_lvol.py index 99bd3ead9b..6219bdb8e3 100644 --- a/plugins/modules/system/aix_lvol.py +++ b/plugins/modules/system/aix_lvol.py @@ -62,11 +62,13 @@ options: description: - Free-form options to be passed to the mklv command. type: str + default: '' pvs: description: - A list of physical volumes e.g. C(hdisk1,hdisk2). type: list elements: str + default: [] ''' EXAMPLES = r''' diff --git a/plugins/modules/system/java_cert.py b/plugins/modules/system/java_cert.py index a78d71155a..1d1327ed71 100644 --- a/plugins/modules/system/java_cert.py +++ b/plugins/modules/system/java_cert.py @@ -56,7 +56,6 @@ options: description: - Password for importing from PKCS12 keystore. type: str - default: '' pkcs12_alias: description: - Alias in the PKCS12 keystore. diff --git a/plugins/modules/system/lvg.py b/plugins/modules/system/lvg.py index 0bb91583fa..ca38565f4a 100644 --- a/plugins/modules/system/lvg.py +++ b/plugins/modules/system/lvg.py @@ -42,6 +42,7 @@ options: description: - Additional options to pass to C(pvcreate) when creating the volume group. type: str + default: '' pvresize: description: - If C(true), resize the physical volume to the maximum available size. @@ -52,6 +53,7 @@ options: description: - Additional options to pass to C(vgcreate) when creating the volume group. type: str + default: '' state: description: - Control if the volume group exists. diff --git a/plugins/modules/system/selinux_permissive.py b/plugins/modules/system/selinux_permissive.py index 2578519909..3563775d14 100644 --- a/plugins/modules/system/selinux_permissive.py +++ b/plugins/modules/system/selinux_permissive.py @@ -38,6 +38,7 @@ options: description: - Name of the SELinux policy store to use. type: str + default: '' notes: - Requires a recent version of SELinux and C(policycoreutils-python) (EL 6 or newer). requirements: [ policycoreutils-python ] diff --git a/plugins/modules/web_infrastructure/jira.py b/plugins/modules/web_infrastructure/jira.py index 979dd6d69c..3b006a55bb 100644 --- a/plugins/modules/web_infrastructure/jira.py +++ b/plugins/modules/web_infrastructure/jira.py @@ -161,6 +161,7 @@ options: and the JIRA REST API for the structure required for various fields. - When passed to comment, the data structure is merged at the first level since community.general 4.6.0. Useful to add JIRA properties for example. - Note that JIRA may not allow changing field values on specific transitions or states. + default: {} jql: required: false diff --git a/plugins/modules/web_infrastructure/sophos_utm/utm_aaa_group.py b/plugins/modules/web_infrastructure/sophos_utm/utm_aaa_group.py index 7d55449f63..cff1834c93 100644 --- a/plugins/modules/web_infrastructure/sophos_utm/utm_aaa_group.py +++ b/plugins/modules/web_infrastructure/sophos_utm/utm_aaa_group.py @@ -33,10 +33,12 @@ options: - List of adirectory group strings. type: list elements: str + default: [] adirectory_groups_sids: description: - Dictionary of group sids. type: dict + default: {} backend_match: description: - The backend for the group. @@ -68,18 +70,22 @@ options: - List of edirectory group strings. type: list elements: str + default: [] ipsec_dn: description: - The ipsec dn string. type: str + default: '' ldap_attribute: description: - The ldap attribute to check against. type: str + default: '' ldap_attribute_value: description: - The ldap attribute value to check against. type: str + default: '' members: description: - A list of user ref names (aaa/user). diff --git a/plugins/modules/web_infrastructure/sophos_utm/utm_dns_host.py b/plugins/modules/web_infrastructure/sophos_utm/utm_dns_host.py index 387b8301a0..af91e2433b 100644 --- a/plugins/modules/web_infrastructure/sophos_utm/utm_dns_host.py +++ b/plugins/modules/web_infrastructure/sophos_utm/utm_dns_host.py @@ -42,6 +42,7 @@ options: type: str description: - An optional comment to add to the dns host object + default: '' hostname: type: str description: @@ -50,6 +51,7 @@ options: type: str description: - The reference name of the interface to use. If not provided the default interface will be used + default: '' resolved: description: - whether the hostname's ipv4 address is already resolved or not diff --git a/plugins/modules/web_infrastructure/sophos_utm/utm_network_interface_address.py b/plugins/modules/web_infrastructure/sophos_utm/utm_network_interface_address.py index cb10ad49f4..e980a0221b 100644 --- a/plugins/modules/web_infrastructure/sophos_utm/utm_network_interface_address.py +++ b/plugins/modules/web_infrastructure/sophos_utm/utm_network_interface_address.py @@ -42,6 +42,7 @@ options: type: str description: - An optional comment to add to the object + default: '' resolved: type: bool description: diff --git a/plugins/modules/web_infrastructure/sophos_utm/utm_proxy_location.py b/plugins/modules/web_infrastructure/sophos_utm/utm_proxy_location.py index 5864cf1924..c6ff1bd26b 100644 --- a/plugins/modules/web_infrastructure/sophos_utm/utm_proxy_location.py +++ b/plugins/modules/web_infrastructure/sophos_utm/utm_proxy_location.py @@ -48,6 +48,7 @@ options: type: str description: - The reference name of the auth profile + default: '' backend: type: list elements: str @@ -58,10 +59,12 @@ options: type: str description: - The path of the backend + default: '' comment: type: str description: - The optional comment string + default: '' denied_networks: type: list elements: str diff --git a/tests/integration/targets/lookup_passwordstore/tasks/password_tests.yml b/tests/integration/targets/lookup_passwordstore/tasks/password_tests.yml index c701e199ae..a94529e460 100644 --- a/tests/integration/targets/lookup_passwordstore/tasks/password_tests.yml +++ b/tests/integration/targets/lookup_passwordstore/tasks/password_tests.yml @@ -5,7 +5,7 @@ - name: Create a password ({{ backend }}) set_fact: - newpass: "{{ lookup('community.general.passwordstore', 'test-pass length=8 create=yes', backend=backend) }}" + newpass: "{{ lookup('community.general.passwordstore', 'test-pass', length=8, create=true, backend=backend) }}" - name: Fetch password from an existing file ({{ backend }}) set_fact: @@ -18,7 +18,7 @@ - name: Create a password with equal sign ({{ backend }}) set_fact: - newpass: "{{ lookup('community.general.passwordstore', 'test-pass-equal userpass=SimpleSample= create=yes', backend=backend) }}" + newpass: "{{ lookup('community.general.passwordstore', 'test-pass-equal userpass=SimpleSample= create=true', backend=backend) }}" - name: Fetch a password with equal sign ({{ backend }}) set_fact: @@ -31,7 +31,7 @@ - name: Create a password using missing=create ({{ backend }}) set_fact: - newpass: "{{ lookup('community.general.passwordstore', 'test-missing-create missing=create length=8', backend=backend) }}" + newpass: "{{ lookup('community.general.passwordstore', 'test-missing-create', missing='create', length=8, backend=backend) }}" - name: Fetch password from an existing file ({{ backend }}) set_fact: @@ -44,7 +44,7 @@ - name: Fetch password from existing file using missing=empty ({{ backend }}) set_fact: - readpass: "{{ lookup('community.general.passwordstore', 'test-missing-create missing=empty', backend=backend) }}" + readpass: "{{ lookup('community.general.passwordstore', 'test-missing-create', missing='empty', backend=backend) }}" - name: Verify password ({{ backend }}) assert: @@ -53,7 +53,7 @@ - name: Fetch password from non-existing file using missing=empty ({{ backend }}) set_fact: - readpass: "{{ query('community.general.passwordstore', 'test-missing-pass missing=empty', backend=backend) }}" + readpass: "{{ query('community.general.passwordstore', 'test-missing-pass', missing='empty', backend=backend) }}" - name: Verify password ({{ backend }}) assert: @@ -71,7 +71,7 @@ - name: Fetch a password with YAML subkey ({{ backend }}) set_fact: - readyamlpass: "{{ lookup('community.general.passwordstore', 'test-yaml-pass subkey=key', backend=backend) }}" + readyamlpass: "{{ lookup('community.general.passwordstore', 'test-yaml-pass', subkey='key', backend=backend) }}" - name: Read a yaml subkey ({{ backend }}) assert: @@ -96,7 +96,7 @@ - name: Fetch all from multiline file ({{ backend }}) set_fact: - readyamlpass: "{{ lookup('community.general.passwordstore', 'test-multiline-pass returnall=yes', backend=backend) }}" + readyamlpass: "{{ lookup('community.general.passwordstore', 'test-multiline-pass', returnall='yes', backend=backend) }}" - name: Multiline pass returnall returns everything in the file ({{ backend }}) assert: @@ -105,7 +105,7 @@ - name: Create a password in a folder ({{ backend }}) set_fact: - newpass: "{{ lookup('community.general.passwordstore', 'folder/test-pass length=8 create=yes', backend=backend) }}" + newpass: "{{ lookup('community.general.passwordstore', 'folder/test-pass', length=8, create=true, backend=backend) }}" - name: Fetch password from folder ({{ backend }}) set_fact: diff --git a/tests/integration/targets/lookup_passwordstore/tasks/tests.yml b/tests/integration/targets/lookup_passwordstore/tasks/tests.yml index a18b58d651..583aafd108 100644 --- a/tests/integration/targets/lookup_passwordstore/tasks/tests.yml +++ b/tests/integration/targets/lookup_passwordstore/tasks/tests.yml @@ -125,7 +125,9 @@ that: - eval_error is failed - >- - "Passwordstore directory 'somenonexistentplace' does not exist" in eval_error.msg + "Passwordstore directory '" in eval_error.msg + - >- + "/somenonexistentplace' does not exist" in eval_error.msg - name: Test pass compatibility shim detection block: