sshlogger.yml 899 Bytes
Newer Older
Alexander Withers's avatar
Alexander Withers committed
1
2
3
4
5
6
7
---
- user: name="{{ ansible_env.SUDO_USER }}" groups=docker append=yes

- name: systemd services
  template: src=ssh-auth-logger.service.j2 dest=/etc/systemd/system/ssh-auth-logger.service owner=root group=root mode=0644
  notify:
    - reload systemd
awithers's avatar
awithers committed
8
    - start docker
Alexander Withers's avatar
Alexander Withers committed
9
10
11
12
13
14
15
16
  when: (ansible_distribution == "CentOS")

- name: systemd services
  template: src=ssh-auth-logger.service.j2 dest=/etc/systemd/system/ssh-auth-logger.service owner=root group=root mode=0644
  notify:
    - reload systemd
  when: (ansible_distribution == "Ubuntu")

awithers's avatar
awithers committed
17
18
19
20
21
- name: pull recent docker image
  command: docker pull "justinazoff/ssh-auth-logger:{{ ssh_logger_version }}"
  async: 300
  poll: 5

Alexander Withers's avatar
Alexander Withers committed
22
23
24
25
26
27
28
29
#- name: start ssh-auth-logger
#  service: name=ssh-auth-logger.service state=started

- name: enable ssh-auth-logger at boot
  service: name=ssh-auth-logger.service enabled=yes state=started
  notify:
    - reload systemd