2025-06-21
This commit is contained in:
11
hosts
11
hosts
@ -1,9 +1,9 @@
|
|||||||
# Consolidation of all groups
|
# Consolidation of all groups
|
||||||
[hosts:children]
|
[hosts:children]
|
||||||
pve01
|
pve01_debian
|
||||||
internet
|
internet
|
||||||
|
|
||||||
[pve01]
|
[pve01_debian]
|
||||||
fileserver01 ansible_host=192.168.10.52
|
fileserver01 ansible_host=192.168.10.52
|
||||||
checkmk ansible_host=192.168.10.53
|
checkmk ansible_host=192.168.10.53
|
||||||
pbs01 ansible_host=192.168.10.54
|
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
|
vserver01 ansible_host=192.168.10.180
|
||||||
seedbox ansible_host=192.168.20.10
|
seedbox ansible_host=192.168.20.10
|
||||||
aptcache ansible_host=192.168.50.10
|
aptcache ansible_host=192.168.50.10
|
||||||
|
docker-dmz ansible_host=192.168.50.11
|
||||||
rustdesk ansible_host=192.168.50.12
|
rustdesk ansible_host=192.168.50.12
|
||||||
radicale ansible_host=192.168.50.13
|
radicale ansible_host=192.168.50.13
|
||||||
mumble ansible_host=192.168.50.14
|
mumble ansible_host=192.168.50.14
|
||||||
freshrss ansible_host=192.168.50.17
|
freshrss ansible_host=192.168.50.17
|
||||||
owncloud ansible_host=192.168.50.18
|
owncloud ansible_host=192.168.50.18
|
||||||
|
arrstack ansible_host=192.168.50.19
|
||||||
webserver01 ansible_host=192.168.50.19
|
webserver01 ansible_host=192.168.50.19
|
||||||
webserver02 ansible_host=192.168.50.20
|
webserver02 ansible_host=192.168.50.20
|
||||||
gitea ansible_host=192.168.50.21
|
|
||||||
bookshelf ansible_host=192.168.50.22
|
bookshelf ansible_host=192.168.50.22
|
||||||
syncthing ansible_host=192.168.50.24
|
syncthing ansible_host=192.168.50.24
|
||||||
sftpgo ansible_host=192.168.50.25
|
sftpgo ansible_host=192.168.50.25
|
||||||
jellyfin ansible_host=192.168.60.20
|
jellyfin ansible_host=192.168.60.20
|
||||||
adgurd ansible_host=192.168.178.10
|
adgurd ansible_host=192.168.178.10
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[internet]
|
[internet]
|
||||||
strato ansible_host=85.215.43.109
|
strato ansible_host=85.215.43.109
|
||||||
|
|
||||||
[pve01:vars]
|
[pve01_debian:vars]
|
||||||
ansible_user=root
|
ansible_user=root
|
||||||
ansible_port=22
|
ansible_port=22
|
||||||
ansible_python_interpreter=/usr/bin/python3
|
ansible_python_interpreter=/usr/bin/python3
|
||||||
|
18
playbooks/hosts-ping.yml
Normal file
18
playbooks/hosts-ping.yml
Normal 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
|
Reference in New Issue
Block a user