mirror of
https://github.com/ansible/awx-operator.git
synced 2026-05-08 14:22:49 +00:00
Pre-create dummy rh secret to avoid errors (#952)
This commit is contained in:
31
playbooks/awx.yml
Normal file
31
playbooks/awx.yml
Normal file
@@ -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
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
- version: v1beta1
|
- version: v1beta1
|
||||||
group: awx.ansible.com
|
group: awx.ansible.com
|
||||||
kind: AWX
|
kind: AWX
|
||||||
role: installer
|
playbook: playbooks/awx.yml
|
||||||
snakeCaseParameters: False
|
snakeCaseParameters: False
|
||||||
|
|
||||||
- version: v1beta1
|
- version: v1beta1
|
||||||
|
|||||||
Reference in New Issue
Block a user