27 lines
774 B
YAML
27 lines
774 B
YAML
- name: Delete default user
|
|
user:
|
|
name: "{{ name_user }}"
|
|
state: absent
|
|
remove: yes
|
|
- name: Change root password
|
|
user:
|
|
name: root
|
|
password: "{{ ssh_password | password_hash('sha512') }}"
|
|
- name: Configure bashrc
|
|
lineinfile:
|
|
dest: "/root/.bashrc"
|
|
regexp: "{{item.regexp}}"
|
|
line: "{{item.line}}"
|
|
state: present
|
|
with_items:
|
|
- regexp: "^# export LS_OPTIONS"
|
|
line: "export LS_OPTIONS='--color=auto"
|
|
- regexp: "^# eval"
|
|
line: 'eval "$(dircolors)"'
|
|
- regexp: "^# alias ls='ls $LS_OPTIONS'"
|
|
line: "alias ls='ls $LS_OPTIONS'"
|
|
- regexp: "^# alias ll='ls $LS_OPTIONS -l'"
|
|
line: "alias ll='ls $LS_OPTIONS -l'"
|
|
- regexp: "# alias la='ls $LS_OPTIONS -la'"
|
|
line: "alias la='ls $LS_OPTIONS -la'"
|