feat(agent): showsubnet address in logs when conducting subnet actions

!8
This commit is contained in:
2024-02-22 18:38:21 +09:30
parent b3e911efcd
commit f8bdccd122

View File

@ -1,6 +1,6 @@
--- ---
- name: Scan subnet - name: Scan subnet - {{ subnet.address }}
ansible.builtin.command: ansible.builtin.command:
cmd: nmap -sn "{{ subnet.address }}" -oX - cmd: nmap -sn "{{ subnet.address }}" -oX -
become: true become: true
@ -15,7 +15,7 @@
api_query_string: "filter_by=subnetId&filter_value={{ subnet.id }}" api_query_string: "filter_by=subnetId&filter_value={{ subnet.id }}"
- name: Load Subnet - name: Load Subnet - {{ subnet.address }}
ansible.builtin.set_fact: ansible.builtin.set_fact:
cached_subnet: "{{ lookup('file', cache_filepath) }}" cached_subnet: "{{ lookup('file', cache_filepath) }}"
cacheable: false cacheable: false
@ -24,7 +24,7 @@
api_call.status | default(0) | int != 404 api_call.status | default(0) | int != 404
- name: Process Scan Results - name: Process Scan Results - {{ subnet.address }}
ansible.builtin.set_fact: ansible.builtin.set_fact:
subnet_scan_results: |- subnet_scan_results: |-
[ [
@ -51,12 +51,12 @@
{% endfor %} {% endfor %}
] ]
- name: To JSON - name: To JSON - {{ subnet.address }}
ansible.builtin.set_fact: ansible.builtin.set_fact:
subnet_scan_results: "{{ subnet_scan_results | from_yaml }}" subnet_scan_results: "{{ subnet_scan_results | from_yaml }}"
- name: Upload Scan Results - name: Upload Scan Results - {{ subnet.address }}
ansible.builtin.uri: ansible.builtin.uri:
url: "{{ nfc_c_http_server }}:{{ nfc_c_http_port }}/" url: "{{ nfc_c_http_server }}:{{ nfc_c_http_port }}/"
method: POST method: POST