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.
32 lines
654 B
YAML
32 lines
654 B
YAML
5 years ago
|
---
|
||
|
|
||
|
- 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=
|
||
|
|
||
|
- 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"
|