diff --git a/ivre.yml b/ivre.yml index b74cc73..b6c9dd4 100644 --- a/ivre.yml +++ b/ivre.yml @@ -4,11 +4,12 @@ become: true gather_facts: true vars: - #TODO target in list - target_network: 163.172.0.0/20 processes_nmap: 5 - category: scale_82 - source: tower + # source: tower + target_networks: + - 163.172.16.0/20 + - 163.172.31.0/20 + - 163.172.48.0/20 # 163.172.0.0/20 # 163.172.16.0/20 # 163.172.31.0/20 @@ -33,13 +34,16 @@ - --processes - "{{ processes_nmap }}" - --network - - "{{ target_network }}" + - "{{ item }}" - --output=XMLFork ignore_errors: true + loop: "{{ target_networks }}" + loop_control: + #* seconds + pause: 600 - - name: Pause for 10 minutes to build app cache - ansible.builtin.pause: - minutes: 10 + # - ansible.builtin.pause: + # minutes: 10 - name: Run SCAN2DB community.docker.docker_container_exec: @@ -48,13 +52,14 @@ - ivre - scan2db - "-c" - - "{{ category }}" + - "{{ item.split('/')[0].split('.') | join('_') }}" - "-s" - - "{{ source }}" + - "{{ ansible_host }}" - "-r" - - "scans/NET-{{ target_network.split('/')[0] }}-{{ target_network.split('/')[-1] }}/up" + - "scans/NET-{{ item.split('/')[0] }}-{{ item.split('/')[-1] }}/up" register: scan2db ignore_errors: true + loop: "{{ target_networks }}" # - debug: # msg: "{{ scan2db }}"