-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathmain.yml
More file actions
63 lines (54 loc) · 1.87 KB
/
Copy pathmain.yml
File metadata and controls
63 lines (54 loc) · 1.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
---
- name: Flush iptables rules before deployment
ansible.builtin.command:
cmd: iptables -F
become: true
ignore_errors: true
- name: Clean up the dt_path
ansible.builtin.file:
path: "{{ dt_path }}"
state: absent
- name: Clone architecture repository
ansible.builtin.git:
repo: https://github.com/masco/architecture.git
dest: "{{ dt_path }}"
version: bm-ocp
force: true
- name: Download kustomize library
ansible.builtin.shell:
cmd: curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | bash
chdir: /tmp
creates: /tmp/kustomize
- name: Move kustomize to /usr/bin
ansible.builtin.copy:
src: /tmp/kustomize
dest: /usr/bin/kustomize
remote_src: true
mode: '0755'
become: true
- name: Download or load OCP inventory
ansible.builtin.include_tasks:
file: includes/download_ocp_inventory.yml
- name: Enable IP forward for OVN-Kubernetes
ansible.builtin.command:
cmd: |-
{%raw%}
oc patch network.operator cluster -p '{"spec":{"defaultNetwork": {"ovnKubernetesConfig":{"gatewayConfig":{"ipForwarding": "Global"}}}}}' --type=merge
{%endraw%}
- name: Setup observability operator
block:
- name: Copy observability operator subscription template
ansible.builtin.template:
src: subscriptions.yaml
dest: "{{ dt_path }}/subscriptions.yaml"
- name: Apply observability operator subscription
ansible.builtin.command:
cmd: oc apply -f {{ dt_path }}/subscriptions.yaml
- name: Wait for observability operator to be available
ansible.builtin.command:
cmd: oc wait deployments/observability-operator --for condition=Available --timeout=300s -n openshift-operators
register: observability_wait
retries: 5
delay: 5
until: observability_wait.rc == 0
when: telemetry | default(true)