tribe29 / tribe29.checkmk / 0.23.0 / module / folder Manage folders in Checkmk. | "added in version" 0.0.1 of tribe29.checkmk" Authors: Robin Gierse (@robin-tribe29), Lars Getwan (@lgetwan), Michael Sekania (@msekania)tribe29.checkmk.folder (0.23.0) — module
Install with ansible-galaxy collection install tribe29.checkmk:==0.23.0
collections: - name: tribe29.checkmk version: 0.23.0
Manage folders within Checkmk.
# Create a single folder. - name: "Create a single folder." tribe29.checkmk.folder: server_url: "http://localhost/" site: "my_site" automation_user: "automation" automation_secret: "$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." tribe29.checkmk.folder: server_url: "http://localhost/" site: "my_site" automation_user: "automation" automation_secret: "$SECRET" path: "/my_remote_folder" name: "My Remote Folder" attributes: site: "my_remote_site" state: "present"
# 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" tribe29.checkmk.folder: server_url: "http://localhost/" site: "my_site" automation_user: "automation" automation_secret: "$SECRET" path: "/my_remote_folder" attributes: tag_criticality: "test" tag_networking: "wan" state: "present"
# Update only specified attributes - name: "Update only specified attributes" tribe29.checkmk.folder: server_url: "http://localhost/" site: "my_site" automation_user: "automation" automation_secret: "$SECRET" path: "/my_folder" update_attributes: tag_networking: "dmz" state: "present"
# Remove specified attributes - name: "Remove specified attributes" tribe29.checkmk.folder: server_url: "http://localhost/" site: "my_site" automation_user: "automation" automation_secret: "$SECRET" path: "/my_folder" remove_attributes: - tag_networking state: "present"
name: aliases: - title description: The name of your folder. If omitted defaults to the folder name. type: str path: description: - The full path to the folder you want to manage. Pay attention to the leading C(/) and avoid trailing C(/). Special characters apart from C(_) are not allowed! required: true type: str site: description: The site you want to connect to. required: true type: str state: choices: - present - absent default: present description: The state of your folder. type: str attributes: default: {} description: - The attributes of your folder as described in the API documentation. B(Attention! This option OVERWRITES all existing attributes!) type: raw server_url: description: The base url of your Checkmk server. required: true type: str validate_certs: default: true description: Whether to validate the SSL certificate of the Checkmk server. type: bool automation_user: description: The automation user you want to use. It has to be an 'Automation' user, not a normal one. required: true type: str automation_secret: description: The secret to authenticate your automation user. required: true type: str remove_attributes: default: [] description: - The remove_attributes of your host as described in the API documentation. This will only remove the given attributes. type: raw update_attributes: default: {} description: - The update_attributes of your host as described in the API documentation. This will only update the given attributes. type: raw
message: description: The output message that the module generates. Contains the API response details in case of an error. returned: always sample: Folder created. type: str