ansible-role--sshd/tasks/main.yml

27 lines
560 B
YAML
Raw Permalink Normal View History

2024-07-12 12:38:33 +00:00
---
- 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