Page MenuHomePhabricator
Paste P8177

(An Untitled Masterwork)
ActivePublic

Authored by jbond on Mar 11 2019, 5:10 PM.
Tags
None
Referenced Files
F28368391: raw.txt
Mar 11 2019, 5:10 PM
Subscribers
None
--- a/cookbooks/sre/hosts/ipmi-password-reset.py
+++ b/cookbooks/sre/hosts/ipmi-password-reset.py
@@ -41,7 +41,6 @@ def run(args, spicerack):
ipmi = spicerack.ipmi()
mgmt = spicerack.management()
remote = spicerack.remote()
- irc_logger = spicerack.irc_logger()
# start by collecting all physical hosts
remote_hosts = remote.query('F:virtual = physical').hosts
# get the hosts that intersect with the user query
@@ -73,7 +72,8 @@ def run(args, spicerack):
continue
break
- irc_logger.info(reason)
+ if not args.dry_run:
+ spicerack.irc_logger.info(reason)
host_status = {'success': NodeSet(), 'fail_dns': NodeSet(), 'fail_ipmi': NodeSet()}
for host in remote_hosts:
try: