Note
This module is part of the community.general collection (version 10.7.3).
You might already have this collection installed if you are using the ansible package. It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.
To install it, use: ansible-galaxy collection install community.general. You need further requirements to be able to use this module, see Requirements for details.
To use it in a playbook, specify: community.general.clc_alert_policy.
version 11.0.0
Lumen Public Cloud (formerly known as CenturyLink Cloud) has gone End-of-Life in September 2023. See more at https://www.ctl.io/knowledge-base/release-notes/2023/lumen-public-cloud-platform-end-of-life-notice/?.
There is none.
The below requirements are needed on the host that executes this module.
Parameter | Comments |
|---|---|
alert_recipients list / elements=string | A list of recipient email IDs to notify the alert. This is required for |
alias string / required | The alias of your CLC Account. |
duration string | The length of time in minutes that the condition must exceed the threshold. This is required for |
id string | The alert policy ID. This is mutually exclusive with |
metric string | The metric on which to measure the condition that will trigger the alert. This is required for Choices:
|
name string | The name of the alert policy. This is mutually exclusive with |
state string | Whether to create or delete the policy. Choices:
|
threshold integer | The threshold that will trigger the alert when the metric equals or exceeds it. This is required for |
Attribute | Support | Description |
|---|---|---|
check_mode | Support: full | Can run in |
diff_mode | Support: none | Will return details on what has changed (or possibly needs changing in |
Note
CLC_V2_API_USERNAME, the account login ID for the Centurylink Cloud.CLC_V2_API_PASSWORD, the account password for the Centurylink Cloud.CLC_V2_API_TOKEN, the API token generated from https://api.ctl.io/v2/authentication/login.CLC_ACCT_ALIAS, the account alias associated with the Centurylink Cloud.CLC_V2_API_URL to specify an endpoint for pointing to a different CLC environment.- name: Create Alert Policy Example
hosts: localhost
gather_facts: false
connection: local
tasks:
- name: Create an Alert Policy for disk above 80% for 5 minutes
community.general.clc_alert_policy:
alias: wfad
name: 'alert for disk > 80%'
alert_recipients:
- [email protected]
- [email protected]
metric: 'disk'
duration: '00:05:00'
threshold: 80
state: present
register: policy
- name: Debug
ansible.builtin.debug: var=policy
- name: Delete Alert Policy Example
hosts: localhost
gather_facts: false
connection: local
tasks:
- name: Delete an Alert Policy
community.general.clc_alert_policy:
alias: wfad
name: 'alert for disk > 80%'
state: absent
register: policy
- name: Debug
ansible.builtin.debug: var=policy
Common return values are documented here, the following are the fields unique to this module:
Key | Description |
|---|---|
policy dictionary | The alert policy information. Returned: success Sample: |
© 2012–2018 Michael DeHaan
© 2018–2025 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/latest/collections/community/general/clc_alert_policy_module.html