From 337cc185c4dd9f333712a5d4c33bd3e2db4df763 Mon Sep 17 00:00:00 2001
From: anima
Date: Sun, 28 May 2023 22:59:46 +0200
Subject: [PATCH] basic installer
---
README.md | 14 +++++++++++++-
installer.yml | 22 ++++++++++++++++++++++
2 files changed, 35 insertions(+), 1 deletion(-)
create mode 100755 installer.yml
diff --git a/README.md b/README.md
index 6715ef3..8d0a6fe 100644
--- a/README.md
+++ b/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
diff --git a/installer.yml b/installer.yml
new file mode 100755
index 0000000..da0fc8d
--- /dev/null
+++ b/installer.yml
@@ -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 ..."
\ No newline at end of file