Skip to content

Commit

Permalink
might work
Browse files Browse the repository at this point in the history
  • Loading branch information
l3acon committed Aug 28, 2024
1 parent eefd924 commit 312ea2f
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 0 deletions.
23 changes: 23 additions & 0 deletions openshift/hub/sync.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
- name: Add AH token to repo and Sync AutomationHub
hosts: localhost
gather_facts: false
tasks:
- name: Add AH token
infra.ah_configuration.collection_remote:
name: rh-certified
token: "{{ ah_token }}"
url: https://console.redhat.com/api/automation-hub/content/published/
auth_url: https://sso.redhat.com/auth/realms/redhat-external/protocol/openid-connect/token
ah_host: "{{ automation_hub_url }}"
ah_username: 'admin'
ah_password: "{{ lookup('ansible.builtin.env', 'CONTROLLER_PASSWORD') }}"

- name: Sync repositories in AH (this can take a while)
infra.ah_configuration.collection_repository_sync:
name: rh-certified
wait: true
timeout: 1500
ah_host: "{{ automation_hub_url }}"
ah_username: 'admin'
ah_password: "{{ lookup('ansible.builtin.env', 'CONTROLLER_PASSWORD') }}"
22 changes: 22 additions & 0 deletions openshift/setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,28 @@ controller_templates:
- "OpenShift Credential"
- "Controller Credential"

- name: OpenShift / Hub / Sync Repositories
job_type: run
inventory: "Demo Inventory"
project: "Ansible official demo project"
playbook: "openshift/hub/sync.yml"
notification_templates_started: Telemetry
notification_templates_success: Telemetry
notification_templates_error: Telemetry
survey_enabled: true
credentials:
- "OpenShift Credential"
- "Controller Credential"
survey:
name: ''
description: ''
spec:
- question_name: Automation Hub Token
type: text
description: See https://console.redhat.com/ansible/automation-hub/token
variable: ah_token
required: true

- name: OpenShift / CNV / Install Operator
job_type: run
inventory: "Demo Inventory"
Expand Down

0 comments on commit 312ea2f

Please sign in to comment.