This commit is contained in:
2023-10-13 13:30:12 +02:00
parent 54a080a53e
commit 080c784f4b

10
playbook.yml Normal file
View 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