Files
ansible-freeipa/playbooks/host/ensure_host_with_randompassword.yml
Thomas Woerner d370ed2737 playbooks: Unite admin password
Use SomeADMINpassword as the admin password everywhere, also in all
playbooks.
2020-02-26 12:51:21 +01:00

19 lines
456 B
YAML

---
- name: Ensure host with random password
hosts: ipaserver
become: true
tasks:
- name: Host "{{ 'host1.' + ipaserver_domain }}" present with random password
ipahost:
ipaadmin_password: SomeADMINpassword
name: "{{ 'host1.' + ipaserver_domain }}"
random: yes
force: yes
update_password: on_create
register: ipahost
- name: Print generated random password
debug:
var: ipahost.host.randompassword