Enabling validation-modules for web_infrastructure modules (#1200) (#1211)

* fixed validation-modules for apache2_mod_proxy.py

* fixed validation-modules for apache2_module.py

* fixed validation-modules for deploy_helper.py

The ignore lines were put back in place because
add_file_common_args=True is used and the module inherits a number of
options that do not show up in the documentation (nor should they).

* fixed validation-modules for ejabberd_user.py

* fixed validation-modules for gunicorn.py

* fixed validation-modules for htpasswd.py

* fixed validation-modules for jenkins_job.py

* fixed validation-modules for jenkins_job_info.py

* fixed validation-modules for jenkins_plugin.py

* fixed validation-modules for jenkins_script.py

* fixed validation-modules for jira.py

* fixed validation-modules for nginx_status_facts.py

* fixed validation-modules for rundeck_acl_policy.py

* fixed validation-modules for rundeck_project.py

* fixed validation-modules for supervisorctl.py

* fixed validation-modules for taiga_issue.py

* fixed pylint mistake in plugins/modules/web_infrastructure/jenkins_job_info.py

* removed ignore lines for almost-all web_infrastructure modules

* rolled back ignore lines for nested sophos_utm modules that were not adjusted

* Removed doc-missing-type from ignore-2.11.txt for deploy_helper and jenkins_plugin

* When adding lines back to ignore files, we added more than it was before. Removing.

* Rolled back deprecation line in ignore-2.9.txt for nginx_status_facts

* Rolled back yet another line in ignore-2.9.txt for nginx_status_facts

* Fixed argument_spec and docs for crypt_scheme parameter in htpasswd, per PR

* Added extends_documentation_fragment:files to deploy_helper and jenkins_plugin

* Removed long-deprecated option params from jenkins_plugin, removed validate-modules lines from ignore files for that module

* Update plugins/modules/web_infrastructure/htpasswd.py

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 85371e7b6d)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This commit is contained in:
patchback[bot] 2020-10-31 14:28:15 +01:00 committed by GitHub
parent 5a826a5cb7
commit 901bca58bb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 180 additions and 166 deletions

View file

@ -18,26 +18,32 @@ description:
options:
group:
type: str
description:
- Name of the Jenkins group on the OS.
default: jenkins
jenkins_home:
type: path
description:
- Home directory of the Jenkins user.
default: /var/lib/jenkins
mode:
type: raw
description:
- File mode applied on versioned plugins.
default: '0644'
name:
type: str
description:
- Plugin name.
required: yes
owner:
type: str
description:
- Name of the Jenkins user on the OS.
default: jenkins
state:
type: str
description:
- Desired plugin state.
- If the C(latest) is set, the check for new version will be performed
@ -45,10 +51,12 @@ options:
choices: [absent, present, pinned, unpinned, enabled, disabled, latest]
default: present
timeout:
type: int
description:
- Server connection timeout in secs.
default: 30
updates_expiration:
type: int
description:
- Number of seconds after which a new copy of the I(update-center.json)
file is downloaded. This is used to avoid the need to download the
@ -58,16 +66,19 @@ options:
C(latest) is specified.
default: 86400
updates_url:
type: str
description:
- URL of the Update Centre.
- Used as the base URL to download the plugins and the
I(update-center.json) JSON file.
default: https://updates.jenkins.io
url:
type: str
description:
- URL of the Jenkins server.
default: http://localhost:8080
version:
type: str
description:
- Plugin version number.
- If this option is specified, all plugin dependencies must be installed
@ -95,10 +106,9 @@ notes:
- It is not possible to run the module remotely by changing the I(url)
parameter to point to the Jenkins server. The module must be used on the
host where Jenkins runs as it needs direct access to the plugin files.
- "The C(params) option was removed in Ansible 2.5 due to circumventing Ansible's
option handling"
extends_documentation_fragment:
- url
- files
'''
EXAMPLES = '''
@ -692,12 +702,11 @@ def main():
# Module arguments
argument_spec = url_argument_spec()
argument_spec.update(
group=dict(default='jenkins'),
jenkins_home=dict(default='/var/lib/jenkins'),
group=dict(type='str', default='jenkins'),
jenkins_home=dict(type='path', default='/var/lib/jenkins'),
mode=dict(default='0644', type='raw'),
name=dict(required=True),
owner=dict(default='jenkins'),
params=dict(type='dict'),
name=dict(type='str', required=True),
owner=dict(type='str', default='jenkins'),
state=dict(
choices=[
'present',
@ -723,11 +732,6 @@ def main():
supports_check_mode=True,
)
# Params was removed
# https://meetbot.fedoraproject.org/ansible-meeting/2017-09-28/ansible_dev_meeting.2017-09-28-15.00.log.html
if module.params['params']:
module.fail_json(msg="The params option to jenkins_plugin was removed in Ansible 2.5 since it circumvents Ansible's option handling")
# Force basic authentication
module.params['force_basic_auth'] = True