Files
sib_26_lookups/playbook.yml
2023-10-13 13:30:12 +02:00

10 lines
423 B
YAML

---
- 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