PPA: Events
Summary
This module contains actions for sending various events from a task.
Actions
ppa.events.
create_approval_request
Create an approval request that can be activated afterwards.
Minimum Plugin Version: 11.1.0
Minimum PPA Version: 3.3.0
Input
- request_message: a message that describes the request (markdown is supported)
Output
An ApprovalRequest.
Example
1 2 3 4 5 6 7 8 9 10 |
|
ppa.events.
create_wait_hook
This action is deprecated in favour of create_approval_request.
It will be removed in a future release.
ppa.events.
send_email
Send an email using the PPA SMTP configuration.
Minimum Plugin Version: 4.0.0
Input
-
subject: the email subject
-
html: an HTML document containing the body of the email
-
plain_text: an optional plain text version of the email body for older mail clients
-
recipients: a list of one or more email addresses
-
attachments: optional list of file names to attach to the email
-
reason: text to display when the action runs (defaults to The task is sending an email)
Attachments & Recipients
Attachments
-
The ability to send attachments was introduced in PPA v2.7.0
-
Sending an email will work on older PPA versions, but attempting to send an attachment will fail
Recipients
-
Default SMTP recipients were removed in PPA v2.8.0
-
The
recipients
input to this action is now mandatory
Output
Nothing is outputted by this action.
Simple HTML Email
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
|
Email With Attachment
-
Auditing a set of users from Active Directory
-
Writing the users to a JSON file
-
Attaching the JSON file to an email
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
|
Remember
This action will fail if SMTP is not configured in PPA.
ppa.events.
send_syslog_event
Send a JSON syslog event using the PPA syslog configuration.
Minimum Plugin Version: 2.0.0
Input
-
message: the event message
-
level: the event level (defaults to
info
, see more about event levels below) -
reason: optional text to display in the task interface (defaults to no text displayed)
-
details: optional dictionary of custom event details (defaults to empty)
Event Levels
Valid event levels:
- info
- warning
- error
- debug
- fatal
- panic
- trace
Output
Nothing is outputted by this action.
Example
1 2 3 4 5 6 |
|
Generated Syslog Event
{
"details": {
"username": "example.user",
"was_unlocked": false,
"force_password_change": true
},
"level": "info",
"msg": "A user's password has been changed by PPA",
"name": "TaskLog",
"task": "28b54abb-7e9b-4db0-beaa-dad4b0448eeb",
"time": "2020-06-10T14:51:41Z"
}
Remember
This action will fail if syslog is not configured in PPA.
ppa.events.
wait
This action is deprecated in favour of wait_approval_response.
It will be removed in a future release.
ppa.events.
wait_approval_response
Wait for a response to an approval request.
The out of this action will contain a boolean approved key.
Use the value of this key to control what the task does once the response is received.
Minimum Plugin Version: 11.1.0
Minimum PPA Version: 3.3.0
Input
-
text: the text to display while waiting
-
approval_request: an ApprovalRequest
-
assignees: a list of usernames responsible for responding to the request
Output
An ApprovalResponse.
Example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
|