WIP passing args to plugin as dict
This commit is contained in:
parent
13af3c562c
commit
31a27229f4
@ -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:
|
||||||
|
|||||||
@ -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]))
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user