Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Discover domain team2 #22

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions ansible-fmw/fmw_wls_domain_discover_offline.yml
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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