2016-11-07 14:00:57 +01:00
|
|
|
---
|
2017-05-21 11:17:25 +02:00
|
|
|
|
2018-09-20 17:08:30 +02:00
|
|
|
- include: install_package.yml
|
|
|
|
when: not evomaintenance_install_vendor
|
|
|
|
|
|
|
|
- include: install_vendor.yml
|
|
|
|
when: evomaintenance_install_vendor
|
2016-11-07 14:00:57 +01:00
|
|
|
|
|
|
|
- name: configuration is applied
|
|
|
|
template:
|
|
|
|
src: evomaintenance.j2
|
|
|
|
dest: /etc/evomaintenance.cf
|
2017-12-28 11:01:52 +01:00
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: "0600"
|
2018-01-02 16:45:36 +01:00
|
|
|
tags:
|
|
|
|
- evomaintenance
|
2016-11-07 14:00:57 +01:00
|
|
|
|
2017-07-28 03:34:06 +02:00
|
|
|
- name: Is minifirewall installed?
|
|
|
|
stat:
|
|
|
|
path: /etc/default/minifirewall
|
|
|
|
register: minifirewall_default_file
|
2018-01-02 16:45:36 +01:00
|
|
|
tags:
|
|
|
|
- evomaintenance
|
2017-07-28 03:34:06 +02:00
|
|
|
|
2016-11-07 14:00:57 +01:00
|
|
|
- name: minifirewall section for evomaintenance
|
|
|
|
lineinfile:
|
|
|
|
dest: /etc/default/minifirewall
|
|
|
|
line: "/sbin/iptables -A INPUT -p tcp --sport 5432 --dport 1024:65535 -s {{ item }} -m state --state ESTABLISHED,RELATED -j ACCEPT"
|
|
|
|
insertafter: "^# EvoMaintenance"
|
|
|
|
with_items: "{{ evomaintenance_hosts }}"
|
2017-07-28 03:34:06 +02:00
|
|
|
when: minifirewall_default_file.stat.exists
|
2018-01-02 16:45:36 +01:00
|
|
|
tags:
|
|
|
|
- evomaintenance
|
2016-11-07 14:00:57 +01:00
|
|
|
|
|
|
|
- name: remove minifirewall example rule for the proxy
|
|
|
|
lineinfile:
|
|
|
|
dest: /etc/default/minifirewall
|
|
|
|
regexp: '^#.*(--sport 5432).*(-s X\.X\.X\.X)'
|
|
|
|
state: absent
|
2017-07-28 03:34:06 +02:00
|
|
|
when: minifirewall_default_file.stat.exists
|
2018-01-02 16:45:36 +01:00
|
|
|
tags:
|
|
|
|
- evomaintenance
|