22 lines
573 B
Bash
22 lines
573 B
Bash
|
|
#!/usr/bin/ansible-playbook --inventory=localhost,
|
||
|
|
---
|
||
|
|
- hosts: localhost
|
||
|
|
connection: local
|
||
|
|
force_handlers: true
|
||
|
|
vars:
|
||
|
|
ansible_python_interpreter: auto_silent
|
||
|
|
pre_tasks:
|
||
|
|
- name: Distribution
|
||
|
|
set_fact:
|
||
|
|
distribution: "{{ ansible_distribution }}"
|
||
|
|
# - set_fact:
|
||
|
|
# eff_uid_number: "{{ lookup('pipe', 'id -u') }}"
|
||
|
|
# - block:
|
||
|
|
# - debug:
|
||
|
|
# msg: "This program requires root privileges"
|
||
|
|
# - meta: end_play
|
||
|
|
# when: eff_uid_number|int != 0
|
||
|
|
|
||
|
|
tasks:
|
||
|
|
- ansible.builtin.debug:
|
||
|
|
msg: "{{distribution}}"
|