Add debian common role
This commit is contained in:
23
common-debian/tasks/users/root.yml
Normal file
23
common-debian/tasks/users/root.yml
Normal file
@@ -0,0 +1,23 @@
|
||||
---
|
||||
- name: set root password
|
||||
user:
|
||||
name: root
|
||||
password: "{{ root_password | password_hash('sha512', root_password) }}" # Use password as salt for idemptence
|
||||
state: present
|
||||
|
||||
- name: remove any root known_hosts configuration file
|
||||
file:
|
||||
dest: /root/.ssh/known_hosts
|
||||
state: absent
|
||||
|
||||
- name: create root vim state directory
|
||||
file:
|
||||
dest: /root/.vim
|
||||
state: directory
|
||||
mode: 0700
|
||||
|
||||
- name: write admin user vimrc configuration file to root homedir
|
||||
template:
|
||||
src: var/home/user/vimrc.j2
|
||||
dest: /root/.vimrc
|
||||
mode: 0600
|
Reference in New Issue
Block a user