10 lines
423 B
YAML
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 |