solution
This commit is contained in:
10
playbook.yml
Normal file
10
playbook.yml
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
---
|
||||||
|
- hosts: centos1.formation.opendoor.fr
|
||||||
|
tasks:
|
||||||
|
- name: create account
|
||||||
|
vars:
|
||||||
|
password: "{{ lookup('ansible.builtin.password', '/tmp/userpassword', length=14, seed=inventory_hostname, chars=['ascii_letters', 'digits', 'punctuation']) }}"
|
||||||
|
ansible.builtin.user:
|
||||||
|
user: foobar
|
||||||
|
password: "{{ password | password_hash( 'sha512', 1234 | random( seed=inventory_hostname )) }}"
|
||||||
|
shell: /bin/bash
|
||||||
Reference in New Issue
Block a user