-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support the auth type: v3applicationcredential #324
Comments
I tried this without success
-->
|
This is how I implemented the - name: List Fedora images
openstack.cloud.image_info:
auth_type: "v3applicationcredential"
auth:
auth_url: "https://rhos-d.infra.prod.upshift.rdu2.redhat.com:13000"
application_credential_id: "loremipsumdolorsitametconsecteturadipiscingelit"
application_credential_secret: "loremipsumdolorsitametconsecteturadipiscingelitseddoeiusmodtemporincididuntutlaboreetdoloremagnaaliqua"
properties:
os_distro: "fedora"
register: image_info_result |
That works for me too. This is not the question. The idea is to be able to declare one time the AUTH parameters and to inherit them within the different tasks. |
If you want to define a variable with the authentication information so it is reused you can also do this. - name: "Set facts"
ansible.builtin.set_fact:
rhos_authentication_type: v3applicationcredential
rhos_authentication:
auth_url: "https://rhos-d.infra.prod.upshift.rdu2.redhat.com:13000"
application_credential_id: "loremipsumdolorsitametconsecteturadipiscingelit"
application_credential_secret: "loremipsumdolorsitametconsecteturadipiscingelitseddoeiusmodtemporincididuntutlaboreetdoloremagnaaliqua"
- name: List Fedora images
openstack.cloud.image_info:
auth_type: "{{ rhos_authentication_type }}"
auth: "{{ rhos_authentication }}"
properties:
os_distro: "fedora"
register: image_info_result |
What about this where we dont have to pass or override some auth parameters ?
|
That can only be achieved either by using environment variables or using a named cloud. From the Ansible docs:
IIUC, named cloud requires having a local clouds:
cloud_name:
auth:
project_name: "XXXXXXXXXXXXXXXXXX"
username: "XXXXXXXXXXXXXXXXXX"
password: "XXXXXXXXXXXXXXXXXX"
user_domain_name: "XXXXXXXXXXXXXXXXXX"
project_domain_name: "XXXXXXXXXXXXXXXXXX"
auth_url: "XXXXXXXXXXXXXXXXXX"
region_name: "XXXXXXXXXXXXXXXXXX"
interface: "XXXXXXXXXXXXXXXXXX"
identity_api_version: 3 |
I dont follow you here. Where are you looking to use clouds.yaml fil ? |
I was checking for options where we don't need to pass or override the auth parameters on the playbook and roles, and those are the only 2 options I see. |
I vote to use as no override is needed, can be declared one time = init step, etc
|
Request
Our openstack playbooks to create/delete a VM use, to access the platform, the auth mode
password
. While this approach is not bad, it forces us to pass the auth parameters to every task where we access the platform and also to use the snowdrop PSI Team password.Such a user and password should be mainly used by the Operator in charge of the management of our RHOS PSI instance instead of being used too to create/delete VMs using Ansible playbook.
This is why it should be better to use as auth_type :
v3applicationcredential
as such a mode supports to use an application id/secret associated to a role, can be rotated, etc. See documentation for more information:If e decide to use it as mod, then several tasks will be required as:
The text was updated successfully, but these errors were encountered: