Feature #8022
closed
Hammer cli should support setting a ssh paswort for new compute resource images (libvirt)
Added by Dirk Mayer about 10 years ago.
Updated almost 5 years ago.
Category:
Compute resources
|
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.
- Category changed from Hammer core to Foreman commands (obsolete)
Seems to be missing documentation in the API.
Any updates here ?
In my opinion this is not a missing documentation, I think the API does not support it yet ?
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.
- 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.
- Related to Tracker #16829: Tracker for compute resource related issues added
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
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
- Status changed from New to Resolved
Closing this issue since it was resolved already.
Also available in: Atom
PDF