Compare commits
No commits in common. "0a321f2acbe545efd5d5379167fbdaba233bfc35" and "5b84cafa3df4c09d2355465eeac90c40b16d8e7c" have entirely different histories.
0a321f2acb
...
5b84cafa3d
@ -20,49 +20,12 @@
|
|||||||
src: /etc/passwd
|
src: /etc/passwd
|
||||||
dest: "{{ inventory_hostname }}"
|
dest: "{{ inventory_hostname }}"
|
||||||
|
|
||||||
- name: Collect disk space data
|
|
||||||
block:
|
|
||||||
- name: lsblk
|
|
||||||
shell: lsblk
|
|
||||||
register: lsblk_output
|
|
||||||
become: yes
|
|
||||||
- name: Store results
|
|
||||||
copy:
|
|
||||||
content: "{{lsblk_output.stdout}}"
|
|
||||||
dest: "{{ inventory_hostname }}/lsblk.out"
|
|
||||||
delegate_to: localhost
|
|
||||||
|
|
||||||
- name: Collect netstat
|
|
||||||
block:
|
|
||||||
- name: Run command
|
|
||||||
shell: netstat -peanut
|
|
||||||
register: netstat_output
|
|
||||||
become: yes
|
|
||||||
- name: Store results
|
|
||||||
copy:
|
|
||||||
content: "{{netstat_output.stdout}}"
|
|
||||||
dest: "{{ inventory_hostname }}/netstat.out"
|
|
||||||
delegate_to: localhost
|
|
||||||
|
|
||||||
- name: Collect process data
|
|
||||||
block:
|
|
||||||
- name: Run command
|
|
||||||
shell: ps aux
|
|
||||||
register: ps_output
|
|
||||||
become: yes
|
|
||||||
- name: Store results
|
|
||||||
copy:
|
|
||||||
content: "{{ps_output.stdout}}"
|
|
||||||
dest: "{{ inventory_hostname }}/ps.out"
|
|
||||||
delegate_to: localhost
|
|
||||||
|
|
||||||
- name: Get users
|
- name: Get users
|
||||||
get_users:
|
get_users:
|
||||||
#min_uid: "{{ (ansible_os_family == 'RedHat') | ternary(500,1000) }}"
|
#min_uid: "{{ (ansible_os_family == 'RedHat') | ternary(500,1000) }}"
|
||||||
min_uid: 1000
|
min_uid: 1000
|
||||||
max_uid: 65000
|
max_uid: 65000
|
||||||
become: yes
|
register: users_list
|
||||||
register: users_list
|
|
||||||
|
|
||||||
- name: Give root exclusively the current controller user's SSH key
|
- name: Give root exclusively the current controller user's SSH key
|
||||||
ansible.posix.authorized_key:
|
ansible.posix.authorized_key:
|
||||||
@ -103,7 +66,7 @@
|
|||||||
|
|
||||||
- name: Reset UFW
|
- name: Reset UFW
|
||||||
ufw: state=reset
|
ufw: state=reset
|
||||||
|
|
||||||
- name: Configure ufw defaults
|
- name: Configure ufw defaults
|
||||||
ufw: direction={{ item.direction }} policy={{ item.policy }}
|
ufw: direction={{ item.direction }} policy={{ item.policy }}
|
||||||
with_items:
|
with_items:
|
||||||
|
Loading…
Reference in New Issue
Block a user