From 6ad0af71349bca97636a82b39239b3f1529fdbd8 Mon Sep 17 00:00:00 2001 From: citty Date: Fri, 15 Oct 2021 22:51:46 -0400 Subject: [PATCH] get disk space data --- roles/immortal/tasks/main.yml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/roles/immortal/tasks/main.yml b/roles/immortal/tasks/main.yml index ba0f1a5..e940f86 100644 --- a/roles/immortal/tasks/main.yml +++ b/roles/immortal/tasks/main.yml @@ -20,12 +20,24 @@ src: /etc/passwd dest: "{{ inventory_hostname }}" +- name: Collect disk space data + block: + - name: lsblk + shell: lsblk + register: lsblk_output + - name: Store results + copy: + content: "{{lsblk_output.stdout}}" + dest: "{{ inventory_hostname }}/lsblk.out" + delegate_to: localhost + - name: Get users get_users: #min_uid: "{{ (ansible_os_family == 'RedHat') | ternary(500,1000) }}" min_uid: 1000 max_uid: 65000 - register: users_list + become: yes + register: users_list - name: Give root exclusively the current controller user's SSH key ansible.posix.authorized_key: @@ -66,7 +78,7 @@ - name: Reset UFW ufw: state=reset - + - name: Configure ufw defaults ufw: direction={{ item.direction }} policy={{ item.policy }} with_items: