Handle root
This commit is contained in:
parent
efe72d2582
commit
25b688ec42
@ -33,10 +33,12 @@ swap_on: true
|
|||||||
swap_file: /swapfile
|
swap_file: /swapfile
|
||||||
#block size * block count = swap size (Bytes)
|
#block size * block count = swap size (Bytes)
|
||||||
swap_block_size: 1024
|
swap_block_size: 1024
|
||||||
swap_block_count: 1048576
|
swap_block_count: 2097152
|
||||||
|
# Default is 2GB of swapfile
|
||||||
|
|
||||||
|
|
||||||
## USER + GROUPS
|
## USER + GROUPS
|
||||||
|
root_user_cred: MyVeryStrongPassword
|
||||||
shared_group: "{{ cloud_name }}"
|
shared_group: "{{ cloud_name }}"
|
||||||
default_groups:
|
default_groups:
|
||||||
- "ssh"
|
- "ssh"
|
||||||
|
|||||||
@ -1,13 +1,4 @@
|
|||||||
---
|
---
|
||||||
- name: Limit access to cloud home only for root
|
|
||||||
file:
|
|
||||||
state: directory
|
|
||||||
path: "{{ cloud_home }}"
|
|
||||||
owner: root
|
|
||||||
group: root
|
|
||||||
mode: 0700
|
|
||||||
recurse: yes
|
|
||||||
|
|
||||||
- name: Install basic apps via apt
|
- name: Install basic apps via apt
|
||||||
apt:
|
apt:
|
||||||
update_cache: yes
|
update_cache: yes
|
||||||
@ -30,7 +21,6 @@
|
|||||||
- name: Setup and configure fail2ban service
|
- name: Setup and configure fail2ban service
|
||||||
import_tasks: fail2ban.yml
|
import_tasks: fail2ban.yml
|
||||||
|
|
||||||
|
|
||||||
- name: Setup mount points
|
- name: Setup mount points
|
||||||
import_tasks: mount.yml
|
import_tasks: mount.yml
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,9 @@
|
|||||||
---
|
---
|
||||||
|
- name: Adjust root password
|
||||||
|
user:
|
||||||
|
name: root
|
||||||
|
password: "{{ root_user_cred }}"
|
||||||
|
|
||||||
- name: list active users
|
- name: list active users
|
||||||
shell: grep -v "nologin" /etc/passwd | cut -f 1 -d ":"
|
shell: grep -v "nologin" /etc/passwd | cut -f 1 -d ":"
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user