Method: Inspec::Resources::AzureVirtualMachine#ssh_keys

Defined in:
lib/resources/azure/azure_virtual_machine.rb

#ssh_keysObject

Determine is the specified key is in the ssh_keys list

Returns:

  • array Array of the public keys that are assigned to allow for testing of that key



203
204
205
206
207
208
209
210
# File 'lib/resources/azure/azure_virtual_machine.rb', line 203

def ssh_keys
  # iterate around the keys
  keys = []
  properties.osProfile.linuxConfiguration.ssh.publicKeys.each do |key|
    keys << key.keyData
  end
  keys
end