add roles
This commit is contained in:
35
all.yml
35
all.yml
@@ -31,10 +31,43 @@
|
||||
- { role: willshersystems.sshd, tags: ssh }
|
||||
- { role: claranet.apt, tags: apt }
|
||||
- { role: robertdebock.fail2ban, tags: ban }
|
||||
- { role: ome.rsync_server, tags: rsync }
|
||||
- { role: nickhammond.logrotate, tags: log,
|
||||
vars: "{{ logrotate_files }}"
|
||||
}
|
||||
|
||||
tasks:
|
||||
|
||||
- name: Ensure scripts directory exist
|
||||
file:
|
||||
path: /usr/local/scripts/
|
||||
state: directory
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0755
|
||||
tags:
|
||||
- alerts
|
||||
|
||||
- name: create the main alertings bash script file
|
||||
template:
|
||||
src: "../templates/alerts.sh.j2"
|
||||
dest: "/usr/local/scripts/alerts.sh"
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0744
|
||||
tags:
|
||||
- alerts
|
||||
|
||||
- name: Creates a cron file for alerts under /etc/cron.d
|
||||
ansible.builtin.cron:
|
||||
name: "{{ item.name }}"
|
||||
weekday: "{{ item.weekday }}"
|
||||
minute: "{{ item.minute }}"
|
||||
hour: "{{ item.hour }}"
|
||||
user: "{{ item.user }}"
|
||||
job: "{{ item.job }}"
|
||||
cron_file: "{{ item.cron_file }}"
|
||||
loop: "{{ alerts_cron }}"
|
||||
|
||||
# - name: Show ssh backup
|
||||
# debug:
|
||||
# msg: "{{ ssh_backup }}"
|
||||
|
||||
Reference in New Issue
Block a user