123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123 |
- ---
- - name: Make sure the namespace is there
- k8s:
- kubeconfig: tmp/kubeconfig-ocp4
- validate_certs: no
- api_version: v1
- kind: namespace
- name: "{{ op_nsp }}"
- - name: Also make sure there is a subscription
- k8s:
- kubeconfig: tmp/kubeconfig-ocp4
- validate_certs: no
- api_version: operators.coreos.com/v1alpha1
- kind: subscription
- namespace: "{{ op_nsp }}"
- name: "{{ op_pkg }}"
- definition:
- spec:
- source: "{{ op_cat }}"
- sourceNamespace: openshift-marketplace
- name: "{{ op_pkg }}"
- channel: "{{ op_chn }}"
- installPlanApproval: Automatic
- - name: Wait for CSV to show up and complete
- k8s_info:
- kubeconfig: tmp/kubeconfig-ocp4
- validate_certs: no
- api_version: operators.coreos.com/v1alpha1
- kind: clusterserviceversion
- namespace: "{{ op_nsp }}"
- name: "{{ desired_csv }}"
- register: new_csv
- until:
- - new_csv.resources is defined
- - (new_csv.resources | length) > 0
- - new_csv.resources[0].status is defined
- - new_csv.resources[0].status.phase == "Succeeded"
- retries: 30
- delay: 10
- ...
|