2025-06-21

This commit is contained in:
2025-06-21 14:33:36 +02:00
parent b3d4442af3
commit 3c034a1385
3 changed files with 27 additions and 6 deletions

11
hosts
View File

@ -1,9 +1,9 @@
# Consolidation of all groups
[hosts:children]
pve01
pve01_debian
internet
[pve01]
[pve01_debian]
fileserver01 ansible_host=192.168.10.52
checkmk ansible_host=192.168.10.53
pbs01 ansible_host=192.168.10.54
@ -12,24 +12,27 @@ mail ansible_host=192.168.10.120
vserver01 ansible_host=192.168.10.180
seedbox ansible_host=192.168.20.10
aptcache ansible_host=192.168.50.10
docker-dmz ansible_host=192.168.50.11
rustdesk ansible_host=192.168.50.12
radicale ansible_host=192.168.50.13
mumble ansible_host=192.168.50.14
freshrss ansible_host=192.168.50.17
owncloud ansible_host=192.168.50.18
arrstack ansible_host=192.168.50.19
webserver01 ansible_host=192.168.50.19
webserver02 ansible_host=192.168.50.20
gitea ansible_host=192.168.50.21
bookshelf ansible_host=192.168.50.22
syncthing ansible_host=192.168.50.24
sftpgo ansible_host=192.168.50.25
jellyfin ansible_host=192.168.60.20
adgurd ansible_host=192.168.178.10
[internet]
strato ansible_host=85.215.43.109
[pve01:vars]
[pve01_debian:vars]
ansible_user=root
ansible_port=22
ansible_python_interpreter=/usr/bin/python3

18
playbooks/hosts-ping.yml Normal file
View File

@ -0,0 +1,18 @@
---
- hosts: all
gather_facts: no
tasks:
- name: Ping all hosts
ping:
register: ping_result
ignore_errors: yes
- name: Display success message
debug:
msg: "Successfully connected to {{ inventory_hostname }}"
when: ping_result is succeeded
- name: Display failure message
debug:
msg: "Failed to connect to {{ inventory_hostname }}: {{ ping_result.msg if 'msg' in ping_result else 'Unknown error' }}"
when: ping_result is failed