diff --git a/lib/ansible/modules/cloud/openstack/os_keystone_domain.py b/lib/ansible/modules/cloud/openstack/os_keystone_domain.py index c3685aa09e..29f931ac41 100644 --- a/lib/ansible/modules/cloud/openstack/os_keystone_domain.py +++ b/lib/ansible/modules/cloud/openstack/os_keystone_domain.py @@ -17,7 +17,7 @@ module: os_keystone_domain short_description: Manage OpenStack Identity Domains author: - Monty Taylor (@emonty) - - Haneef Ali + - Haneef Ali (@haneefs) extends_documentation_fragment: openstack version_added: "2.1" description: diff --git a/lib/ansible/modules/identity/cyberark/cyberark_authentication.py b/lib/ansible/modules/identity/cyberark/cyberark_authentication.py index ef72ae4e2e..60257fc2fd 100644 --- a/lib/ansible/modules/identity/cyberark/cyberark_authentication.py +++ b/lib/ansible/modules/identity/cyberark/cyberark_authentication.py @@ -13,7 +13,10 @@ DOCUMENTATION = ''' --- module: cyberark_authentication short_description: Module for CyberArk Vault Authentication using PAS Web Services SDK -author: Edward Nunez @ CyberArk BizDev (@enunez-cyberark, @cyberark-bizdev, @erasmix) +author: + - Edward Nunez (@enunez-cyberark) CyberArk BizDev + - Cyberark Bizdev (@cyberark-bizdev) + - erasmix (@erasmix) version_added: 2.4 description: - Authenticates to CyberArk Vault using Privileged Account Security Web Services SDK and diff --git a/lib/ansible/modules/identity/cyberark/cyberark_user.py b/lib/ansible/modules/identity/cyberark/cyberark_user.py index b10bb290db..966ea08700 100644 --- a/lib/ansible/modules/identity/cyberark/cyberark_user.py +++ b/lib/ansible/modules/identity/cyberark/cyberark_user.py @@ -13,7 +13,10 @@ DOCUMENTATION = ''' --- module: cyberark_user short_description: Module for CyberArk User Management using PAS Web Services SDK -author: Edward Nunez @ CyberArk BizDev (@enunez-cyberark, @cyberark-bizdev, @erasmix) +author: + - Edward Nunez (@enunez-cyberark) CyberArk BizDev + - Cyberark Bizdev (@cyberark-bizdev) + - erasmix (@erasmix) version_added: 2.4 description: - CyberArk User Management using PAS Web Services SDK. It currently supports the following diff --git a/lib/ansible/modules/monitoring/pagerduty.py b/lib/ansible/modules/monitoring/pagerduty.py index 8a7c07acf0..81f3e7216c 100644 --- a/lib/ansible/modules/monitoring/pagerduty.py +++ b/lib/ansible/modules/monitoring/pagerduty.py @@ -23,7 +23,7 @@ version_added: "1.2" author: - "Andrew Newdigate (@suprememoocow)" - "Dylan Silva (@thaumos)" - - "Justin Johns" + - "Justin Johns (!UNKNOWN)" - "Bruce Pennypacker (@bpennypacker)" requirements: - PagerDuty API access diff --git a/lib/ansible/modules/monitoring/pingdom.py b/lib/ansible/modules/monitoring/pingdom.py index 7ebad7043e..8e8252fd49 100644 --- a/lib/ansible/modules/monitoring/pingdom.py +++ b/lib/ansible/modules/monitoring/pingdom.py @@ -21,7 +21,7 @@ description: version_added: "1.2" author: - "Dylan Silva (@thaumos)" - - "Justin Johns" + - "Justin Johns (!UNKNOWN)" requirements: - "This pingdom python library: https://github.com/mbabineau/pingdom-python" options: diff --git a/lib/ansible/modules/monitoring/zabbix/zabbix_group.py b/lib/ansible/modules/monitoring/zabbix/zabbix_group.py index 0f09a660e4..b2ba73d0b9 100644 --- a/lib/ansible/modules/monitoring/zabbix/zabbix_group.py +++ b/lib/ansible/modules/monitoring/zabbix/zabbix_group.py @@ -23,7 +23,7 @@ description: version_added: "1.8" author: - "Cove (@cove)" - - "Tony Minfei Ding" + - "Tony Minfei Ding (!UNKNOWN)" - "Harrison Gu (@harrisongu)" requirements: - "python >= 2.6" diff --git a/lib/ansible/modules/monitoring/zabbix/zabbix_host.py b/lib/ansible/modules/monitoring/zabbix/zabbix_host.py index 67d905521f..6028faeb61 100644 --- a/lib/ansible/modules/monitoring/zabbix/zabbix_host.py +++ b/lib/ansible/modules/monitoring/zabbix/zabbix_host.py @@ -22,7 +22,7 @@ description: version_added: "2.0" author: - "Cove (@cove)" - - Tony Minfei Ding + - Tony Minfei Ding (!UNKNOWN) - Harrison Gu (@harrisongu) - Werner Dijkerman (@dj-wasabi) - Eike Frost (@eikef) diff --git a/lib/ansible/modules/monitoring/zabbix/zabbix_hostmacro.py b/lib/ansible/modules/monitoring/zabbix/zabbix_hostmacro.py index afaa5a631e..a93ed1c486 100644 --- a/lib/ansible/modules/monitoring/zabbix/zabbix_hostmacro.py +++ b/lib/ansible/modules/monitoring/zabbix/zabbix_hostmacro.py @@ -22,7 +22,7 @@ description: version_added: "2.0" author: - "Cove (@cove)" - - Dean Hailin Song + - Dean Hailin Song (!UNKNOWN) requirements: - "python >= 2.6" - zabbix-api diff --git a/lib/ansible/modules/monitoring/zabbix/zabbix_screen.py b/lib/ansible/modules/monitoring/zabbix/zabbix_screen.py index 98df31f553..dc3e406f82 100644 --- a/lib/ansible/modules/monitoring/zabbix/zabbix_screen.py +++ b/lib/ansible/modules/monitoring/zabbix/zabbix_screen.py @@ -22,7 +22,7 @@ description: version_added: "2.0" author: - "Cove (@cove)" - - "Tony Minfei Ding" + - "Tony Minfei Ding (!UNKNOWN)" - "Harrison Gu (@harrisongu)" requirements: - "python >= 2.6" diff --git a/lib/ansible/modules/network/cloudengine/ce_ospf_vrf.py b/lib/ansible/modules/network/cloudengine/ce_ospf_vrf.py index dc27e9a59e..b262ce0248 100644 --- a/lib/ansible/modules/network/cloudengine/ce_ospf_vrf.py +++ b/lib/ansible/modules/network/cloudengine/ce_ospf_vrf.py @@ -27,7 +27,7 @@ version_added: "2.4" short_description: Manages configuration of an OSPF VPN instance on HUAWEI CloudEngine switches. description: - Manages configuration of an OSPF VPN instance on HUAWEI CloudEngine switches. -author: Yang yang (@CloudEngine Ansible) +author: Yang yang (@QijunPan) options: ospf: description: diff --git a/lib/ansible/modules/network/panos/panos_sag.py b/lib/ansible/modules/network/panos/panos_sag.py index 2abbcf0620..d22e85e28c 100644 --- a/lib/ansible/modules/network/panos/panos_sag.py +++ b/lib/ansible/modules/network/panos/panos_sag.py @@ -25,7 +25,7 @@ module: panos_sag short_description: Create a static address group. description: - Create a static address group object in the firewall used for policy rules. -author: "Vinay Venkataraghavan @vinayvenkat" +author: "Vinay Venkataraghavan (@vinayvenkat)" version_added: "2.4" requirements: - pan-python can be obtained from PyPI U(https://pypi.org/project/pan-python/) diff --git a/lib/ansible/modules/packaging/language/yarn.py b/lib/ansible/modules/packaging/language/yarn.py index 6a4ecba471..f5bc45b3d7 100644 --- a/lib/ansible/modules/packaging/language/yarn.py +++ b/lib/ansible/modules/packaging/language/yarn.py @@ -23,7 +23,7 @@ description: version_added: "2.6" author: - "David Gunter (@verkaufer)" - - "Chris Hoffman (@chrishoffman, creator of NPM Ansible module)" + - "Chris Hoffman (@chrishoffman), creator of NPM Ansible module)" options: name: description: diff --git a/lib/ansible/modules/system/cron.py b/lib/ansible/modules/system/cron.py index 8fa1d51634..e7d3fc9b3d 100644 --- a/lib/ansible/modules/system/cron.py +++ b/lib/ansible/modules/system/cron.py @@ -128,7 +128,7 @@ requirements: - cron author: - Dane Summers (@dsummersl) - - Mike Grozak + - Mike Grozak (@rhaido) - Patrick Callahan (@dirtyharrycallahan) - Evan Kaufman (@EvanK) - Luca Berruti (@lberruti) diff --git a/lib/ansible/modules/system/setup.py b/lib/ansible/modules/system/setup.py index aa2f9cacb8..5654b10cfa 100644 --- a/lib/ansible/modules/system/setup.py +++ b/lib/ansible/modules/system/setup.py @@ -83,7 +83,7 @@ notes: author: - "Ansible Core Team" - "Michael DeHaan" - - "David O'Brien @david_obrien davidobrien1985" + - "David O'Brien (@davidobrien1985)" ''' EXAMPLES = """ diff --git a/test/sanity/validate-modules/schema.py b/test/sanity/validate-modules/schema.py index 71d95f1f00..0c98b679a3 100644 --- a/test/sanity/validate-modules/schema.py +++ b/test/sanity/validate-modules/schema.py @@ -16,11 +16,21 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -from voluptuous import ALLOW_EXTRA, PREVENT_EXTRA, All, Any, Length, Required, Schema, Self +import re +from voluptuous import ALLOW_EXTRA, PREVENT_EXTRA, All, Any, Length, Invalid, Required, Schema, Self from ansible.module_utils.six import string_types +from ansible.module_utils.common.collections import is_iterable list_string_types = list(string_types) any_string_types = Any(*string_types) +# Valid DOCUMENTATION.author lines +# Based on Ansibulbot's extract_github_id() +# author: First Last (@name) [optional anything] +# "Ansible Core Team" - Used by the Bot +# "Michael DeHaan" - nop +# "Name (!UNKNOWN)" - For the few untraceable authors +author_line = re.compile(r'^\w.*(\(@([\w-]+)\)|!UNKNOWN)(?![\w.])|^Ansible Core Team$|^Michael DeHaan$') + def sequence_of_sequences(min=None, max=None): return All( @@ -140,6 +150,17 @@ deprecation_schema = Schema( ) +def author(value): + + if not is_iterable(value): + value = [value] + + for line in value: + m = author_line.search(line) + if not m: + raise Invalid("Invalid author") + + def doc_schema(module_name): deprecated_module = False @@ -151,7 +172,7 @@ def doc_schema(module_name): Required('short_description'): Any(*string_types), Required('description'): Any(list_string_types, *string_types), Required('version_added'): Any(float, *string_types), - Required('author'): Any(None, list_string_types, *string_types), + Required('author'): All(Any(None, list_string_types, *string_types), author), 'notes': Any(None, list_string_types), 'requirements': list_string_types, 'todo': Any(None, list_string_types, *string_types),