Skip to content

Commit

Permalink
zabbix: Move commonly used docs to doc fragments (ansible#31833)
Browse files Browse the repository at this point in the history
* Move commonly used configuration parameter documentation for zabbix_*-modules to cental doc fragment

* fix indentation
  • Loading branch information
eikef authored and resmo committed Oct 17, 2017
1 parent ee4e1be commit 0a89873
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 150 deletions.
30 changes: 0 additions & 30 deletions lib/ansible/modules/monitoring/zabbix_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,42 +29,12 @@
- "python >= 2.6"
- zabbix-api
options:
server_url:
description:
- Url of Zabbix server, with protocol (http or https).
C(url) is an alias for C(server_url).
required: true
aliases: [ "url" ]
login_user:
description:
- Zabbix user name.
required: true
login_password:
description:
- Zabbix user password.
required: true
http_login_user:
description:
- Basic Auth login
required: false
default: None
version_added: "2.1"
http_login_password:
description:
- Basic Auth password
required: false
default: None
version_added: "2.1"
state:
description:
- Create or delete host group.
required: false
default: "present"
choices: [ "present", "absent" ]
timeout:
description:
- The timeout of API request(seconds).
default: 10
host_groups:
description:
- List of host groups to create or delete.
Expand Down
29 changes: 0 additions & 29 deletions lib/ansible/modules/monitoring/zabbix_host.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,31 +29,6 @@
- "python >= 2.6"
- "zabbix-api >= 0.5.3"
options:
server_url:
description:
- Url of Zabbix server, with protocol (http or https).
required: true
aliases: [ "url" ]
login_user:
description:
- Zabbix user name, used to authenticate against the server.
required: true
login_password:
description:
- Zabbix user password.
required: true
http_login_user:
description:
- Basic Auth login
required: false
default: None
version_added: "2.1"
http_login_password:
description:
- Basic Auth password
required: false
default: None
version_added: "2.1"
host_name:
description:
- Name of the host in Zabbix.
Expand Down Expand Up @@ -99,10 +74,6 @@
required: false
choices: ['present', 'absent']
default: "present"
timeout:
description:
- The timeout of API request (seconds).
default: 10
proxy:
description:
- The name of the Zabbix Proxy to be used
Expand Down
29 changes: 0 additions & 29 deletions lib/ansible/modules/monitoring/zabbix_hostmacro.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,31 +27,6 @@
- "python >= 2.6"
- zabbix-api
options:
server_url:
description:
- Url of Zabbix server, with protocol (http or https).
required: true
aliases: [ "url" ]
login_user:
description:
- Zabbix user name.
required: true
login_password:
description:
- Zabbix user password.
required: true
http_login_user:
description:
- Basic Auth login
required: false
default: None
version_added: "2.1"
http_login_password:
description:
- Basic Auth password
required: false
default: None
version_added: "2.1"
host_name:
description:
- Name of the host.
Expand All @@ -72,10 +47,6 @@
required: false
choices: ['present', 'absent']
default: "present"
timeout:
description:
- The timeout of API request (seconds).
default: 10
extends_documentation_fragment:
- zabbix
Expand Down
33 changes: 0 additions & 33 deletions lib/ansible/modules/monitoring/zabbix_maintenance.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,33 +31,6 @@
required: false
default: present
choices: [ "present", "absent" ]
server_url:
description:
- Url of Zabbix server, with protocol (http or https).
C(url) is an alias for C(server_url).
required: true
default: null
aliases: [ "url" ]
login_user:
description:
- Zabbix user name.
required: true
login_password:
description:
- Zabbix user password.
required: true
http_login_user:
description:
- Basic Auth login
required: false
default: None
version_added: "2.1"
http_login_password:
description:
- Basic Auth password
required: false
default: None
version_added: "2.1"
host_names:
description:
- Hosts to manage maintenance window for.
Expand Down Expand Up @@ -97,12 +70,6 @@
- Type of maintenance. With data collection, or without.
required: false
default: "true"
timeout:
description:
- The timeout of API request (seconds).
default: 10
version_added: "2.1"
required: false
extends_documentation_fragment:
- zabbix
Expand Down
29 changes: 0 additions & 29 deletions lib/ansible/modules/monitoring/zabbix_screen.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,35 +28,6 @@
- "python >= 2.6"
- zabbix-api
options:
server_url:
description:
- Url of Zabbix server, with protocol (http or https).
required: true
aliases: [ "url" ]
login_user:
description:
- Zabbix user name.
required: true
login_password:
description:
- Zabbix user password.
required: true
http_login_user:
description:
- Basic Auth login
required: false
default: None
version_added: "2.1"
http_login_password:
description:
- Basic Auth password
required: false
default: None
version_added: "2.1"
timeout:
description:
- The timeout of API request (seconds).
default: 10
screens:
description:
- List of screens to be created/updated/deleted(see example).
Expand Down
30 changes: 30 additions & 0 deletions lib/ansible/utils/module_docs_fragments/zabbix.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,36 @@ class ModuleDocFragment(object):
# Standard documentation fragment
DOCUMENTATION = '''
options:
server_url:
description:
- Url of Zabbix server, with protocol (http or https).
C(url) is an alias for C(server_url).
required: true
aliases: [ "url" ]
login_user:
description:
- Zabbix user name.
required: true
login_password:
description:
- Zabbix user password.
required: true
http_login_user:
description:
- Basic Auth login
required: false
default: None
version_added: "2.1"
http_login_password:
description:
- Basic Auth password
required: false
default: None
version_added: "2.1"
timeout:
description:
- The timeout of API request(seconds).
default: 10
validate_certs:
required: false
description:
Expand Down

0 comments on commit 0a89873

Please sign in to comment.