Skip to content

Commit

Permalink
Formatting and phrasing.
Browse files Browse the repository at this point in the history
  • Loading branch information
robin-checkmk committed Feb 5, 2024
1 parent 6dfa939 commit cb828f3
Show file tree
Hide file tree
Showing 10 changed files with 231 additions and 85 deletions.
17 changes: 13 additions & 4 deletions plugins/lookup/bakery.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,14 @@
name: bakery
author: Max Sickora (@max-checkmk)
version_added: "4.0.0"
short_description: Get the bakery status of a Checkmk server
description:
- Returns the bakery status of a Checkmk server as a string, e.g. 'running'
options:
server_url:
description: URL of the Checkmk server
required: True
Expand All @@ -23,8 +27,9 @@
ini:
- section: checkmk_lookup
key: server_url
site:
description: site name
description: Site name.
required: True
vars:
- name: ansible_lookup_checkmk_site
Expand All @@ -33,8 +38,9 @@
ini:
- section: checkmk_lookup
key: site
automation_user:
description: automation user for the REST API access
description: Automation user for the REST API access.
required: True
vars:
- name: ansible_lookup_checkmk_automation_user
Expand All @@ -43,8 +49,9 @@
ini:
- section: checkmk_lookup
key: automation_user
automation_secret:
description: automation secret for the REST API access
description: Automation secret for the REST API access.
required: True
vars:
- name: ansible_lookup_checkmk_automation_secret
Expand All @@ -53,8 +60,9 @@
ini:
- section: checkmk_lookup
key: automation_secret
validate_certs:
description: Wether or not to validate TLS certificates
description: Whether or not to validate TLS certificates.
type: boolean
required: False
default: True
Expand All @@ -65,6 +73,7 @@
ini:
- section: checkmk_lookup
key: validate_certs
notes:
- Like all lookups, this runs on the Ansible controller and is unaffected by other keywords such as 'become'.
If you need to use different permissions, you must change the command or run Ansible as another user.
Expand Down
23 changes: 19 additions & 4 deletions plugins/lookup/folder.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,18 @@
name: folder
author: Lars Getwan (@lgetwan)
version_added: "3.3.0"
short_description: Get folder attributes
description:
- Returns the attributes of a folder
options:
_terms:
description: complete folder path using tilde as a delimiter
required: True
server_url:
description: URL of the Checkmk server
required: True
Expand All @@ -26,8 +31,9 @@
ini:
- section: checkmk_lookup
key: server_url
site:
description: site name
description: Site name.
required: True
vars:
- name: ansible_lookup_checkmk_site
Expand All @@ -36,8 +42,9 @@
ini:
- section: checkmk_lookup
key: site
automation_user:
description: automation user for the REST API access
description: Automation user for the REST API access.
required: True
vars:
- name: ansible_lookup_checkmk_automation_user
Expand All @@ -46,8 +53,9 @@
ini:
- section: checkmk_lookup
key: automation_user
automation_secret:
description: automation secret for the REST API access
description: Automation secret for the REST API access.
required: True
vars:
- name: ansible_lookup_checkmk_automation_secret
Expand All @@ -56,8 +64,9 @@
ini:
- section: checkmk_lookup
key: automation_secret
validate_certs:
description: Wether or not to validate TLS certificates
description: Whether or not to validate TLS certificates.
type: boolean
required: False
default: True
Expand All @@ -68,6 +77,12 @@
ini:
- section: checkmk_lookup
key: validate_certs
notes:
- Like all lookups, this runs on the Ansible controller and is unaffected by other keywords such as 'become'.
If you need to use different permissions, you must change the command or run Ansible as another user.
- Alternatively, you can use a shell/command task that runs against localhost and registers the result.
- The directory of the play is used as the current working directory.
"""

EXAMPLES = """
Expand Down
45 changes: 31 additions & 14 deletions plugins/lookup/folders.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,19 @@
name: folders
author: Lars Getwan (@lgetwan)
version_added: "3.3.0"
short_description: Get various information about a folder
description:
- Returns a list of subfolders
- Returns a list of hosts of the folder
options:
_terms:
description: complete folder path using tilde as a delimiter
required: True
show_hosts:
description: Also show the hosts of the folder(s) found
type: boolean
required: False
default: False
recursive:
description: Do a recursive query
type: boolean
required: False
default: False
server_url:
description: URL of the Checkmk server
required: True
Expand All @@ -37,8 +32,9 @@
ini:
- section: checkmk_lookup
key: server_url
site:
description: site name
description: Site name.
required: True
vars:
- name: ansible_lookup_checkmk_site
Expand All @@ -47,8 +43,9 @@
ini:
- section: checkmk_lookup
key: site
automation_user:
description: automation user for the REST API access
description: Automation user for the REST API access.
required: True
vars:
- name: ansible_lookup_checkmk_automation_user
Expand All @@ -57,8 +54,9 @@
ini:
- section: checkmk_lookup
key: automation_user
automation_secret:
description: automation secret for the REST API access
description: Automation secret for the REST API access.
required: True
vars:
- name: ansible_lookup_checkmk_automation_secret
Expand All @@ -67,8 +65,9 @@
ini:
- section: checkmk_lookup
key: automation_secret
validate_certs:
description: Wether or not to validate TLS cerificates
description: Whether or not to validate TLS certificates.
type: boolean
required: False
default: True
Expand All @@ -79,6 +78,24 @@
ini:
- section: checkmk_lookup
key: validate_certs
show_hosts:
description: Also show the hosts of the folder(s) found
type: boolean
required: False
default: False
recursive:
description: Do a recursive query
type: boolean
required: False
default: False
notes:
- Like all lookups, this runs on the Ansible controller and is unaffected by other keywords such as 'become'.
If you need to use different permissions, you must change the command or run Ansible as another user.
- Alternatively, you can use a shell/command task that runs against localhost and registers the result.
- The directory of the play is used as the current working directory.
"""

EXAMPLES = """
Expand Down
34 changes: 25 additions & 9 deletions plugins/lookup/host.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@
name: host
author: Lars Getwan (@lgetwan)
version_added: "3.3.0"
short_description: Get host attributes
description:
- Returns the attributes of a host
options:
_terms:
description: host name
required: True
effective_attributes:
description: show all effective attributes on hosts
type: boolean
required: False
default: False
server_url:
description: URL of the Checkmk server
required: True
Expand All @@ -31,8 +31,9 @@
ini:
- section: checkmk_lookup
key: server_url
site:
description: site name
description: Site name.
required: True
vars:
- name: ansible_lookup_checkmk_site
Expand All @@ -41,8 +42,9 @@
ini:
- section: checkmk_lookup
key: site
automation_user:
description: automation user for the REST API access
description: Automation user for the REST API access.
required: True
vars:
- name: ansible_lookup_checkmk_automation_user
Expand All @@ -51,8 +53,9 @@
ini:
- section: checkmk_lookup
key: automation_user
automation_secret:
description: automation secret for the REST API access
description: Automation secret for the REST API access.
required: True
vars:
- name: ansible_lookup_checkmk_automation_secret
Expand All @@ -61,8 +64,9 @@
ini:
- section: checkmk_lookup
key: automation_secret
validate_certs:
description: Wether or not to validate TLS cerificates
description: Whether or not to validate TLS certificates.
type: boolean
required: False
default: True
Expand All @@ -73,6 +77,18 @@
ini:
- section: checkmk_lookup
key: validate_certs
effective_attributes:
description: show all effective attributes on hosts
type: boolean
required: False
default: False
notes:
- Like all lookups, this runs on the Ansible controller and is unaffected by other keywords such as 'become'.
If you need to use different permissions, you must change the command or run Ansible as another user.
- Alternatively, you can use a shell/command task that runs against localhost and registers the result.
- The directory of the play is used as the current working directory.
"""

EXAMPLES = """
Expand Down
Loading

0 comments on commit cb828f3

Please sign in to comment.