Comments (3)
Hi,
We use the master_node
flag so some tasks only run against 1 node when we upgrade a RAC database. For example, this block does backups and sets cluster_database=false
so it only needs to be run once and not from each node.
https://github.com/CruGlobal/ansible-oracle-db-upgrade/blob/master/tasks/upgrade.yml#L4-L65
You can set this flag in a few different places, but we typically put it in the inventory so something like <my_inventory>/host_vars/<hostname>
.
Sorry, looks those details are missing from our readme. We'll try to get that updated or if you want to send in a PR that works too.
from ansible-oracle-db-upgrade.
Hi Mike,
Thanks for your reply appreciate it. My bad still I could not able to figure out whats going wrong. I am getting below error, could you please help me on this.
[oracle@pluto1226 ar_scripts]$ cat roles/db-upgrade/vars/main.yml
Variables for db-upgrade ansible role
oracle_stage: "{{ oracle_stage_base }}/{{ oracle_version }}_upgrade/{{ db_name }}"
oracle_sid: "{{ db_name }}{{ host_num |default('') }}"
master_node: true
cluster_database: false
oracle_version: 19.0.0
oracle_home: "/app/oracle/{{ oracle_version }}/dbhome_1"
env:
ORACLE_HOME: "{{ oracle_home }}"
ORACLE_BASE: "{{ oracle_base }}"
ORACLE_SID: "{{ oracle_sid }}"
TNS_ADMIN: "{{ tns_admin }}"
PATH: "{{ oracle_home }}/bin:{{ oracle_home }}/OPatch:$PATH:/bin:/usr/bin::/usr/ccs/bin"
oracle_version_old: 11.2.0.4
oracle_home_old: "/app/oracle/{{ oracle_version_old }}/dbhome_1"
env_old:
ORACLE_HOME: "{{ oracle_home_old }}"
ORACLE_BASE: "{{ oracle_base }}"
ORACLE_SID: "{{ oracle_sid }}"
TNS_ADMIN: "{{ tns_admin }}"
PATH: "{{ oracle_home_old }}/bin:{{ oracle_home_old }}/OPatch:$PATH:/bin:/usr/bin::/usr/ccs/bin"
[oracle@pluto1226 ar_scripts]$
Error:
TASK [Gathering Facts] ****************************************************************************
ok: [apps1159]
TASK [db-upgrade : Create a directory if it does not exist] ***************************************
ok: [apps1159]
TASK [db-upgrade : fail if required variables are not defined] ************************************
[WARNING]: when statements should not include jinja2 templating delimiters such as {{ }} or {%
%}. Found: {{ item }} is not defined
failed: [apps1159] (item=oracle_install_type) => {"changed": false, "item": "oracle_install_type", "msg": "oracle_install_type is not defined for apps1159"}
skipping: [apps1159] => (item=oracle_version)
skipping: [apps1159] => (item=db_name)
fatal: [apps1159]: FAILED! => {"msg": "The conditional check '{{ item }} is not defined' failed. The error was: error while evaluating conditional ({{ item }} is not defined): 'database_parameters' is undefined\n\nThe error appears to have been in '/home/oracle/ar_scripts/roles/db-upgrade/tasks/pre_checks.yml': line 3, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: fail if required variables are not defined\n ^ here\n"}
to retry, use: --limit @/home/oracle/ar_scripts/12c_1_pre_upgrade.retry
PLAY RECAP ****************************************************************************************
apps1159 : ok=2 changed=0 unreachable=0 failed=1
[oracle@pluto1226 ar_scripts]$
from ansible-oracle-db-upgrade.
Looks like this is due to another variable that needs to be defined - oracle_install_type
. The 2 values we use for that are si_asm
for single instance databases w/ASM and rac
for Oracle RAC databases. There are a bunch of different spots where tasks are run differently depending on if the db is si or rac. We also set some backup threading differently based on that.
Sorry again the documentation is in a poor state. Let me know if you run into any other issues.
from ansible-oracle-db-upgrade.
Related Issues (4)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ansible-oracle-db-upgrade.