Question - External firmware repository
ClaireHayard opened this issue · comments
Hi Claire, I will check and get back to you
Hello @nabhajit-ray, any news on this ?
Hi Claire,
Yes. Oneview repositories (oneview_repositories) plugin supports usage of https web server. Please ensure that Server Certificate is added to the appliance before repository creation. Below is an example:
-
name: Gather facts about a Server Certificate by remote address
oneview_certificates_server_facts:
config: "{{ config }}"
sessionID: "{{ session.ansible_facts.session }}"
remote: "{{ contents.repositories.remote_server }}"
delegate_to: localhost -
set_fact:
certificate: "{{ remote_certificate['certificateDetails'][0]['base64Data'] }}"
#Server Certificate need to be added to appliance for using an Https web server
-
name: Create a Server Certificate
oneview_certificates_server:
config: "{{ config }}"
sessionID: "{{ session.ansible_facts.session }}"
state: present
name: "{{ contents.repositories.remote_server }}"
data:
certificateDetails:
- aliasName: "{{ contents.repositories.remote_server }}"
base64Data: "{{ certificate }}"
delegate_to: localhost -
name: Create a Repository
oneview_repositories:
config: "{{ config }}"
sessionID: "{{ session.ansible_facts.session }}"
state: present
validate_etag: False
data:
name: "{{ contents.repositories.repository_name }}"
userName: "{{ contents.repositories.repository_username }}"
password: "{{ contents.repositories.repository_password }}"
repositoryURI: "{{ contents.repositories.repository_uri }}"
repositoryType: "FirmwareExternalRepo"
delegate_to: localhost
register: repository