22 lines
461 B
YAML
Executable File
22 lines
461 B
YAML
Executable File
#!/usr/bin/ansible-playbook --inventory=localhost,
|
|
---
|
|
- hosts: localhost
|
|
connection: local
|
|
force_handlers: true
|
|
vars:
|
|
ansible_python_interpreter: auto_silent
|
|
|
|
pre_tasks:
|
|
- set_fact:
|
|
eff_uid_number: "{{ lookup('pipe', 'id -u') }}"
|
|
|
|
- block:
|
|
- debug:
|
|
msg: "Run as root!"
|
|
- meta: end_play
|
|
when: eff_uid_number|int != 0
|
|
|
|
tasks:
|
|
- name: Installer Tasks ...
|
|
debug:
|
|
msg: "install ..." |