use the standard list for src,dest and mode

parent 297701d0
......@@ -9,22 +9,25 @@
- name: Configure snort and snort (debian)
template:
src: "etc/snort/{{ item }}"
dest: "/etc/snort/{{ item.rstrip('.j2') }}"
src: "etc/snort/{{ item.src }}"
dest: "/etc/snort/{{ item.dest }}"
owner: root
group: root
mode: "0644"
mode: "{{ item.mode }}"
with_items:
- snort.conf.j2
- snort.debian.conf.j2
- { src: 'snort.conf.j2', dest: 'snort.conf', mode: '0644' }
- { src: 'snort.debian.conf.j2', dest: 'snort.debian.conf', mode: '0644' }
- name: Configure oinkmaster
- name: Configure oinkmaster and install oinkmaster cronjob
template:
src: "etc/oinkmaster.conf.j2"
dest: "/etc/oinkmaster.conf"
src: "{{ item.src }}"
dest: "{{ item.dest }}"
owner: root
group: root
mode: "0644"
mode: "{{ item.mode }}"
with_items:
- { src: 'etc/oinkmaster.conf.j2', dest: '/etc/oinkmaster.conf', mode: '0644' }
- { src: 'etc/cron.daily/oinkmaster.j2', dest: '/etc/cron.daily/oinkmaster', mode: '0755' }
- name: Update snort
shell: "oinkmaster -C /etc/oinkmaster.conf -o /etc/snort/rules/"
......@@ -40,11 +43,3 @@
name: "/var/log/snort"
state: directory
mode: "0755"
- name: Install oinkmaster cronjob
template:
src: "etc/cron.daily/oinkmaster.j2"
dest: "/etc/cron.daily/oinkmaster"
owner: root
group: root
mode: "0755"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment