You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
705 B
YAML

---
- name: Install required packages
apt:
state: present
name:
- curl
- gawk
- name: Create directory for notify script
file:
state: directory
path: "{{ notify_script | dirname }}"
owner: root
group: root
mode: u=rwx,g=rx,o=
- name: Install notify script
template:
src: notify.sh
dest: "{{ notify_script }}"
owner: root
group: root
mode: u=rwx,g=rx,o=
validate: "{{ global_validate_shell_script }}"
- name: Configure pam for ssh notify
lineinfile:
state: present
path: "{{ global_pamd }}/sshd"
regexp: "# Ansible: ssh_tg_notify$"
line: "session optional pam_exec.so {{ notify_script }} # Ansible: ssh_tg_notify"