2015-05-28 11:32:57 +02:00
|
|
|
---
|
|
|
|
- name: install denyhosts on debian <=7 and ubuntu <= 12.04
|
|
|
|
apt: pkg={{ item }} state=installed
|
|
|
|
with_items:
|
|
|
|
- denyhosts
|
2015-06-14 23:39:13 +02:00
|
|
|
tags: denyhosts
|
2015-05-28 11:32:57 +02:00
|
|
|
|
|
|
|
- name: ensure CM can access the VMs
|
|
|
|
action: |
|
|
|
|
lineinfile name=/etc/hosts.allow regexp="sshd: 146.48.123.18$" line="sshd: 146.48.123.18"
|
2015-06-14 23:39:13 +02:00
|
|
|
tags: denyhosts
|
2015-05-28 11:32:57 +02:00
|
|
|
|
|
|
|
- name: ensure Monitoring can connect via ssh
|
|
|
|
action: |
|
|
|
|
lineinfile name=/etc/hosts.allow regexp="sshd: 146.48.123.23$" line="sshd: 146.48.123.23"
|
2015-06-14 23:39:13 +02:00
|
|
|
tags: denyhosts
|
2015-05-28 11:32:57 +02:00
|
|
|
|
|
|
|
- name: Set the treshold for root on the denyhosts config file
|
|
|
|
lineinfile: |
|
|
|
|
name=/etc/denyhosts.conf regexp="^DENY_THRESHOLD_ROOT = " line="DENY_THRESHOLD_ROOT = 5"
|
2015-06-14 23:39:13 +02:00
|
|
|
notify: Restart denyhosts
|
|
|
|
tags: denyhosts
|
2015-05-28 11:32:57 +02:00
|
|
|
|