summaryrefslogtreecommitdiffstats
path: root/ansible_collections/cyberark/pas/rulebooks/pta_notify.yml
blob: 94ed251d2e9ad480a6070ac6b4cdcdb02788ba12 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
---
- hosts: all
  connection: local

  collections:
    - cyberark.pas

  tasks:

    - name: Sending an e-mail using Gmail SMTP servers
      community.general.mail:
        host: SMTPSERVER
        port: PORT
        username: username@mail.com
        password: password
        to: First Last <first.last@mail.com>
        subject: Ansible-Rulebook Report
        body: Ansible Rulebook notify of PTA Event '{{ username | ansible.builtin.regex_search('^[a-zA-Z0-9_]+') }}'   '{{ eventname }}'  from host '{{ station }}'   For more info please visit - '{{ eventurl }}'
      delegate_to: localhost