Hyperling
b162731c29
* Add at and reword comment. * Add cronie, thought this was already done but last pull request got wonky. * Zypper is not happy about asking Brave repo to be added multiple times. * Replace deprecated `include` commands. * Add gcc. * Add another cc command for openSUSE. * include_tasks is not supporting ignore_errors like include used to, move to individual tasks. * Do a better job of removing libreoffice from local package manager. * Enhance reports. * Add basic VIM setup. * Undo some lynis changes, fix folder permissions so users can view. * Change lynis back to chdir and local execution. * Add doas. * Add check against old usage of setup.sh BRANCH. * Greatly reduce number of tasks, create temp file while building report. * Create temp file while building report.
31 lines
1.1 KiB
YAML
31 lines
1.1 KiB
YAML
---
|
|
# Nmap port test
|
|
|
|
- name: General | Tests | nmap | Set Facts
|
|
set_fact:
|
|
nmap_file: "{{ user_user.home }}/Reports/{{ nmap_report }}"
|
|
nmap_separator: "\n*******************************\n\n"
|
|
|
|
- name: General | Tests | nmap | Set Facts 2
|
|
set_fact:
|
|
nmap_temp_file: "{{ nmap_file }}.tmp"
|
|
|
|
- name: General | Tests | nmap | Create Report
|
|
shell: "{{ item }}"
|
|
loop:
|
|
- "date > {{ nmap_temp_file }}"
|
|
- "printf '{{ nmap_separator }}' >> {{ nmap_temp_file }}"
|
|
- "echo '-=Open Ports=-' >> {{ nmap_temp_file }}"
|
|
- "printf 'Number of open ports: ' >> {{ nmap_temp_file }}"
|
|
- "nmap --open localhost | grep -c open >> {{ nmap_temp_file }}; echo success"
|
|
- "nmap --open localhost | grep open >> {{ nmap_temp_file }}; echo success"
|
|
- "printf '{{ nmap_separator }}' >> {{ nmap_temp_file }}"
|
|
- "echo '-=Aggressive Vulnerability Check=-' >> {{ nmap_temp_file }}"
|
|
- "nmap -A localhost >> {{ nmap_temp_file }}; echo success"
|
|
- "mv {{ nmap_temp_file }} {{ nmap_file }}"
|
|
|
|
- name: General | Tests | nmap | Make Viewable
|
|
file:
|
|
path: "{{ nmap_file }}"
|
|
mode: '0644'
|