WIP passing args to plugin as dict

This commit is contained in:
Justus Grunow 2025-05-07 22:10:38 -04:00
parent 13af3c562c
commit 31a27229f4
2 changed files with 5 additions and 1 deletions

View File

@ -4,7 +4,8 @@ hosts:
hostname: webassets.confederationcollege.ca hostname: webassets.confederationcollege.ca
actions: actions:
- ping - ping
- httpcheck - httpcheck:
endpoint: https://webassets.confederationcollege.ca
secureassets: secureassets:
hostname: secureassets.confederationcollege.ca hostname: secureassets.confederationcollege.ca
actions: actions:

View File

@ -16,5 +16,8 @@ with open('hosts.yaml', 'r') as file:
for host, details in hosts['hosts'].items(): for host, details in hosts['hosts'].items():
for action in details['actions']: for action in details['actions']:
!!! arguments = {'hostname': }
result = getattr(plugins[action], action)(details['hostname']) result = getattr(plugins[action], action)(details['hostname'])
#print(f"{host}\t{action}\t{result[0]}\t{result[1]}")
print(row_format.format(host, action, result[0], result[1])) print(row_format.format(host, action, result[0], result[1]))