mirror of
https://github.com/telekom-security/tpotce.git
synced 2025-04-29 03:38:51 +00:00
Generic remote user name
set_fact: user_name is needed to display the var value in the task name
This commit is contained in:
parent
ec7c6a4ba4
commit
399d0e1e6e
1 changed files with 3 additions and 2 deletions
|
@ -13,12 +13,13 @@
|
|||
|
||||
- name: Prepare to set user password
|
||||
set_fact:
|
||||
user_name: "{{ ansible_user }}"
|
||||
user_password: "{{ linux_pass }}"
|
||||
user_salt: "s0mew1ck3dTpoT"
|
||||
|
||||
- name: Changing password for user linux to {{ user_password }}
|
||||
- name: Changing password for user {{ user_name }} to {{ user_password }}
|
||||
user:
|
||||
name: "linux"
|
||||
name: "{{ ansible_user }}"
|
||||
password: "{{ user_password | password_hash('sha512', user_salt) }}"
|
||||
state: present
|
||||
shell: /bin/bash
|
||||
|
|
Loading…
Reference in a new issue