first upload
This commit is contained in:
24
inventory/hosts.yml
Normal file
24
inventory/hosts.yml
Normal 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
8
playbook/env.yml
Normal 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
6
playbook/pingall.yml
Normal 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
22
playbook/upgrade.yml
Normal 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
5
playbook/whoami.yml
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
- hosts: all
|
||||
tasks:
|
||||
- name: who am I
|
||||
ansible.builtin.shell: whoami
|
Reference in New Issue
Block a user