34 lines
1.1 KiB
YAML
34 lines
1.1 KiB
YAML
- name: Create directories
|
|
ansible.builtin.file:
|
|
path: '{{ item.path }}'
|
|
owner: '{{ item.owner | default("vagrant") }}'
|
|
group: '{{ item.group | default("vagrant") }}'
|
|
mode: '{{ item.mode | default("0755") }}'
|
|
state: directory
|
|
loop:
|
|
- path: '{{ openvas_base_dir }}'
|
|
- path: '{{ openvas_database_dir }}'
|
|
- path: '{{ openvas_plugins_dir }}'
|
|
- path: '{{ openvas_gvm_dir }}'
|
|
|
|
- name: Start Openvas container
|
|
community.docker.docker_container:
|
|
name: openvas-ct
|
|
image: 'deineagenturug/gvm:{{ openvas_image_tag }}'
|
|
state: started
|
|
restart_policy: unless-stopped
|
|
volumes:
|
|
- '{{ openvas_database_dir }}:/opt/database'
|
|
- '{{ openvas_plugins_dir }}:/var/lib/openvas/plugins'
|
|
- '{{ openvas_gvm_dir }}:/var/lib/gvm'
|
|
ports:
|
|
# Publish container port 9392 as host port 9392
|
|
- "9392:9392"
|
|
env:
|
|
USERNAME: '{{ openvas_admin_account }}'
|
|
PASSWORD: '{{ openvas_admin_password }}'
|
|
DB_PASSWORD: '{{ openvas_db_password }}'
|
|
AUTO_SYNC: "true"
|
|
HTTPS: "true"
|
|
TZ: '{{ openvas_timezone }}'
|
|
SSHD: "false" |