1
0

first upload

This commit is contained in:
2025-09-15 16:50:41 +02:00
parent 604b587ebd
commit 98b06de737
5 changed files with 65 additions and 0 deletions

24
inventory/hosts.yml Normal file
View File

@@ -0,0 +1,24 @@
all:
vars:
ansible_user: msandor # minden szerverre ezzel jelentkezem be
hosts:
nas:
ansible_host: 192.168.5.2
pve:
ansible_host: 192.168.5.1
ansible_user: root # itt nincs normál user
omv:
ansible_host: 192.168.5.3
ansible_user: root # itt nincs normál user
vps1:
ansible_host: 192.168.50.151
vps2:
ansible_host: 192.168.50.154
ansible_port: 234 # alternatív porton figyel az ssh
ansible_python_interpreter: /usr/bin/python3.11 # a default python 3.6 túl régi az ansible-höz
vps3:
ansible_host: 192.168.50.152
ansible_port: 234 # alternatív porton figyel az ssh
ansible_python_interpreter: /usr/bin/python3.11 # a default python 3.6 túl régi az ansible-höz
rpi3:
ansible_host: 192.168.50.153

8
playbook/env.yml Normal file
View File

@@ -0,0 +1,8 @@
---
- name: Debug TESZT env
hosts: all
gather_facts: False
tasks:
- name: TESZT env
debug:
msg: "A TESZT változó értéke: {{ lookup('env', 'TESZT') }}"

6
playbook/pingall.yml Normal file
View File

@@ -0,0 +1,6 @@
- name: Ping all hosts
hosts: all
gather_facts: False
tasks:
- name: Ping
ansible.builtin.ping:

22
playbook/upgrade.yml Normal file
View File

@@ -0,0 +1,22 @@
---
- hosts: all
become: yes
tasks:
- name: csomagok frissítése [RedHat/yum]
yum:
name: '*'
state: latest
security: no
skip_broken: yes
when:
- ansible_os_family == "RedHat"
- name: csomagok frissítése [Debian/Ubuntu]
apt:
update_cache: yes
upgrade: yes
autoclean: yes
autoremove: yes
force_apt_get: true
when:
- ansible_os_family == "Debian"

5
playbook/whoami.yml Normal file
View File

@@ -0,0 +1,5 @@
---
- hosts: all
tasks:
- name: who am I
ansible.builtin.shell: whoami