39 lines
922 B
YAML
39 lines
922 B
YAML
---
|
|
- hosts: localhost
|
|
gather_facts: no
|
|
|
|
tasks:
|
|
- name: File-Loopup /etc/timezone
|
|
debug:
|
|
msg: "/etc/timezone: {{ lookup('file', '/etc/timezone') }}"
|
|
|
|
- name: Password-Lookup 1
|
|
debug:
|
|
msg: "Passwort: {{ lookup('password', '/tmp/.secret.pw') }}"
|
|
|
|
- name: Password-Lookup 2
|
|
debug:
|
|
msg: "Passwort: {{ lookup('password', '/tmp/.secret.pw') }}"
|
|
|
|
- name: rm /tmp/.secret.pw
|
|
file:
|
|
dest: /tmp/.secret.pw
|
|
state: absent
|
|
|
|
- name: Password-Lookup 3
|
|
debug:
|
|
msg: "Passwort: {{ lookup('password', '/tmp/.secret.pw') }}"
|
|
|
|
- name: Password-Lookup 4
|
|
debug:
|
|
msg: "Passwort: {{ lookup('password', '/tmp/.secret.pw') }}"
|
|
|
|
- name: dig-Lookup
|
|
debug:
|
|
var: "lookup('dig', 'heinlein-akademie.de', 'qtype=MX')"
|
|
|
|
- name: dig-Query
|
|
debug:
|
|
var: "query('dig', 'heinlein-akademie.de', 'qtype=MX')"
|
|
|