Skip to content

Commit

Permalink
Pre-create dummy rh secret to avoid errors (#952)
Browse files Browse the repository at this point in the history
  • Loading branch information
rooftopcellist authored Sep 14, 2022
1 parent 271bce4 commit e8096a5
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 1 deletion.
31 changes: 31 additions & 0 deletions playbooks/awx.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
- hosts: localhost
gather_facts: no
collections:
- kubernetes.core
- operator_sdk.util
vars:
no_log: true
pre_tasks:
- name: Verify imagePullSecrets
k8s_info:
kind: Secret
namespace: '{{ ansible_operator_meta.namespace }}'
name: redhat-operators-pull-secret
register: _rh_ops_secret
no_log: "{{ no_log }}"
- name: Create imagePullSecret
k8s:
state: present
definition:
apiVersion: v1
kind: Secret
metadata:
name: redhat-operators-pull-secret
namespace: '{{ ansible_operator_meta.namespace }}'
stringData:
operator: awx
when:
- (_rh_ops_secret is not defined) or not (_rh_ops_secret['resources'] | length)
roles:
- installer
2 changes: 1 addition & 1 deletion watches.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
- version: v1beta1
group: awx.ansible.com
kind: AWX
role: installer
playbook: playbooks/awx.yml
snakeCaseParameters: False

- version: v1beta1
Expand Down

0 comments on commit e8096a5

Please sign in to comment.