test csv output
This commit is contained in:
12
scan.yml
12
scan.yml
@@ -116,10 +116,18 @@
|
||||
when: item.invocation is defined
|
||||
|
||||
- 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] }}"
|
||||
line: "{{ item.invocation.module_args.host }} ---- {{ item.subject.CN | default('no CN') }} ---- {{ item.issuer| default('no issuer') }} ------ {{ reverse_dns_list[my_idx]|default('no reverse') }}"
|
||||
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: "IP,CN,ISSUER,REVERSE"
|
||||
create: yes
|
||||
loop: "{{ cert.results }}"
|
||||
delegate_to: localhost
|
||||
when: item.invocation is defined
|
||||
|
||||
- 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"
|
||||
line: "{{ item.invocation.module_args.host }},{{ item.subject.CN | default('no CN') }},{{ item.issuer| default('no issuer') }},{{ reverse_dns_list[my_idx]|default('no reverse') }}"
|
||||
#create: yes
|
||||
loop: "{{ cert.results }}"
|
||||
loop_control:
|
||||
index_var: my_idx
|
||||
delegate_to: localhost
|
||||
|
||||
Reference in New Issue
Block a user