test
This commit is contained in:
4
scan.yml
4
scan.yml
@@ -100,7 +100,7 @@
|
|||||||
# delegate_to: localhost
|
# delegate_to: localhost
|
||||||
|
|
||||||
- ansible.builtin.set_fact:
|
- ansible.builtin.set_fact:
|
||||||
nc_port_list: "{{ nc_port_list|default([]) + [item.stderr_lines | join('/')]}}"
|
nc_port_list: "{{ nc_port_list|default([]) + [item.stdout_lines | join('/')]}}"
|
||||||
loop: "{{ nc_port.results }}"
|
loop: "{{ nc_port.results }}"
|
||||||
|
|
||||||
#! remove run once when network range > 24
|
#! remove run once when network range > 24
|
||||||
@@ -129,7 +129,7 @@
|
|||||||
|
|
||||||
- ansible.builtin.lineinfile:
|
- ansible.builtin.lineinfile:
|
||||||
path: "{{ playbook_dir }}/scan/https/{{ item.invocation.module_args.host.split('.')[0] }}/{{ item.invocation.module_args.host.split('.')[1] }}/{{ item.invocation.module_args.host.split('.')[2] }}.csv"
|
path: "{{ playbook_dir }}/scan/https/{{ item.invocation.module_args.host.split('.')[0] }}/{{ item.invocation.module_args.host.split('.')[1] }}/{{ item.invocation.module_args.host.split('.')[2] }}.csv"
|
||||||
line: "{{ item.invocation.module_args.host }},{{ item.invocation.module_args.port }},{{ nc_port_list[my_idx].split('[')[-1] |default('no service ??') }}, {{ item.subject.CN | default('no CN') }},{{ item.issuer.C | default('no issuer Country') }},{{ item.issuer.O| default('no issuer Orga') }}"
|
line: "{{ item.invocation.module_args.host }},{{ item.invocation.module_args.port }},{{ nc_port_list[my_idx] |default('no service ??') }}, {{ item.subject.CN | default('no CN') }},{{ item.issuer.C | default('no issuer Country') }},{{ item.issuer.O| default('no issuer Orga') }}"
|
||||||
create: yes
|
create: yes
|
||||||
state: present
|
state: present
|
||||||
loop: "{{ cert.results }}"
|
loop: "{{ cert.results }}"
|
||||||
|
|||||||
Reference in New Issue
Block a user