Blame playbooks/host/hosts-present-with-randompasswords.yml
|
Packit |
8cb997 |
---
|
|
Packit |
8cb997 |
- name: Hosts present with random passwords
|
|
Packit |
8cb997 |
hosts: ipaserver
|
|
Packit |
8cb997 |
become: true
|
|
Packit |
8cb997 |
|
|
Packit |
8cb997 |
tasks:
|
|
Packit |
8cb997 |
- name: Hosts host01.example.com and host01.example.com present with random passwords
|
|
Packit |
8cb997 |
ipahost:
|
|
Packit |
8cb997 |
ipaadmin_password: MyPassword123
|
|
Packit |
8cb997 |
hosts:
|
|
Packit |
8cb997 |
- name: host01.example.com
|
|
Packit |
8cb997 |
random: yes
|
|
Packit |
8cb997 |
force: yes
|
|
Packit |
8cb997 |
- name: host02.example.com
|
|
Packit |
8cb997 |
random: yes
|
|
Packit |
8cb997 |
force: yes
|
|
Packit |
8cb997 |
register: ipahost
|
|
Packit |
8cb997 |
|
|
Packit |
8cb997 |
- name: Print generated random password for host01.example.com
|
|
Packit |
8cb997 |
debug:
|
|
Packit |
8cb997 |
var: ipahost.host["host01.example.com"].randompassword
|
|
Packit |
8cb997 |
|
|
Packit |
8cb997 |
- name: Print generated random password for host02.example.com
|
|
Packit |
8cb997 |
debug:
|
|
Packit |
8cb997 |
var: ipahost.host["host02.example.com"].randompassword
|
|
Packit |
8cb997 |
|