Kapisi/roles/Sharingan/tasks/scans.yml

50 lines
866 B
YAML
Raw Normal View History

---
- name: Install lynis
register: lynis_pkg
become: yes
package:
name:
- lynis
- arch-audit
- clamav
state: present
- name: lynis config
register: lynis_conf
become: yes
copy:
src: lynis/custom.prf
dest: /etc/lynis/custom.prf
owner: root
group: root
mode: 0600
- name: Scanning services
become: yes
2022-05-04 10:30:23 -05:00
register: lynis_svc
copy:
src: "lynis/{{ item }}"
dest: /usr/lib/systemd/system/
owner: root
group: root
mode: 0664
loop:
- sharingan-scan.service
- sharingan-scan.timer
2022-05-04 10:30:23 -05:00
- systemd:
daemon_reload: yes
become: yes
when: lynis_svc.changed
- name: Enable timers
become: yes
service:
name: sharingan-scan.timer
state: restarted
enabled: yes
- import_tasks: "./vscan.yml"
when: vscan_enabled is defined