|
172 | 172 | - { pkg: zookeeper, test: "{{with_zookeeper}}", state: installed } |
173 | 173 | - { pkg: kafka, test: "{{with_kafka}}", state: installed } |
174 | 174 | - { pkg: kafkacat, test: "{{with_kafka}}", state: installed } |
| 175 | + - { pkg: fsf, test: "{{with_fsf}}", state: installed } |
175 | 176 | - { pkg: chrony, state: installed } |
176 | 177 | - { pkg: firewalld, state: installed } |
177 | 178 | - { pkg: postfix, state: absent } |
|
381 | 382 | git: |
382 | 383 | repo: "{{ bro_rockscripts_repo }}" |
383 | 384 | dest: /opt/bro/share/bro/site/scripts/rock |
384 | | - depth: 1 |
385 | 385 | version: "{{ bro_rockscripts_branch }}" |
386 | 386 | when: rock_online_install |
387 | 387 |
|
|
403 | 403 | force: yes |
404 | 404 | when: not rock_online_install |
405 | 405 |
|
| 406 | + - name: Update owner for ROCK NSM Bro scripts |
| 407 | + file: |
| 408 | + path: /opt/bro/share/bro/site/scripts/rock |
| 409 | + owner: "{{ bro_user }}" |
| 410 | + group: "{{ bro_group }}" |
| 411 | + state: directory |
| 412 | + recurse: yes |
| 413 | + follow: yes |
| 414 | + tags: |
| 415 | + - bro_scripts |
| 416 | + |
406 | 417 | - name: Add ROCK scripts to local.bro |
407 | 418 | lineinfile: |
408 | 419 | dest: /opt/bro/share/bro/site/local.bro |
|
665 | 676 | {{ "/usr/bin/systemctl restart snortd;" if with_snort else None }} |
666 | 677 | when: with_pulledpork |
667 | 678 |
|
| 679 | + ####################################################### |
| 680 | + ######################## FSF ########################## |
| 681 | + ####################################################### |
| 682 | + |
| 683 | + - name: Create FSF data dir |
| 684 | + file: |
| 685 | + path: "{{ fsf_data_dir }}" |
| 686 | + mode: 0755 |
| 687 | + owner: "{{ fsf_user }}" |
| 688 | + group: "{{ fsf_group }}" |
| 689 | + state: directory |
| 690 | + when: with_fsf |
| 691 | + |
| 692 | + - name: Create FSF archive dir |
| 693 | + file: |
| 694 | + path: "{{ fsf_archive_dir }}" |
| 695 | + mode: 0755 |
| 696 | + owner: "{{ fsf_user }}" |
| 697 | + group: "{{ fsf_group }}" |
| 698 | + state: directory |
| 699 | + when: with_fsf |
| 700 | + |
| 701 | + - name: Configure logrotate for FSF logs |
| 702 | + copy: |
| 703 | + src: files/logrotate-fsf.conf |
| 704 | + dest: /etc/logrotate.d/fsf.conf |
| 705 | + mode: 0644 |
| 706 | + owner: root |
| 707 | + group: root |
| 708 | + when: with_fsf |
| 709 | + |
| 710 | + - name: Configure fsf-server |
| 711 | + template: |
| 712 | + src: templates/fsf-server-config.j2 |
| 713 | + dest: /opt/fsf/fsf-server/conf/config.py |
| 714 | + owner: "{{ fsf_user }}" |
| 715 | + group: "{{ fsf_group }}" |
| 716 | + mode: 0644 |
| 717 | + when: with_fsf |
| 718 | + |
| 719 | + - name: Configure fsf-client |
| 720 | + template: |
| 721 | + src: templates/fsf-client-config.j2 |
| 722 | + dest: /opt/fsf/fsf-client/conf/config.py |
| 723 | + owner: "{{ fsf_user }}" |
| 724 | + group: "{{ fsf_group }}" |
| 725 | + mode: 0644 |
| 726 | + when: with_fsf |
| 727 | + |
| 728 | + - name: Enable and start FSF |
| 729 | + service: name=fsf state=started enabled=yes |
| 730 | + when: with_fsf and enable_fsf |
| 731 | + |
668 | 732 | ###################################################### |
669 | 733 | ################### Setup Zookeeper ################## |
670 | 734 | ###################################################### |
|
831 | 895 | group: root |
832 | 896 | when: with_logstash and with_suricata |
833 | 897 |
|
| 898 | + - name: Configure Logstash to pickup the FSF scan.log |
| 899 | + copy: |
| 900 | + src: "files/logstash-fsf-es.conf" |
| 901 | + dest: "/etc/logstash/conf.d/fsf-es.conf" |
| 902 | + mode: 0644 |
| 903 | + owner: root |
| 904 | + group: root |
| 905 | + when: with_logstash and with_fsf |
| 906 | + |
834 | 907 | - name: Enable and start Logstash |
835 | 908 | service: name=logstash state=started enabled=yes |
836 | 909 | when: with_logstash |
|
0 commit comments