123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- ---
- - name: Make sure all secured clusters are federated
- hosts: workstation.lab.example.com
- gather_subset: min
- become: no
- vars:
- clusters:
- ocp4:
- name: rhacs-cluster
- namespace: rhacs
- method: operator
- admission_instances: 3
- sno1:
- name: sno1
- namespace: stackrox
- method: roxctl
- admission_instances: 1
- k3s:
- name: k3s
- namespace: stackrox
- method: helm
- admission_instances: 1
- pull_user: '|uhc-pool-9f005376-36a2-42a1-a540-0473dc873633'
- pull_pass: 'eyJhbGciOiJSUzUxMiJ9.eyJzdWIiOiI5ODg5YWExYzBmOWI0ZjU3Yjk3NmI5ZWEyMzIwZjU0MCJ9.sZd9TMQo0WDG65G9BMNnknbPcFB36hrDXd18_u3KxqZs7e8maC_PxAQxjpuY4aS6TDHnLC5jFb4Q5qXTJVn2B8a8p1ncO-3n2HnPt876i-UACSyeukioy8hr4WwufHQxUX2lqXXXv3znQ7jmTECAsnkZCQHU5tSiFsTdxEdfdyN6gm17ujckadnMlPYq6_SR6mKKiJTtT7HYCYrAVNsgK_4adgc-EpelKGlcDEi34hXo1jlB3DDrQi1ILBWE0fGWoW3g-YS1F0YD_74nmWINfPMc3nT8DZAit8L4VQONvgPNubu_MUFPhj_oUR1wUDtkPQ6KIvo6Qf2FGp2wK3PzbtADQsEVSd9HO47kDJtahnOya1fFgjeY5lSq-moOdjRWBgu6_3H_nedLIGYPDtAfzypbuxvupGu3hXZusyctiDmGm7JDyEnJv1uDVfaWnSa3I_MpTRUW2ee5D_Bjrey7eSb4lJFrjux-gcbUhqlXbYsizk7WXzoFkkTYLuqCCQoKRt8WR7U3Nhwst6rEwxANibENSsQPw0h8_CCFnjLqRN_6qjSsKiydFOkGTYbOKZNKZIUabFEN4aaTUbiXMWOKa2jMq-Hpk0L4J0RkN3bdAUjZkDDq4dV5eQcusHy_KcogwUJJ6x03Nns8oLAv4IgtJyyqra5aBGJLQxscEuR740Y'
- tasks:
- - name: find api endpoint
- stat:
- path: "{{ ansible_facts['user_dir'] }}/api-endpoint"
- register: api_endpoint_is_there
- - assert:
- that: api_endpoint_is_there.stat.exists
- fail_msg: "ERROR: api-endpoint file not found. This usually means prerequisites (such as central deployment) are not met."
- success_msg: "OK: api-endpoint found."
- - name: load api endpoint
- set_fact:
- api_ep: "{{ lookup('file', ansible_facts['user_dir'] + '/api-endpoint') }}"
- - name: find api token
- stat:
- path: "{{ ansible_facts['user_dir'] }}/api-token"
- register: api_token_is_there
- - assert:
- that: api_token_is_there.stat.exists
- fail_msg: "ERROR: api-token file not found. This usually means prerequisites (such as central deployment) are not met."
- success_msg: "OK: api-token found."
- - name: load api token
- set_fact:
- api_token: "{{ lookup('file', ansible_facts['user_dir'] + '/api-token') }}"
- - include_role:
- name: federate-clusters
- tags: federate
- loop: "{{ clusters.keys() | list }}"
- loop_control:
- loop_var: cluster
- ...
|