-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdebug-playground.yml
36 lines (31 loc) · 1.53 KB
/
debug-playground.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# _ __ _ _ ____ _
# | |/ /__ ___ ____ _(_|_) _ \ __ _ _ __ | |_ ___ _ _
# | ' // _` \ \ /\ / / _` | | | |_) / _` | '_ \| __/ __| | | |
# | . \ (_| |\ V V / (_| | | | __/ (_| | | | | |_\__ \ |_| |
# |_|\_\__,_| \_/\_/ \__,_|_|_|_| \__,_|_| |_|\__|___/\__,_|
# ____ _ _ _
# [ ANSIBLE ] | _ \| | __ _ _ _| |__ ___ ___ | | _____
# Please only use | |_) | |/ _` | | | | '_ \ / _ \ / _ \| |/ / __|
# playbooks if | __/| | (_| | |_| | |_) | (_) | (_) | <\__ \
# you know what |_| |_|\__,_|\__, |_.__/ \___/ \___/|_|\_\___/
# they change/do |___/
#
# .---------| Debug / Playground
# |
# | This playbook just contains stuff i play an test out before
# | implementing it in a useful playbook :)
# `---------------------------------------------------------------
---
- hosts: debian
tasks:
- name: Create random password for DB backend
ansible.builtin.set_fact:
dbpasswd: "{{ lookup('ansible.builtin.password', '/dev/null', chars=['ascii_letters', 'digits', '-'], length=20) }}"
- name: Create random password for admin user
ansible.builtin.set_fact:
adminpasswd: "{{ lookup('ansible.builtin.password', '/dev/null', chars=['ascii_letters', 'digits'], length=10) }}"
- name: Print
ansible.builtin.debug:
msg:
- "Your DB password is: {{ dbpasswd }}"
- "Your Admin password is: {{ adminpasswd }}"