Add uptime.yml

This commit is contained in:
Jeffrey Serio 2025-01-28 12:37:09 -06:00
parent bfd156fda6
commit 89516b66db
2 changed files with 37 additions and 17 deletions

View File

@ -1,4 +1,4 @@
servers:
debianservers:
hosts:
hyperreal.coffee:
ansible_user: jas
@ -21,6 +21,13 @@ servers:
ansible_host: 10.0.0.5
ansible_python_interpreter: /usr/bin/python3
rhelservers:
hosts:
nas-remote:
ansible_user: root
ansible_host: nas-remote.lyrebird-marlin.ts.net
ansible_python_interpreter: /usr/bin/python3
promservers:
hosts:
desktop:
@ -34,19 +41,19 @@ promclients:
ansible_user: root
ansible_host: nas-remote.lyrebird-marlin.ts.net
ansible_python_interpreter: /usr/bin/python3
# hyperreal.coffee:
# ansible_user: jas
# ansible_host: hyperreal.lyrebird-marlin.ts.net
# ansible_python_interpreter: /usr/bin/python3
# nas-local:
# ansible_user: jas
# ansible_host: nas-local.lyrebird-marlin.ts.net
# ansible_python_interpreter: /usr/bin/python3
# auxnode:
# ansible_user: jas
# ansible_host: auxnode.lyrebird-marlin.ts.net
# ansible_python_interpreter: /usr/bin/python3
# auxnode2:
# ansible_user: jas
# ansible_host: 10.0.0.5
# ansible_python_interpreter: /usr/bin/python3
hyperreal.coffee:
ansible_user: jas
ansible_host: hyperreal.lyrebird-marlin.ts.net
ansible_python_interpreter: /usr/bin/python3
nas-local:
ansible_user: jas
ansible_host: nas-local.lyrebird-marlin.ts.net
ansible_python_interpreter: /usr/bin/python3
auxnode:
ansible_user: jas
ansible_host: auxnode.lyrebird-marlin.ts.net
ansible_python_interpreter: /usr/bin/python3
auxnode2:
ansible_user: jas
ansible_host: 10.0.0.5
ansible_python_interpreter: /usr/bin/python3

13
uptime.yml Normal file
View File

@ -0,0 +1,13 @@
---
- name: Get server uptimes
hosts:
- debianservers
- rhelservers
tasks:
- name: Get uptime
ansible.builtin.shell: uptime -p
register: uptime
- debug:
msg: "{{ uptime.stdout }}"