blob: 00ee45772b0c78e1c9e6824ac55e75653f0d6c35 [file] [log] [blame]
Michal Ptacek5a269d22019-01-28 13:03:16 +00001---
2# This role contains patching logic for OOM charts
3# and is valid until OOM-1610 is implemented
Michal Ptacek09bf8b32019-02-28 17:43:49 +00004- name: Check presence of files for NPM patching
5 stat:
6 path: "{{ app_helm_charts_infra_directory }}/{{ item }}"
7 with_items:
8 - common/dgbuilder/templates/deployment.yaml
9 - sdnc/charts/sdnc-portal/templates/deployment.yaml
10 register: npm_files_check
11
12- name: Check presence of dcae cloudify deployment chart file
13 stat:
14 path: "{{ app_helm_charts_infra_directory }}/{{ item }}"
15 with_items:
16 - dcaegen2/charts/dcae-cloudify-manager/templates/deployment.yaml
17 register: dcae_files_check
18
Michal Ptacek5a269d22019-01-28 13:03:16 +000019- name: Patch OOM - nexus domain resolving
20 lineinfile:
Michal Ptacek09bf8b32019-02-28 17:43:49 +000021 path: "{{ item.stat.path }}"
Michal Ptacek5a269d22019-01-28 13:03:16 +000022 regexp: '^(.*)HOSTS_FILE_RECORD'
23 line: '\g<1>{{ cluster_ip }} {{ simulated_hosts.nexus | join(" ") }} >> /etc/hosts;'
24 backrefs: yes
25 state: present
Michal Ptacek09bf8b32019-02-28 17:43:49 +000026 with_items: "{{ npm_files_check.results }}"
27 when: item.stat.exists
Michal Ptacek5a269d22019-01-28 13:03:16 +000028
29- name: Patch OOM - set npm registry
30 lineinfile:
Michal Ptacek09bf8b32019-02-28 17:43:49 +000031 path: "{{ item.stat.path }}"
Michal Ptacek5a269d22019-01-28 13:03:16 +000032 regexp: '^(.*)NPM_REGISTRY_RECORD'
33 line: '\g<1>npm set registry "http://nexus.{{ ansible_nodename }}/repository/npm-private/";'
34 backrefs: yes
35 state: present
Michal Ptacek09bf8b32019-02-28 17:43:49 +000036 with_items: "{{ npm_files_check.results }}"
37 when: item.stat.exists
Michal Ptacek80567252019-01-29 17:17:12 +000038
39- name: Patch OOM - set cert path for cloudify
40 lineinfile:
Michal Ptacek09bf8b32019-02-28 17:43:49 +000041 path: "{{ item.stat.path }}"
Michal Ptacek80567252019-01-29 17:17:12 +000042 regexp: '^(.*)CERT_PATH'
43 line: '\g<1>/etc/pki/ca-trust/source/anchors'
44 backrefs: yes
45 state: present
Michal Ptacek09bf8b32019-02-28 17:43:49 +000046 with_items: "{{ dcae_files_check.results }}"
47 when: item.stat.exists
48