Feature #8022
closedHammer cli should support setting a ssh paswort for new compute resource images (libvirt)
Description
Hello,
when adding an new image to a libvirt compute resource using the foreman hammer cli there should be an option to set a password which will be used to ssh into a new vm during provisioning time to deploy the finish scripts:
hammer compute-resource image create --help Usage: hammer compute-resource image create [OPTIONS] Options: --architecture ARCHITECTURE_NAME Architecture name --architecture-id ARCHITECTURE_ID --compute-resource COMPUTE_RESOURCE_NAME Compute resource name --compute-resource-id COMPUTE_RESOURCE_ID --name NAME --operatingsystem-id OPERATINGSYSTEM_ID --username USERNAME --uuid UUID -h, --help print help
Here the password option is missing.
Updated by Dominic Cleal about 10 years ago
- Category changed from Hammer core to Foreman commands (obsolete)
Seems to be missing documentation in the API.
Updated by Dirk Mayer over 9 years ago
Any updates here ?
In my opinion this is not a missing documentation, I think the API does not support it yet ?
Updated by Dominic Cleal over 9 years ago
The API's image routes should accept a 'password' parameter automatically, so it should just be a case of adding it to the API documentation, which should make it available in Hammer.
Updated by Tomáš Strachota about 8 years ago
- Description updated (diff)
- Category changed from Foreman commands (obsolete) to Compute resources
Setting ssh credentials is not supported in neither UI nor API. Users have to set up ssh keys. I'm not aware of any plans to implement connection with passwords.
Updated by Tomáš Strachota about 8 years ago
- Related to Tracker #16829: Tracker for compute resource related issues added
Updated by Dirk Mayer about 8 years ago
Logging into a VM for finish script template execution provisioned via foreman via SSH and user password is already supported and the password can be configured via ForemanWeb GUI:
Infrastructure -> Compute resources -> Select corresponding host from table -> Tab: Images -> Edit button for corresponding image -> Text field: Password
Setting this password via hammer cli should also being possible
Updated by Dirk Mayer about 8 years ago
But it seems that at least version of foreman-cli noarch 1.13.0-1.el7 does already support this:
hammer compute-resource image create --help
Usage:
hammer compute-resource image create [OPTIONS]
Options:
--architecture ARCHITECTURE_NAME Architecture name
--architecture-id ARCHITECTURE_ID
--compute-resource COMPUTE_RESOURCE_NAME Compute resource name
--compute-resource-id COMPUTE_RESOURCE_ID
--name NAME
--operatingsystem OPERATINGSYSTEM_TITLE Operating system title
--operatingsystem-id OPERATINGSYSTEM_ID
--password PASSWORD
--user-data USER_DATA Whether or not the image supports user data
--username USERNAME
--uuid UUID
-h, --help print help
Updated by Shira Maximov almost 5 years ago
- Status changed from New to Resolved
Closing this issue since it was resolved already.