26 lines
560 B
YAML
26 lines
560 B
YAML
---
|
|
- name: Notify SSH logins
|
|
hosts: all
|
|
become: true
|
|
tasks:
|
|
- name: Install curl
|
|
apt:
|
|
name: curl
|
|
state: latest
|
|
when: not ansible_facts['packages']['curl'] is defined
|
|
|
|
- name: Copy PAM module
|
|
copy:
|
|
src: files/pam_ssh_auth.conf
|
|
dest: /etc/pam.d/ssh
|
|
owner: root
|
|
group: root
|
|
mode: 0644
|
|
|
|
- name: Copy notification script
|
|
copy:
|
|
src: tasks/notify_login.sh
|
|
dest: /usr/local/bin/notify_login.sh
|
|
owner: root
|
|
group: root
|
|
mode: 0755
|