From 1aca1f86b6037def60bf7460c0c702fe7fdd21ac Mon Sep 17 00:00:00 2001 From: Evgeni Golov Date: Thu, 5 Sep 2019 17:48:11 +0200 Subject: [PATCH] don't set default:None in documentation when there is no default (#61111) otherwise "None" will be rendered as a string on docsite --- lib/ansible/modules/database/influxdb/influxdb_user.py | 1 - lib/ansible/modules/monitoring/zabbix/zabbix_screen.py | 2 -- lib/ansible/plugins/lookup/consul_kv.py | 2 -- lib/ansible/plugins/lookup/hashi_vault.py | 1 - lib/ansible/plugins/lookup/onepassword.py | 4 ---- lib/ansible/plugins/lookup/onepassword_raw.py | 4 ---- lib/ansible/plugins/lookup/password.py | 1 - lib/ansible/plugins/lookup/url.py | 2 -- test/sanity/ignore.txt | 1 - 9 files changed, 18 deletions(-) diff --git a/lib/ansible/modules/database/influxdb/influxdb_user.py b/lib/ansible/modules/database/influxdb/influxdb_user.py index d8f8f67601d..ed0728cbfa0 100644 --- a/lib/ansible/modules/database/influxdb/influxdb_user.py +++ b/lib/ansible/modules/database/influxdb/influxdb_user.py @@ -49,7 +49,6 @@ options: "database" and "privilege" keys. - If this argument is not provided, the current grants will be left alone. If an empty list is provided, all grants for the user will be removed. - default: None version_added: 2.8 extends_documentation_fragment: influxdb ''' diff --git a/lib/ansible/modules/monitoring/zabbix/zabbix_screen.py b/lib/ansible/modules/monitoring/zabbix/zabbix_screen.py index a234fbfd842..96f837da285 100644 --- a/lib/ansible/modules/monitoring/zabbix/zabbix_screen.py +++ b/lib/ansible/modules/monitoring/zabbix/zabbix_screen.py @@ -64,12 +64,10 @@ options: description: - Graph width will be set in graph settings. type: int - default: None graph_height: description: - Graph height will be set in graph settings. type: int - default: None graphs_in_row: description: - Limit columns of a screen and make multiple rows. diff --git a/lib/ansible/plugins/lookup/consul_kv.py b/lib/ansible/plugins/lookup/consul_kv.py index 9e5e4d8e624..50da99fe255 100644 --- a/lib/ansible/plugins/lookup/consul_kv.py +++ b/lib/ansible/plugins/lookup/consul_kv.py @@ -32,7 +32,6 @@ DOCUMENTATION = """ description: - If the key has a value with the specified index then this is returned allowing access to historical values. datacenter: - default: None description: - Retrieve the key from a consul datatacenter other than the default for the consul host. version_added: "2.9" @@ -71,7 +70,6 @@ DOCUMENTATION = """ key: validate_certs version_added: "2.8" client_cert: - default: None description: The client cert to verify the ssl connection. env: - name: ANSIBLE_CONSUL_CLIENT_CERT diff --git a/lib/ansible/plugins/lookup/hashi_vault.py b/lib/ansible/plugins/lookup/hashi_vault.py index 016f44528d4..473872d4ada 100644 --- a/lib/ansible/plugins/lookup/hashi_vault.py +++ b/lib/ansible/plugins/lookup/hashi_vault.py @@ -64,7 +64,6 @@ DOCUMENTATION = """ namespace: version_added: "2.8" description: namespace where secrets reside. requires HVAC 0.7.0+ and Vault 0.11+. - default: None """ EXAMPLES = """ diff --git a/lib/ansible/plugins/lookup/onepassword.py b/lib/ansible/plugins/lookup/onepassword.py index e927d794d93..ea03a424504 100644 --- a/lib/ansible/plugins/lookup/onepassword.py +++ b/lib/ansible/plugins/lookup/onepassword.py @@ -34,15 +34,12 @@ DOCUMENTATION = """ default: 'password' master_password: description: The password used to unlock the specified vault. - default: None version_added: '2.7' aliases: ['vault_password'] section: description: Item section containing the field to retrieve (case-insensitive). If absent will return first match from any section. - default: None subdomain: description: The 1Password subdomain to authenticate against. - default: None version_added: '2.7' username: description: The username used to sign in. @@ -52,7 +49,6 @@ DOCUMENTATION = """ version_added: '2.7' vault: description: Vault containing the item to retrieve (case-insensitive). If absent will search all vaults. - default: None notes: - This lookup will use an existing 1Password session if one exists. If not, and you have already performed an initial sign in (meaning C(~/.op/config exists)), then only the C(master_password) is required. diff --git a/lib/ansible/plugins/lookup/onepassword_raw.py b/lib/ansible/plugins/lookup/onepassword_raw.py index a6824c34d0d..9f918111804 100644 --- a/lib/ansible/plugins/lookup/onepassword_raw.py +++ b/lib/ansible/plugins/lookup/onepassword_raw.py @@ -29,15 +29,12 @@ DOCUMENTATION = """ required: True master_password: description: The password used to unlock the specified vault. - default: None version_added: '2.7' aliases: ['vault_password'] section: description: Item section containing the field to retrieve (case-insensitive). If absent will return first match from any section. - default: None subdomain: description: The 1Password subdomain to authenticate against. - default: None version_added: '2.7' username: description: The username used to sign in. @@ -47,7 +44,6 @@ DOCUMENTATION = """ version_added: '2.7' vault: description: Vault containing the item to retrieve (case-insensitive). If absent will search all vaults. - default: None notes: - This lookup will use an existing 1Password session if one exists. If not, and you have already performed an initial sign in (meaning C(~/.op/config exists)), then only the C(master_password) is required. diff --git a/lib/ansible/plugins/lookup/password.py b/lib/ansible/plugins/lookup/password.py index c4c347431bf..3ebe120be9e 100644 --- a/lib/ansible/plugins/lookup/password.py +++ b/lib/ansible/plugins/lookup/password.py @@ -33,7 +33,6 @@ DOCUMENTATION = """ - Note that the password is always stored as plain text, only the returning password is encrypted. - Encrypt also forces saving the salt value for idempotence. - Note that before 2.6 this option was incorrectly labeled as a boolean for a long time. - default: None chars: version_added: "1.4" description: diff --git a/lib/ansible/plugins/lookup/url.py b/lib/ansible/plugins/lookup/url.py index 59830d9f106..2ee59adf250 100644 --- a/lib/ansible/plugins/lookup/url.py +++ b/lib/ansible/plugins/lookup/url.py @@ -29,12 +29,10 @@ options: username: description: Username to use for HTTP authentication. type: string - default: None version_added: "2.8" password: description: Password to use for HTTP authentication. type: string - default: None version_added: "2.8" headers: description: HTTP request headers diff --git a/test/sanity/ignore.txt b/test/sanity/ignore.txt index c30bab4416f..24d31f0d8e3 100644 --- a/test/sanity/ignore.txt +++ b/test/sanity/ignore.txt @@ -2405,7 +2405,6 @@ lib/ansible/modules/monitoring/zabbix/zabbix_map.py validate-modules:parameter-t lib/ansible/modules/monitoring/zabbix/zabbix_map.py validate-modules:doc-missing-type lib/ansible/modules/monitoring/zabbix/zabbix_proxy.py validate-modules:parameter-type-not-in-doc lib/ansible/modules/monitoring/zabbix/zabbix_proxy.py validate-modules:doc-missing-type -lib/ansible/modules/monitoring/zabbix/zabbix_screen.py validate-modules:doc-default-incompatible-type lib/ansible/modules/monitoring/zabbix/zabbix_template.py validate-modules:parameter-type-not-in-doc lib/ansible/modules/monitoring/zabbix/zabbix_template.py validate-modules:doc-missing-type lib/ansible/modules/net_tools/basics/get_url.py validate-modules:parameter-type-not-in-doc