From 8d4d87e907f5c20507f0935bf968a97ca1990f48 Mon Sep 17 00:00:00 2001 From: "ganesh.gurudu" Date: Tue, 15 Nov 2022 14:30:11 +0100 Subject: [PATCH 1/2] Discover Domain changes --- .../fmw_wls_domain_discover_offline.yml | 51 +++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 ansible-fmw/fmw_wls_domain_discover_offline.yml diff --git a/ansible-fmw/fmw_wls_domain_discover_offline.yml b/ansible-fmw/fmw_wls_domain_discover_offline.yml new file mode 100644 index 0000000..c05bad3 --- /dev/null +++ b/ansible-fmw/fmw_wls_domain_discover_offline.yml @@ -0,0 +1,51 @@ +--- +- name: Domain Discover using WDT + hosts: dojoserver + become: yes + become_user: "{{ WLS_USER }}" + vars_files: + - '{{ playbook_dir }}/wls_variables.yml' + vars: + run_wdt_action: "discover-domain-offline" + any_errors_fatal: true + gather_facts: true + + collections: + - zeusbaba.wdt + roles: + - wdt_discoverdomain + + + pre_tasks: + - name: ensure that relevant paths are set for bash env + blockinfile: + path: "{{ item }}" + marker: "# {mark} ANSIBLE_MANAGED envs_home" + insertafter: EOF # ".*export TBD_HOME.*\n" + block: | + export JAVA_HOME={{ JAVA_HOME }} + export PATH=$JAVA_HOME/bin:$PATH + ORACLE_HOME={{ ORACLE_HOME }} + export WDT_HOME={{ WDT_HOME }} + loop: + - "$HOME/.bashrc" + + tasks: + - name: Discover existing domain using 'WDT_discoverDomain role' + import_role: + name: wdt_discoverdomain + vars: + wdt_user: "WLS_USER" + wdt_group: "WLS_GROUP" + workdir: "/home/{{ WLS_USER }}" + java_home: "{{ JAVA_HOME }}" + mw_home: "{{ ORACLE_HOME }}" + domain_home: "{{ DOMAIN_HOME }}/{{ DOMAIN_NAME }}" + wdt_home: "{{ WDT_HOME }}" + wdt_templates_home: "{{ workdir }}/wdt-templates" + wdt_archive_file: "WDT_template-discovered_offline.zip" + wdt_template_file: "WDT_template-discovered_offline.yaml" + wdt_domain_type: "WLS" + tags: + - wdt-offline + - discover-domain \ No newline at end of file From 1f4256a20008bea1f4dca5854a993f092e5d2d0d Mon Sep 17 00:00:00 2001 From: Srikant Manche Date: Wed, 16 Nov 2022 13:56:12 +0100 Subject: [PATCH 2/2] adding WDT Action in variables --- ansible-fmw/fmw_wls_domain_wdt_update_offline_collections.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ansible-fmw/fmw_wls_domain_wdt_update_offline_collections.yml b/ansible-fmw/fmw_wls_domain_wdt_update_offline_collections.yml index 14de162..fef3f44 100644 --- a/ansible-fmw/fmw_wls_domain_wdt_update_offline_collections.yml +++ b/ansible-fmw/fmw_wls_domain_wdt_update_offline_collections.yml @@ -5,6 +5,8 @@ become_user: "{{ WLS_USER }}" vars_files: - '{{ playbook_dir }}/wls_variables.yml' + vars: + run_wdt_action: "update-domain-offline" any_errors_fatal: true gather_facts: true @@ -44,6 +46,7 @@ java_home: "{{ JAVA_HOME }}" mw_home: "{{ ORACLE_HOME }}" domain_root: "{{ DOMAIN_HOME }}" + domain_home: "{{ DOMAIN_HOME }}/{{ DOMAIN_NAME }}" tags: - wdt-offline - update-domain