Files
phpipam_scan_agent/playbooks/tasks/scan_subnet.yaml
Jon 3f7e8051a0 feat(agent): Fetch subnets belonging to agent
the agent is the agent ID of the agent code.

!1
2024-02-19 03:44:35 +09:30

16 lines
419 B
YAML

---
- name: Scan subnet
ansible.builtin.command:
cmd: nmap -sn "{{ subnet.address }}" -oX -
become: true
register: nmap_scan
- name: Get subnets Address'
ansible.builtin.include_tasks:
file: tasks/api_call.yaml
vars:
api_client_name: "{{ client_name }}"
api_token: "{{ client_token }}"
api_path: "{{ api_address }}"
api_query_string: "filter_by=subnetId&filter_value={{ subnet.id }}"