File: main.yml

package info (click to toggle)
python-mitogen 0.3.44-1
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 6,824 kB
  • sloc: python: 24,965; sh: 144; makefile: 74; perl: 19; ansic: 18
file content (20 lines) | stat: -rw-r--r-- 576 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
- name: Create login banner
  copy:
    src: banner.txt
    dest: /etc/ssh/banner.txt
    mode: u=rw,go=r

- name: Configure sshd_config
  lineinfile:
    path: "{{ sshd_config_file }}"
    line: "{{ item.line }}"
    regexp: "{{ item.regexp }}"
  with_items:
    - line:     Banner /etc/ssh/banner.txt
      regexp:   '^#? *Banner.*'
    - line:     MaxAuthTries {{ sshd_config__max_auth_tries }}
      regexp:   '^#? *MaxAuthTries.*'
    - line:     PermitRootLogin yes
      regexp:   '.*PermitRootLogin.*'
  notify:
    - Restart sshd  # Handler in platform specific role