Skip to content
This repository has been archived by the owner on Mar 22, 2018. It is now read-only.

Commit

Permalink
investigator: Update for secret models
Browse files Browse the repository at this point in the history
  • Loading branch information
ashcrow authored and mbarnes committed May 25, 2017
1 parent d84b652 commit 6c6bfd6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/commissaire_service/investigator/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

import commissaire.constants as C

from commissaire.models import Cluster, Host, Network
from commissaire.models import Cluster, Host, HostCreds, Network
from commissaire.storage.client import StorageClient
from commissaire.util.config import ConfigurationError
from commissaire.util.date import formatted_dt
Expand Down Expand Up @@ -116,9 +116,10 @@ def on_investigate(self, message, address, cluster_data={}):
self.logger.debug('Related cluster: {}'.format(cluster_data))

host = self.storage.get_host(address)
host_creds = self.storage.get(HostCreds.new(address=host.address))
transport = ansibleapi.Transport(host.remote_user)

key = TemporarySSHKey(host, self.logger)
key = TemporarySSHKey(host_creds, self.logger)
try:
key.create()
except Exception as error:
Expand Down

0 comments on commit 6c6bfd6

Please sign in to comment.