basic installer
This commit is contained in:
14
README.md
14
README.md
@@ -1,2 +1,14 @@
|
||||
# installer
|
||||
# Ansible as installer
|
||||
|
||||
## Requirements
|
||||
Ansible must be installed ;-)
|
||||
Recommend: install ansible via pip
|
||||
|
||||
> pip3 install ansible
|
||||
|
||||
if pip noch installed see:
|
||||
### Debian // Ubuntu
|
||||
> apt install -y python3-pip
|
||||
|
||||
## RHEL // CentOS // Rocky
|
||||
> yum install -y python3-pip
|
||||
|
||||
22
installer.yml
Executable file
22
installer.yml
Executable file
@@ -0,0 +1,22 @@
|
||||
#!/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 ..."
|
||||
Reference in New Issue
Block a user