Remove redundant naming prompt and fix Ansible empty-prefix command failure in webrunner

- Replace get_deployment_name_with_options() call with auto-derived wr-{deployment_id}; user already entered engagement name, second naming menu was noise
- Split run_scan.yml single command with conditional Jinja prefix into two when-gated tasks; empty-string prefix from use_tor=false caused Ansible to fail with return code 4
This commit is contained in:
n0mad1k
2026-04-30 16:55:43 -04:00
parent 72b160a596
commit a5dcb5bd75
2 changed files with 20 additions and 8 deletions
+17 -1
View File
@@ -11,7 +11,6 @@
- name: Run scan on {{ node_name }} ({{ node_ip_count }} IPs, mode={{ scan_mode }})
command: >
{{ 'proxychains4 -f /etc/proxychains4.conf' if (use_tor | default(false) | bool) else '' }}
python3 /root/webrunner/node_scanner.py
--mode {{ scan_mode }}
--ports {{ ports_str }}
@@ -23,6 +22,23 @@
async: 43200
poll: 60
ignore_errors: true
when: not (use_tor | default(false) | bool)
- name: Run scan via Tor on {{ node_name }} ({{ node_ip_count }} IPs, mode={{ scan_mode }})
command: >
proxychains4 -f /etc/proxychains4.conf
python3 /root/webrunner/node_scanner.py
--mode {{ scan_mode }}
--ports {{ ports_str }}
--rate {{ masscan_rate }}
--node-name {{ node_name }}
args:
chdir: /root/webrunner
register: scan_output
async: 43200
poll: 60
ignore_errors: true
when: use_tor | default(false) | bool
- name: Show scan output for {{ node_name }}
debug: