Archived
Update add_new_user.yaml
This commit is contained in:
@@ -4,3 +4,22 @@
|
|||||||
become: true
|
become: true
|
||||||
become_user: root
|
become_user: root
|
||||||
become_method: sudo
|
become_method: sudo
|
||||||
|
|
||||||
|
vars_prompt:
|
||||||
|
|
||||||
|
- name: username
|
||||||
|
prompt: What is your username?
|
||||||
|
private: no
|
||||||
|
|
||||||
|
- name: password
|
||||||
|
prompt: What is your password?
|
||||||
|
|
||||||
|
tasks:
|
||||||
|
- name: Create madhead user
|
||||||
|
user:
|
||||||
|
name: madhead
|
||||||
|
password: "{{ {{ password }} | password_hash('sha512') }}"
|
||||||
|
shell: /bin/bash
|
||||||
|
update_password: on_create
|
||||||
|
register: madhead
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user