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