tribe29 / tribe29.checkmk / 0.23.0 / module / contact_group Manage contact groups in Checkmk (bulk version). | "added in version" 0.12.0 of tribe29.checkmk" Authors: Michael Sekania (@msekania)tribe29.checkmk.contact_group (0.23.0) — module
Install with ansible-galaxy collection install tribe29.checkmk:==0.23.0
collections: - name: tribe29.checkmk version: 0.23.0
Manage contact groups in Checkmk.
# Create a single contact group. - name: "Create a single contact group." tribe29.checkmk.contact_group: server_url: "http://localhost/" site: "my_site" automation_user: "automation" automation_secret: "$SECRET" name: "my_contact_group" title: "My Contact Group" state: "present"
# Create several contact groups. - name: "Create several contact groups." tribe29.checkmk.contact_group: server_url: "http://localhost/" site: "my_site" automation_user: "automation" automation_secret: "$SECRET" groups: - name: "my_contact_group_one" title: "My Contact Group One" - name: "my_contact_group_two" title: "My Contact Group Two" - name: "my_contact_group_test" title: "My Test" state: "present"
# Create several contact groups. - name: "Create several contact groups." tribe29.checkmk.contact_group: server_url: "http://localhost/" site: "my_site" automation_user: "automation" automation_secret: "$SECRET" groups: - name: "my_contact_group_one" title: "My Contact Group One" - name: "my_contact_group_two" - name: "my_contact_group_test" state: "present"
# Delete a single contact group. - name: "Create a single contact group." tribe29.checkmk.contact_group: server_url: "http://localhost/" site: "my_site" automation_user: "automation" automation_secret: "$SECRET" name: "my_contact_group" state: "absent"
# Delete several contact groups. - name: "Delete several contact groups." tribe29.checkmk.contact_group: server_url: "http://localhost/" site: "my_site" automation_user: "automation" automation_secret: "$SECRET" groups: - name: "my_contact_group_one" - name: "my_contact_group_two" state: "absent"
name: description: The name of the contact group to be created/modified/deleted. 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 contact group. type: str title: description: The title (alias) of your contact group. If omitted defaults to the name. type: str groups: default: [] description: - instead of 'name', 'title' a list of dicts with elements of contact group name and title (alias) to be created/modified/deleted. If title is omitted in entry, it defaults to the contact group name. 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
message: description: The output message that the module generates. returned: always sample: Contact group created. type: str