summaryrefslogtreecommitdiffstats
path: root/patches/onap-patch-role
diff options
context:
space:
mode:
authorMichal Ptacek <m.ptacek@partner.samsung.com>2019-05-29 14:56:50 +0000
committerMichal Ptacek <m.ptacek@partner.samsung.com>2019-05-29 14:58:24 +0000
commitb78bbf8e835cf9bd3f1b73bea1d7d67680f451fc (patch)
tree4827619dfbb02f506d595c15ac3969f7621bab85 /patches/onap-patch-role
parent6fdcd7d9bd8b4395180d8cbd6c6aa936e50dba76 (diff)
Changing patchfile naming convention
Its not needed to preserve onap release version in patch naming. Change-Id: I8dfaa56d3a74cd5227523c3acd5e31fa540a75a2 Issue-ID: OOM-1869 Signed-off-by: Michal Ptacek <m.ptacek@partner.samsung.com>
Diffstat (limited to 'patches/onap-patch-role')
-rw-r--r--patches/onap-patch-role/tasks/main.yml36
1 files changed, 36 insertions, 0 deletions
diff --git a/patches/onap-patch-role/tasks/main.yml b/patches/onap-patch-role/tasks/main.yml
new file mode 100644
index 00000000..fb81f200
--- /dev/null
+++ b/patches/onap-patch-role/tasks/main.yml
@@ -0,0 +1,36 @@
+---
+# This role contains patching logic for OOM charts
+# and is valid until OOM-1610 is implemented
+- name: Check presence of files for NPM patching
+ stat:
+ path: "{{ app_helm_charts_infra_directory }}/{{ item }}"
+ with_items:
+ - common/dgbuilder/templates/deployment.yaml
+ register: npm_files_check
+
+- name: Check presence of files for nexus domain resolving
+ stat:
+ path: "{{ app_helm_charts_infra_directory }}/{{ item }}"
+ with_items:
+ - oof/charts/oof-cmso/charts/oof-cmso-service/resources/config/msosimulator.sh
+ register: hosts_files_check
+
+- name: Patch OOM - set npm registry
+ lineinfile:
+ path: "{{ item.stat.path }}"
+ regexp: '^(.*)NPM_REGISTRY_RECORD'
+ line: '\g<1>npm set registry "http://nexus.{{ ansible_nodename }}/repository/npm-private/";'
+ backrefs: yes
+ state: present
+ with_items: "{{ npm_files_check.results }}"
+ when: item.stat.exists
+
+- name: Patch OOM - nexus domain resolving
+ lineinfile:
+ path: "{{ item.stat.path }}"
+ regexp: '^(.*)HOSTS_FILE_RECORD'
+ line: '\g<1>{{ cluster_ip }} {{ simulated_hosts.nexus | join(" ") }} >> /etc/hosts;'
+ backrefs: yes
+ state: present
+ with_items: "{{ hosts_files_check.results }}"
+ when: item.stat.exists