O'Reilly logo

Security Automation with Ansible 2 by Akash Mahajan, Madhu Akula

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Vuls scanning playbook

Now, it's time to perform the scanning and reporting using the vuls Docker containers. The following playbook contains simple steps to perform the vuls scan against virtual machines and containers, and send the report to slack and web:

- name: scanning and reporting using vuls  hosts: vuls  become: yes  vars:    vuls_data_directory: "/vuls_data"    slack_web_hook_url: https://hooks.slack.com/services/XXXXXXX/XXXXXXXXXXXXXXXXXXXXX    slack_channel: "#vuls"    slack_emoji: ":ghost:"    server_to_scan: 192.168.33.80    server_username: vagrant    server_key_file_name: 192-168-33-80  tasks:    - name: copying configuraiton file and ssh keys      template:        src: "{{ item.src }}"        dest: "{{ item.dst }}"        mode: 0400            with_items: - { src: 'config.toml', dst: ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required