From 8bd96e79e45db75576c9e6552b267340235f85ef Mon Sep 17 00:00:00 2001 From: staffadmin Date: Sun, 30 Mar 2025 18:13:33 +0200 Subject: [PATCH] azdaz --- scan.yml | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/scan.yml b/scan.yml index 1edbcdf..1861184 100644 --- a/scan.yml +++ b/scan.yml @@ -117,19 +117,19 @@ - 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: "IP,CN,ISSUER,REVERSE" + 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 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 + line: "IP,CN,ISSUER,REVERSE" + insertbefore: BOF loop: "{{ cert.results }}" - loop_control: - index_var: my_idx delegate_to: localhost when: item.invocation is defined @@ -163,6 +163,14 @@ delegate_to: localhost +# - name: Run a simple command (command) +# community.docker.docker_container_exec: +# container: foo +# command: /bin/bash -c "ls -lah" +# chdir: /root +# register: result + + # - debug: # msg: "{{ host_interfaces }}"