Skip to content

Commit

Permalink
Cleanup modules documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
robin-checkmk committed Nov 24, 2023
1 parent 2acf859 commit c5bc4bb
Show file tree
Hide file tree
Showing 15 changed files with 154 additions and 154 deletions.
2 changes: 1 addition & 1 deletion plugins/lookup/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
server_url + '/' + site,
validate_certs=False,
automation_user=my_user,
automation_secret=automation_secret
automation_secret=my_secret
)}}"
"""

Expand Down
18 changes: 9 additions & 9 deletions plugins/modules/activation.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,28 +40,28 @@
EXAMPLES = r"""
- name: "Activate changes on all sites."
checkmk.general.activation:
server_url: "http://localhost/"
server_url: "http://my_server/"
site: "my_site"
automation_user: "automation"
automation_secret: "$SECRET"
automation_user: "my_user"
automation_secret: "my_secret"
run_once: 'true'
- name: "Activate changes on a specific site."
checkmk.general.activation:
server_url: "http://localhost/"
server_url: "http://my_server/"
site: "my_site"
automation_user: "automation"
automation_secret: "$SECRET"
automation_user: "my_user"
automation_secret: "my_secret"
sites:
- "my_site"
run_once: 'true'
- name: "Activate changes including foreign changes."
checkmk.general.activation:
server_url: "http://localhost/"
server_url: "http://my_server/"
site: "my_site"
automation_user: "automation"
automation_secret: "$SECRET"
automation_user: "my_user"
automation_secret: "my_secret"
force_foreign_changes: 'true'
run_once: 'true'
"""
Expand Down
18 changes: 9 additions & 9 deletions plugins/modules/bakery.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,28 +47,28 @@
# Bake all agents without signing, as example in a fresh installation without a signature key.
- name: "Bake all agents without signing."
checkmk.general.bakery:
server_url: "http://localhost/"
server_url: "http://my_server/"
site: "my_site"
automation_user: "automation"
automation_secret: "$SECRET"
automation_user: "my_user"
automation_secret: "my_secret"
state: "baked"
# Sign all agents.
- name: "Sign all agents."
checkmk.general.bakery:
server_url: "http://localhost/"
server_url: "http://my_server/"
site: "my_site"
automation_user: "automation"
automation_secret: "$SECRET"
automation_user: "my_user"
automation_secret: "my_secret"
signature_key_id: 1
signature_key_passphrase: "secretkey"
state: "signed"
# Bake and sign all agents.
- name: "Bake and sign all agents."
checkmk.general.bakery:
server_url: "http://localhost/"
server_url: "http://my_server/"
site: "my_site"
automation_user: "automation"
automation_secret: "$SECRET"
automation_user: "my_user"
automation_secret: "my_secret"
signature_key_id: 1
signature_key_passphrase: "secretkey"
state: "baked_signed"
Expand Down
30 changes: 15 additions & 15 deletions plugins/modules/contact_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@
# Create a single contact group.
- name: "Create a single contact group."
checkmk.general.contact_group:
server_url: "http://localhost/"
server_url: "http://my_server/"
site: "my_site"
automation_user: "automation"
automation_secret: "$SECRET"
automation_user: "my_user"
automation_secret: "my_secret"
name: "my_contact_group"
title: "My Contact Group"
customer: "provider"
Expand All @@ -70,10 +70,10 @@
# Create several contact groups.
- name: "Create several contact groups."
checkmk.general.contact_group:
server_url: "http://localhost/"
server_url: "http://my_server/"
site: "my_site"
automation_user: "automation"
automation_secret: "$SECRET"
automation_user: "my_user"
automation_secret: "my_secret"
customer: "provider"
groups:
- name: "my_contact_group_one"
Expand All @@ -87,10 +87,10 @@
# Create several contact groups.
- name: "Create several contact groups."
checkmk.general.contact_group:
server_url: "http://localhost/"
server_url: "http://my_server/"
site: "my_site"
automation_user: "automation"
automation_secret: "$SECRET"
automation_user: "my_user"
automation_secret: "my_secret"
customer: "provider"
groups:
- name: "my_contact_group_one"
Expand All @@ -102,20 +102,20 @@
# Delete a single contact group.
- name: "Create a single contact group."
checkmk.general.contact_group:
server_url: "http://localhost/"
server_url: "http://my_server/"
site: "my_site"
automation_user: "automation"
automation_secret: "$SECRET"
automation_user: "my_user"
automation_secret: "my_secret"
name: "my_contact_group"
state: "absent"
# Delete several contact groups.
- name: "Delete several contact groups."
checkmk.general.contact_group:
server_url: "http://localhost/"
server_url: "http://my_server/"
site: "my_site"
automation_user: "automation"
automation_secret: "$SECRET"
automation_user: "my_user"
automation_secret: "my_secret"
groups:
- name: "my_contact_group_one"
- name: "my_contact_group_two"
Expand Down
24 changes: 12 additions & 12 deletions plugins/modules/discovery.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,34 +63,34 @@
# Create a single host.
- name: "Add newly discovered services on host."
checkmk.general.discovery:
server_url: "http://localhost/"
server_url: "http://my_server/"
site: "my_site"
automation_user: "automation"
automation_secret: "$SECRET"
automation_user: "my_user"
automation_secret: "my_secret"
host_name: "my_host"
state: "new"
- name: "Add newly discovered services, update labels and remove vanished services on host."
checkmk.general.discovery:
server_url: "http://localhost/"
server_url: "http://my_server/"
site: "my_site"
automation_user: "automation"
automation_secret: "$SECRET"
automation_user: "my_user"
automation_secret: "my_secret"
host_name: "my_host"
state: "fix_all"
- name: "Add newly discovered services on hosts. (Bulk)"
checkmk.general.discovery:
server_url: "http://localhost/"
server_url: "http://my_server/"
site: "my_site"
automation_user: "automation"
automation_secret: "$SECRET"
automation_user: "my_user"
automation_secret: "my_secret"
hosts: "[my_host_0, my_host_1]"
state: "new"
- name: "Add newly discovered services, update labels and remove vanished services on host; 3 at once (Bulk)"
checkmk.general.discovery:
server_url: "http://localhost/"
server_url: "http://my_server/"
site: "my_site"
automation_user: "automation"
automation_secret: "$SECRET"
automation_user: "my_user"
automation_secret: "my_secret"
hosts: "[my_host_0, my_host_1, my_host_2, my_host_3, my_host_4, my_host_5]"
state: "fix_all"
bulk_size: 3
Expand Down
6 changes: 3 additions & 3 deletions plugins/modules/downtime.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
- name: "Schedule host downtime."
checkmk.general.downtime:
server_url: "{{ checkmk_var_server_url }}"
site: "{{ site }}"
site: "{{ my_site }}"
automation_user: "{{ checkmk_var_automation_user }}"
automation_secret: "{{ checkmk_var_automation_secret }}"
host_name: my_host
Expand All @@ -107,7 +107,7 @@
- name: "Schedule service downtimes for two given services."
checkmk.general.downtime:
server_url: "{{ checkmk_var_server_url }}"
site: "{{ site }}"
site: "{{ my_site }}"
automation_user: "{{ checkmk_var_automation_user }}"
automation_secret: "{{ checkmk_var_automation_secret }}"
host_name: my_host
Expand All @@ -122,7 +122,7 @@
- name: "Delete all service downtimes for two given services."
checkmk.general.downtime:
server_url: "{{ checkmk_var_server_url }}"
site: "{{ site }}"
site: "{{ my_site }}"
automation_user: "{{ checkmk_var_automation_user }}"
automation_secret: "{{ checkmk_var_automation_secret }}"
host_name: my_host
Expand Down
30 changes: 15 additions & 15 deletions plugins/modules/folder.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,21 +74,21 @@
# Create a single folder.
- name: "Create a single folder."
checkmk.general.folder:
server_url: "http://localhost/"
server_url: "http://my_server/"
site: "my_site"
automation_user: "automation"
automation_secret: "$SECRET"
automation_user: "my_user"
automation_secret: "my_secret"
path: "/my_folder"
name: "My Folder"
state: "present"
# Create a folder who's hosts should be hosted on a remote site.
- name: "Create a single folder."
checkmk.general.folder:
server_url: "http://localhost/"
server_url: "http://my_server/"
site: "my_site"
automation_user: "automation"
automation_secret: "$SECRET"
automation_user: "my_user"
automation_secret: "my_secret"
path: "/my_remote_folder"
name: "My Remote Folder"
attributes:
Expand All @@ -98,10 +98,10 @@
# Create a folder with Criticality set to a Test system and Networking Segment WAN (high latency)"
- name: "Create a folder with tag_criticality test and tag_networking wan"
checkmk.general.folder:
server_url: "http://localhost/"
server_url: "http://my_server/"
site: "my_site"
automation_user: "automation"
automation_secret: "$SECRET"
automation_user: "my_user"
automation_secret: "my_secret"
path: "/my_remote_folder"
attributes:
tag_criticality: "test"
Expand All @@ -111,10 +111,10 @@
# Update only specified attributes
- name: "Update only specified attributes"
checkmk.general.folder:
server_url: "http://localhost/"
server_url: "http://my_server/"
site: "my_site"
automation_user: "automation"
automation_secret: "$SECRET"
automation_user: "my_user"
automation_secret: "my_secret"
path: "/my_folder"
update_attributes:
tag_networking: "dmz"
Expand All @@ -123,10 +123,10 @@
# Remove specified attributes
- name: "Remove specified attributes"
checkmk.general.folder:
server_url: "http://localhost/"
server_url: "http://my_server/"
site: "my_site"
automation_user: "automation"
automation_secret: "$SECRET"
automation_user: "my_user"
automation_secret: "my_secret"
path: "/my_folder"
remove_attributes:
- tag_networking
Expand Down
42 changes: 21 additions & 21 deletions plugins/modules/host.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,21 +67,21 @@
# Create a host.
- name: "Create a host."
checkmk.general.host:
server_url: "http://localhost/"
server_url: "http://my_server/"
site: "my_site"
automation_user: "automation"
automation_secret: "$SECRET"
automation_user: "my_user"
automation_secret: "my_secret"
name: "my_host"
folder: "/"
state: "present"
# Create a host with IP.
- name: "Create a host with IP address."
checkmk.general.host:
server_url: "http://localhost/"
server_url: "http://my_server/"
site: "my_site"
automation_user: "automation"
automation_secret: "$SECRET"
automation_user: "my_user"
automation_secret: "my_secret"
name: "my_host"
attributes:
alias: "My Host"
Expand All @@ -92,10 +92,10 @@
# Create a host which is monitored on a distinct site.
- name: "Create a host which is monitored on a distinct site."
checkmk.general.host:
server_url: "http://localhost/"
server_url: "http://my_server/"
site: "my_site"
automation_user: "automation"
automation_secret: "$SECRET"
automation_user: "my_user"
automation_secret: "my_secret"
name: "my_host"
attributes:
site: "my_remote_site"
Expand All @@ -105,10 +105,10 @@
# Create a host with update_attributes.
- name: "Create a host which is monitored on a distinct site."
checkmk.general.host:
server_url: "http://localhost/"
server_url: "http://my_server/"
site: "my_site"
automation_user: "automation"
automation_secret: "$SECRET"
automation_user: "my_user"
automation_secret: "my_secret"
name: "my_host"
update_attributes:
site: "my_remote_site"
Expand All @@ -117,10 +117,10 @@
# Update only specified attributes
- name: "Update only specified attributes"
checkmk.general.host:
server_url: "http://localhost/"
server_url: "http://my_server/"
site: "my_site"
automation_user: "automation"
automation_secret: "$SECRET"
automation_user: "my_user"
automation_secret: "my_secret"
name: "my_host"
update_attributes:
alias: "foo"
Expand All @@ -129,10 +129,10 @@
# Remove specified attributes
- name: "Remove specified attributes"
checkmk.general.host:
server_url: "http://localhost/"
server_url: "http://my_server/"
site: "my_site"
automation_user: "automation"
automation_secret: "$SECRET"
automation_user: "my_user"
automation_secret: "my_secret"
name: "my_host"
remove_attributes:
- alias
Expand All @@ -141,10 +141,10 @@
# Add custom tags to a host (note the leading 'tag_')
- name: "Remove specified attributes"
checkmk.general.host:
server_url: "http://localhost/"
server_url: "http://my_server/"
site: "my_site"
automation_user: "automation"
automation_secret: "$SECRET"
automation_user: "my_user"
automation_secret: "my_secret"
name: "my_host"
update_attributes:
- tag_my_tag_1: "Bar"
Expand Down
Loading

0 comments on commit c5bc4bb

Please sign in to comment.