-
Notifications
You must be signed in to change notification settings - Fork 39
/
34_move_services_to_infra_nodes.yml
43 lines (39 loc) · 1.69 KB
/
34_move_services_to_infra_nodes.yml
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
- name: Patch configs to use infra nodes
hosts: bastion
become: true
vars_files:
- vars/cluster_vars.yml
tasks:
- name: Take care of moving core operators to infra nodes
when: not three_node
block:
- name: Take care of moving core operators to infra nodes
when: infra_present
block:
- name: Copy ingress and registry patcher templates
ansible.builtin.template:
src: templates/{{ item }}.j2
dest: /tmp/{{ item }}.sh
mode: +x
loop:
- patch_ingress_selector
- patch_registry_selector
- name: Run scripts # noqa command-instead-of-shell no-changed-when
ansible.builtin.shell: /tmp/{{ item }}.sh
loop:
- patch_ingress_selector
- patch_registry_selector
- name: Delete scripts
ansible.builtin.file:
path: /tmp/{{ item }}.sh
state: absent
loop:
- patch_ingress_selector
- patch_registry_selector
- name: Copy monitoring CM
ansible.builtin.copy:
src: files/patch_monitoring.yml
dest: "{{ workspace_directory.base_path }}/{{ cluster.name }}/patch_monitoring.yml"
mode: "0755"
- name: Patch monitoring # noqa command-instead-of-shell no-changed-when
ansible.builtin.shell: /usr/bin/oc create -f {{ workspace_directory.base_path }}/{{ cluster.name }}/patch_monitoring.yml --kubeconfig={{ workspace_directory.base_path }}/{{ cluster.name }}/config/auth/kubeconfig # noqa yaml[line-length]