Michal Ptacek | 5a269d2 | 2019-01-28 13:03:16 +0000 | [diff] [blame] | 1 | --- |
| 2 | # This role contains patching logic for OOM charts |
| 3 | # and is valid until OOM-1610 is implemented |
Michal Ptacek | 09bf8b3 | 2019-02-28 17:43:49 +0000 | [diff] [blame] | 4 | - 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 Ptacek | 5a269d2 | 2019-01-28 13:03:16 +0000 | [diff] [blame] | 19 | - name: Patch OOM - nexus domain resolving |
| 20 | lineinfile: |
Michal Ptacek | 09bf8b3 | 2019-02-28 17:43:49 +0000 | [diff] [blame] | 21 | path: "{{ item.stat.path }}" |
Michal Ptacek | 5a269d2 | 2019-01-28 13:03:16 +0000 | [diff] [blame] | 22 | regexp: '^(.*)HOSTS_FILE_RECORD' |
| 23 | line: '\g<1>{{ cluster_ip }} {{ simulated_hosts.nexus | join(" ") }} >> /etc/hosts;' |
| 24 | backrefs: yes |
| 25 | state: present |
Michal Ptacek | 09bf8b3 | 2019-02-28 17:43:49 +0000 | [diff] [blame] | 26 | with_items: "{{ npm_files_check.results }}" |
| 27 | when: item.stat.exists |
Michal Ptacek | 5a269d2 | 2019-01-28 13:03:16 +0000 | [diff] [blame] | 28 | |
| 29 | - name: Patch OOM - set npm registry |
| 30 | lineinfile: |
Michal Ptacek | 09bf8b3 | 2019-02-28 17:43:49 +0000 | [diff] [blame] | 31 | path: "{{ item.stat.path }}" |
Michal Ptacek | 5a269d2 | 2019-01-28 13:03:16 +0000 | [diff] [blame] | 32 | 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 Ptacek | 09bf8b3 | 2019-02-28 17:43:49 +0000 | [diff] [blame] | 36 | with_items: "{{ npm_files_check.results }}" |
| 37 | when: item.stat.exists |
Michal Ptacek | 8056725 | 2019-01-29 17:17:12 +0000 | [diff] [blame] | 38 | |
| 39 | - name: Patch OOM - set cert path for cloudify |
| 40 | lineinfile: |
Michal Ptacek | 09bf8b3 | 2019-02-28 17:43:49 +0000 | [diff] [blame] | 41 | path: "{{ item.stat.path }}" |
Michal Ptacek | 8056725 | 2019-01-29 17:17:12 +0000 | [diff] [blame] | 42 | regexp: '^(.*)CERT_PATH' |
| 43 | line: '\g<1>/etc/pki/ca-trust/source/anchors' |
| 44 | backrefs: yes |
| 45 | state: present |
Michal Ptacek | 09bf8b3 | 2019-02-28 17:43:49 +0000 | [diff] [blame] | 46 | with_items: "{{ dcae_files_check.results }}" |
| 47 | when: item.stat.exists |
| 48 | |