Install Oracle 19c with Ansible
This post summarizes the steps to perform a Installation of Oracle 19c with Ansible.
Table of Contents
Our setup consists of one VirtualBox VM that is the Ansible Control Node. From this node we run the Ansible CLI command. A second VM will be the Managed Node on which the database will be installed. We will use Oracle Linux 9.5 as the Operating System of the Virtual machines. The installation steps of the two VMs is described here.
1. Installation of the Ansible Control Node
Run the following commands on the first Virtual machine as the root user to install the Ansible software on the Control Node:
# install pip and ansible
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python3 get-pip.py --user
python3 -m pip install --user ansible
# test ansible
ansible --version
# install Ansible Oracle Modules
mkdir ~/ansible; cd ~/ansible
cat >requirements.yaml<<EOF
---
collections:
- name: https://github.com/ibre5041/ansible_oracle_modules.git
type: git
version: main
EOF
ansible-galaxy collection install -r requirements.yaml
# fix an error (disable wallet authentication when connecting) in the Ansible module
sed -i 's/if auth_mode and service_name/if auth_mode and service_name and False/g' /root/.ansible/collections/ansible_collections/ibre5041/ansible_oracle_modules/plugins/module_utils/oracle_utils.py
Sample Output (click to expand):
[root@lin3 ~]# # install pip and ansible
[root@lin3 ~]# curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 2142k 100 2142k 0 0 3240k 0 --:--:-- --:--:-- --:--:-- 3235k
[root@lin3 ~]# python3 get-pip.py --user
Collecting pip
Downloading pip-26.0.1-py3-none-any.whl.metadata (4.7 kB)
Collecting wheel
Downloading wheel-0.46.3-py3-none-any.whl.metadata (2.4 kB)
Collecting packaging>=24.0 (from wheel)
Downloading packaging-26.1-py3-none-any.whl.metadata (3.5 kB)
Downloading pip-26.0.1-py3-none-any.whl (1.8 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.8/1.8 MB 9.1 MB/s 0:00:00
Downloading wheel-0.46.3-py3-none-any.whl (30 kB)
Downloading packaging-26.1-py3-none-any.whl (95 kB)
Installing collected packages: pip, packaging, wheel
Successfully installed packaging-26.1 pip-26.0.1 wheel-0.46.3
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager, possibly rendering your system unusable. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv. Use the --root-user-action option if you know what you are doing and want to suppress this warning.
[root@lin3 ~]# python3 -m pip install --user ansible
Collecting ansible
Downloading ansible-8.7.0-py3-none-any.whl.metadata (7.9 kB)
Collecting ansible-core~=2.15.7 (from ansible)
Downloading ansible_core-2.15.13-py3-none-any.whl.metadata (7.0 kB)
Collecting jinja2>=3.0.0 (from ansible-core~=2.15.7->ansible)
Downloading jinja2-3.1.6-py3-none-any.whl.metadata (2.9 kB)
Requirement already satisfied: PyYAML>=5.1 in /usr/lib64/python3.9/site-packages (from ansible-core~=2.15.7->ansible) (5.4.1)
Requirement already satisfied: cryptography in /usr/lib64/python3.9/site-packages (from ansible-core~=2.15.7->ansible) (36.0.1)
Requirement already satisfied: packaging in ./.local/lib/python3.9/site-packages (from ansible-core~=2.15.7->ansible) (26.1)
Collecting resolvelib<1.1.0,>=0.5.3 (from ansible-core~=2.15.7->ansible)
Downloading resolvelib-1.0.1-py2.py3-none-any.whl.metadata (4.0 kB)
Collecting importlib-resources<5.1,>=5.0 (from ansible-core~=2.15.7->ansible)
Downloading importlib_resources-5.0.7-py3-none-any.whl.metadata (2.8 kB)
Collecting MarkupSafe>=2.0 (from jinja2>=3.0.0->ansible-core~=2.15.7->ansible)
Downloading markupsafe-3.0.3-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.metadata (2.7 kB)
Requirement already satisfied: cffi>=1.12 in /usr/lib64/python3.9/site-packages (from cryptography->ansible-core~=2.15.7->ansible) (1.14.5)
Requirement already satisfied: pycparser in /usr/lib/python3.9/site-packages (from cffi>=1.12->cryptography->ansible-core~=2.15.7->ansible) (2.20)
Requirement already satisfied: ply==3.11 in /usr/lib/python3.9/site-packages (from pycparser->cffi>=1.12->cryptography->ansible-core~=2.15.7->ansible) (3.11)
Downloading ansible-8.7.0-py3-none-any.whl (48.4 MB)
━━╸━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.4/48.4 MB 5.8 MB/s eta 0:00:08echo ''|ssh-keygen -q -t rsa -b 3072 -m PEM -N ''
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 48.4/48.4 MB 10.7 MB/s 0:00:04
Downloading ansible_core-2.15.13-py3-none-any.whl (2.3 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.3/2.3 MB 11.4 MB/s 0:00:00
Downloading importlib_resources-5.0.7-py3-none-any.whl (24 kB)
Downloading resolvelib-1.0.1-py2.py3-none-any.whl (17 kB)
Downloading jinja2-3.1.6-py3-none-any.whl (134 kB)
Downloading markupsafe-3.0.3-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (20 kB)
Installing collected packages: resolvelib, MarkupSafe, importlib-resources, jinja2, ansible-core, ansible
Successfully installed MarkupSafe-3.0.3 ansible-8.7.0 ansible-core-2.15.13 importlib-resources-5.0.7 jinja2-3.1.6 resolvelib-1.0.1
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager, possibly rendering your system unusable. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv. Use the --root-user-action option if you know what you are doing and want to suppress this warning.
[root@lin3 ~]# # test ansible
[root@lin3 ~]# ansible --version
ansible [core 2.15.13]
config file = None
configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /root/.local/lib/python3.9/site-packages/ansible
ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections
executable location = /root/.local/bin/ansible
python version = 3.9.25 (main, Apr 7 2026, 00:00:00) [GCC 11.5.0 20240719 (Red Hat 11.5.0-11.0.2)] (/usr/bin/python3)
jinja version = 3.1.6
libyaml = True
[root@lin3 ~]# # install Ansible Oracle Modules
[root@lin3 ~]# mkdir ~/ansible; cd ~/ansible
[root@lin3 ansible]# cat >requirements.yaml<<EOF
> ---
> collections:
> - name: https://github.com/ibre5041/ansible_oracle_modules.git
> type: git
> version: main
> EOF
[root@lin3 ansible]# ansible-galaxy collection install -r requirements.yaml
Starting galaxy collection install process
Process install dependency map
Cloning into '/root/.ansible/tmp/ansible-local-5517p6ntb7wo/tmpafvakvke/ansible_oracle_modulesyxktbkp6'...
remote: Enumerating objects: 5526, done.
remote: Counting objects: 100% (659/659), done.
remote: Compressing objects: 100% (216/216), done.
remote: Total 5526 (delta 520), reused 443 (delta 443), pack-reused 4867 (from 2)
Receiving objects: 100% (5526/5526), 1.42 MiB | 6.69 MiB/s, done.
Resolving deltas: 100% (3732/3732), done.
Already on 'main'
Your branch is up to date with 'origin/main'.
Starting collection install process
Installing 'ibre5041.ansible_oracle_modules:3.3.0' to '/root/.ansible/collections/ansible_collections/ibre5041/ansible_oracle_modules'
Created collection for ibre5041.ansible_oracle_modules:3.3.0 at /root/.ansible/collections/ansible_collections/ibre5041/ansible_oracle_modules
ibre5041.ansible_oracle_modules:3.3.0 was installed successfully
[root@lin3 ansible]# # fix an error (disable wallet authentication when connecting) in the Ansible module
[root@lin3 ansible]# sed -i 's/if auth_mode and service_name/if auth_mode and service_name and False/g' /root/.ansible/collections/ansible_collections/ibre5041/ansible_oracle_modules/plugins/module_utils/oracle_utils.py
[root@lin3 ansible]#
2. Configure passwordless ssh access to the Managed Node
run this on both nodes as root to create the ssh keys:
echo ''|ssh-keygen -q -t rsa -b 3072 -m PEM -N ''
run this as root only on the Control Node:
(# configure passwordless ssh login for root
pnode=`hostname|awk -F. {'print $1'}`
echo -n 'Enter the hostname of the Managed Node (e.g. lin2): ' && read snode
# for root
ssh-keyscan -t ecdsa $snode >> ~/.ssh/known_hosts
sshpass -p changeme ssh-copy-id $snode
# test passwordless access
ssh $snode date
)
3. Configuration of the Control Node
# configure the Ansible Inventory (list of managed nodes)
cat >inventory.yaml<<EOF
myhostgroup:
hosts:
lin4: null
EOF
# configure the Ansible Playbook for the Oracle Database Installation on the Managed Node
cat >install_oracle1927.yaml<<EOF
---
- hosts: myhostgroup
collections:
- ibre5041.ansible_oracle_modules
become: yes
become_user: root
become_method: sudo
vars:
oracle_install_dir_temp: '/u01/tmp'
sys_password: 'changeme'
tasks:
- name: Configure base Oracle VirtualBox
ansible.builtin.include_role:
name: ibre5041.ansible_oracle_modules.base_oracle_vbox
vars:
oracle_install_dir_root: /u01
oracle_os_groups:
- group: oinstall
gid: 800
- group: dba
gid: 801
- group: oper
gid: 802
- group: asmadmin
gid: 803
- group: asmdba
gid: 804
- group: asmoper
gid: 805
- group: vboxsf
gid: 984
oracle_vg: rootvg
oracle_create_vg: false
oracle_create_swap: false
tags: [baseoracle]
- name: Extract Oracle 19.27 from zip file
ansible.builtin.unarchive:
src: /sw/oracle/db/19c_linux/p37757478_1927000DBRU_Linux-x86-64.zip
dest: /home/oracle
remote_src: yes
creates: '/home/oracle/db-klone-Linux-x86-64-19000250415.zip'
include:
- 'db-klone-Linux-x86-64-19000250415.zip'
owner: oracle
group: oinstall
mode: '0644'
- name: Install Oracle DB home
ansible.builtin.include_role:
name: oracle_db_home
vars:
oracle_install_dir_root: /u01
oracle_db_media: 'db-klone-Linux-x86-64-19000250415.zip'
oracle_dir_base: '/home/oracle'
oracle_release: 19c
tags: [oracle, oracledbhome]
- name: Install python3-pip
ansible.builtin.dnf:
name: python3-pip
state: present
become: yes
- name: Install oracledb python module and other utilities
ansible.builtin.include_role:
name: ibre5041.ansible_oracle_modules.oracle_post_install
tags: [ oraclepost ]
- name: Create database
oracle_db:
oracle_home: '/u01/product/19.17.0.0'
db_name: 'ORCL'
db_unique_name: 'ORCL'
sys_password: '{{ sys_password }}'
db_options:
JSERVER: true
ORACLE_TEXT: false
IMEDIA: false
CWMLITE: false
SPATIAL: false
OMS: false
APEX: false
DV: false
initparams:
memory_target: 0
memory_max_target: 0
sga_target: 1500MB
sga_max_size: 1500MB
storage_type: FS
datafile_dest: '/u01/oradata'
state: present
become_user: oracle
become: yes
tags: [oracle, oracledb]
EOF
4. Running the Ansible Playbook
Finally we will start the Installation of the Managed Node by running the following command on the Control Node. The installation will take around 20 minutes.
ansible-playbook -i inventory.yaml install_oracle1927.yaml
Sample Output (click to expand):
[root@lin3 ansible]# ansible-playbook -i inventory.yaml install_oracle1927.yaml
PLAY [myhostgroup] *************************************************************************************************************************************
TASK [Gathering Facts] *********************************************************************************************************************************
[WARNING]: Platform linux on host lin4 is using the discovered Python interpreter at /usr/bin/python3.9, but future installation of another Python
interpreter could change the meaning of that path. See https://docs.ansible.com/ansible-core/2.15/reference_appendices/interpreter_discovery.html for
more information.
ok: [lin4]
TASK [Configure base Oracle VirtualBox] ****************************************************************************************************************
[DEPRECATION WARNING]: "include" is deprecated, use include_tasks/import_tasks instead. See https://docs.ansible.com/ansible-
core/2.15/user_guide/playbooks_reuse_includes.html for details. This feature will be removed in version 2.16. Deprecation warnings can be disabled by
setting deprecation_warnings=False in ansible.cfg.
TASK [ibre5041.ansible_oracle_modules.default_vars_only : virt-what] ***********************************************************************************
ok: [lin4]
TASK [ibre5041.ansible_oracle_modules.default_vars_only : Check if inside AWS.] ************************************************************************
ok: [lin4]
TASK [ibre5041.ansible_oracle_modules.default_vars_only : set_fact is_aws_environment: False] **********************************************************
ok: [lin4]
TASK [ibre5041.ansible_oracle_modules.default_vars_only : Check if inside VMware] **********************************************************************
ok: [lin4]
TASK [ibre5041.ansible_oracle_modules.default_vars_only : set_fact is_vmware_environment: False] *******************************************************
ok: [lin4]
TASK [ibre5041.ansible_oracle_modules.default_vars_only : Check if inside VirtualBox] ******************************************************************
ok: [lin4]
TASK [ibre5041.ansible_oracle_modules.default_vars_only : set_fact is_vbox_environment: True] **********************************************************
ok: [lin4]
TASK [ibre5041.ansible_oracle_modules.base_oracle_vbox : debug] ****************************************************************************************
ok: [lin4] => {
"ansible_memory_mb": {
"nocache": {
"free": 6895,
"used": 588
},
"real": {
"free": 6371,
"total": 7483,
"used": 1112
},
"swap": {
"cached": 0,
"free": 1023,
"total": 1023,
"used": 0
}
}
}
TASK [ibre5041.ansible_oracle_modules.base_oracle_vbox : debug] ****************************************************************************************
ok: [lin4] => {
"msg": "total RAM is 7483 required 4096M "
}
TASK [ibre5041.ansible_oracle_modules.base_oracle_vbox : fail] *****************************************************************************************
skipping: [lin4]
TASK [ibre5041.ansible_oracle_modules.base_oracle_vbox : debug] ****************************************************************************************
ok: [lin4] => {
"msg": "MEM 7846494208"
}
TASK [ibre5041.ansible_oracle_modules.base_oracle_vbox : debug] ****************************************************************************************
ok: [lin4] => {
"msg": "SHMA 1915648"
}
TASK [ibre5041.ansible_oracle_modules.base_oracle_vbox : debug] ****************************************************************************************
ok: [lin4] => {
"msg": "SHMM 6277195366"
}
TASK [ibre5041.ansible_oracle_modules.base_oracle_vbox : System details] *******************************************************************************
ok: [lin4] => (item=OracleLinux) => {
"msg": "OracleLinux"
}
ok: [lin4] => (item=9.7) => {
"msg": "9.7"
}
ok: [lin4] => (item=9) => {
"msg": "9"
}
TASK [ibre5041.ansible_oracle_modules.base_oracle_vbox : Kernel parameters for Oracle] *****************************************************************
changed: [lin4] => (item={'sysctl': 'kernel.shmmni', 'value': '4096'})
changed: [lin4] => (item={'sysctl': 'kernel.sem', 'value': '1010 129280 1010 128'})
changed: [lin4] => (item={'sysctl': 'fs.file-max', 'value': '6815744'})
changed: [lin4] => (item={'sysctl': 'net.ipv4.ip_local_port_range', 'value': '9000 65501'})
changed: [lin4] => (item={'sysctl': 'net.core.rmem_default', 'value': '262144'})
changed: [lin4] => (item={'sysctl': 'net.core.rmem_max', 'value': '4194304'})
changed: [lin4] => (item={'sysctl': 'net.core.wmem_default', 'value': '262144'})
changed: [lin4] => (item={'sysctl': 'net.core.wmem_max', 'value': '1048576'})
changed: [lin4] => (item={'sysctl': 'fs.aio-max-nr', 'value': '4194304'})
changed: [lin4] => (item={'sysctl': 'kernel.panic_on_oops', 'value': '1'})
changed: [lin4] => (item={'sysctl': 'kernel.panic', 'value': '1'})
changed: [lin4] => (item={'sysctl': 'kernel.shmall', 'value': '1915648'})
changed: [lin4] => (item={'sysctl': 'kernel.shmmax', 'value': '6277195366'})
changed: [lin4] => (item={'sysctl': 'vm.swappiness', 'value': '1'})
changed: [lin4] => (item={'sysctl': 'vm.dirty_background_ratio', 'value': '3'})
changed: [lin4] => (item={'sysctl': 'vm.dirty_ratio', 'value': '80'})
changed: [lin4] => (item={'sysctl': 'vm.dirty_expire_centisecs', 'value': '500'})
changed: [lin4] => (item={'sysctl': 'vm.dirty_writeback_centisecs', 'value': '100'})
TASK [ibre5041.ansible_oracle_modules.base_oracle_vbox : tuned oracle dir] *****************************************************************************
changed: [lin4]
TASK [ibre5041.ansible_oracle_modules.base_oracle_vbox : tuned.conf] ***********************************************************************************
changed: [lin4]
TASK [ibre5041.ansible_oracle_modules.base_oracle_vbox : Ensure Oracle required .rpms are installed: glibc-devel libstdc++-devel libaio-devel libXtst perl-Data-Dumper unzip libXrender bc net-tools make gcc gdb lsof strace ksh smartmontools virt-what patch] ***
ok: [lin4]
TASK [ibre5041.ansible_oracle_modules.base_oracle_vbox : Stop firewall] ********************************************************************************
ok: [lin4]
TASK [ibre5041.ansible_oracle_modules.base_oracle_vbox : Ensure Oracle required OS groups exist] *******************************************************
changed: [lin4] => (item={'group': 'oinstall', 'gid': 800})
changed: [lin4] => (item={'group': 'dba', 'gid': 801})
changed: [lin4] => (item={'group': 'oper', 'gid': 802})
changed: [lin4] => (item={'group': 'asmadmin', 'gid': 803})
changed: [lin4] => (item={'group': 'asmdba', 'gid': 804})
changed: [lin4] => (item={'group': 'asmoper', 'gid': 805})
ok: [lin4] => (item={'group': 'vboxsf', 'gid': 984})
TASK [ibre5041.ansible_oracle_modules.base_oracle_vbox : Add the user "oracle"] ************************************************************************
changed: [lin4]
TASK [ibre5041.ansible_oracle_modules.base_oracle_vbox : Oracle sudo] **********************************************************************************
changed: [lin4]
TASK [ibre5041.ansible_oracle_modules.base_oracle_vbox : Limits] ***************************************************************************************
changed: [lin4]
TASK [ibre5041.ansible_oracle_modules.base_oracle_vbox : Create a logical volume u01] ******************************************************************
skipping: [lin4]
TASK [ibre5041.ansible_oracle_modules.base_oracle_vbox : Create filesystem on /dev/rootvg/u01] *********************************************************
skipping: [lin4]
TASK [ibre5041.ansible_oracle_modules.base_oracle_vbox : Mount filesystem on /dev/vg01/u01] ************************************************************
skipping: [lin4]
TASK [ibre5041.ansible_oracle_modules.base_oracle_vbox : Create u01 sub-directory (mkdir -p)] **********************************************************
changed: [lin4] => (item=/u01)
changed: [lin4] => (item=/u01/base)
changed: [lin4] => (item=/u01/tmp)
changed: [lin4] => (item=/u01/product)
changed: [lin4] => (item=/u01/oraInventory)
TASK [ibre5041.ansible_oracle_modules.base_oracle_vbox : Change permissions on u01 sub-directory] ******************************************************
changed: [lin4] => (item=/u01)
changed: [lin4] => (item=/u01/base)
changed: [lin4] => (item=/u01/tmp)
changed: [lin4] => (item=/u01/product)
changed: [lin4] => (item=/u01/oraInventory)
TASK [ibre5041.ansible_oracle_modules.base_oracle_vbox : Extend the u01 mountpoint] ********************************************************************
skipping: [lin4]
TASK [Extract Oracle 19.27 from zip file] **************************************************************************************************************
changed: [lin4]
TASK [Install Oracle DB home] **************************************************************************************************************************
TASK [ibre5041.ansible_oracle_modules.oracle_db_home : oracle_oh_response_file] ************************************************************************
ok: [lin4] => {
"oracle_oh_response_file": "db.no.comments.19c.rsp"
}
TASK [ibre5041.ansible_oracle_modules.oracle_db_home : delete response file] ***************************************************************************
ok: [lin4]
TASK [ibre5041.ansible_oracle_modules.oracle_db_home : check if oracle home installed] *****************************************************************
ok: [lin4]
TASK [ibre5041.ansible_oracle_modules.oracle_db_home : debug] ******************************************************************************************
ok: [lin4] => {
"msg": "Oracle home installed: False"
}
TASK [ibre5041.ansible_oracle_modules.oracle_db_home : check if install package exists] ****************************************************************
ok: [lin4]
TASK [ibre5041.ansible_oracle_modules.oracle_db_home : debug] ******************************************************************************************
ok: [lin4] => {
"msg": "Install package exists: False"
}
TASK [ibre5041.ansible_oracle_modules.oracle_db_home : Directory /u01/product/19.17.0.0] ***************************************************************
changed: [lin4]
TASK [Include Role oracle.download.package] ************************************************************************************************************
TASK [ibre5041.ansible_oracle_modules.oracle_download_package : Download install package db-klone-Linux-x86-64-19000250415.zip] ************************
skipping: [lin4]
TASK [ibre5041.ansible_oracle_modules.oracle_download_package : unzip install package db-klone-Linux-x86-64-19000250415.zip] ***************************
skipping: [lin4]
TASK [ibre5041.ansible_oracle_modules.oracle_download_package : delete install .zip package db-klone-Linux-x86-64-19000250415.zip] *********************
skipping: [lin4]
TASK [ibre5041.ansible_oracle_modules.oracle_download_package : Copy install package db-klone-Linux-x86-64-19000250415.zip] ****************************
[WARNING]: Module remote_tmp /home/oracle/.ansible/tmp did not exist and was created with a mode of 0700, this may cause issues when running as another
user. To avoid this, create the remote_tmp dir with the correct permissions manually
changed: [lin4]
TASK [ibre5041.ansible_oracle_modules.oracle_download_package : unzip install package db-klone-Linux-x86-64-19000250415.zip] ***************************
changed: [lin4]
TASK [ibre5041.ansible_oracle_modules.oracle_download_package : delete install .zip package db-klone-Linux-x86-64-19000250415.zip] *********************
changed: [lin4]
TASK [ibre5041.ansible_oracle_modules.oracle_db_home : install db.rsp] *********************************************************************************
changed: [lin4]
TASK [ibre5041.ansible_oracle_modules.oracle_db_home : Uncomment .rsp parameter oracle.install.db.CLUSTER_NODES (for RAC)] *****************************
changed: [lin4]
TASK [ibre5041.ansible_oracle_modules.oracle_db_home : shell] ******************************************************************************************
changed: [lin4]
TASK [ibre5041.ansible_oracle_modules.oracle_db_home : debug] ******************************************************************************************
ok: [lin4] => {
"msg": "Return code is {'changed': True, 'stdout': 'Launching Oracle Database Setup Wizard...\\n\\n[WARNING] [INS-13014] Target environment does not meet some optional requirements.\\n CAUSE: Some of the optional prerequisites are not met. See logs for details. installActions2026-04-15_03-52-24PM.log\\n ACTION: Identify the list of failed prerequisite checks from the log: installActions2026-04-15_03-52-24PM.log. Then either from the log file or from installation manual find the appropriate configuration to meet the prerequisites and fix it manually.\\nThe response file for this session can be found at:\\n /u01/product/19.17.0.0/install/response/db_2026-04-15_03-52-24PM.rsp\\n\\nYou can find the log of this install session at:\\n /tmp/InstallActions2026-04-15_03-52-24PM/installActions2026-04-15_03-52-24PM.log\\n\\nAs a root user, execute the following script(s):\\n\\t1. /u01/oraInventory/orainstRoot.sh\\n\\t2. /u01/product/19.17.0.0/root.sh\\n\\nExecute /u01/oraInventory/orainstRoot.sh on the following nodes: \\n[lin4]\\nExecute /u01/product/19.17.0.0/root.sh on the following nodes: \\n[lin4]\\n\\n\\nSuccessfully Setup Software with warning(s).\\nMoved the install session logs to:\\n /u01/oraInventory/logs/InstallActions2026-04-15_03-52-24PM', 'stderr': '', 'rc': 6, 'cmd': './runInstaller -responseFile /u01/tmp/db.no.comments.19c.rsp -silent -ignorePrereqFailure ORACLE_HOME_NAME=DB191700', 'start': '2026-04-15 15:52:24.149531', 'end': '2026-04-15 15:54:00.553170', 'delta': '0:01:36.403639', 'failed': False, 'msg': 'non-zero return code', 'stdout_lines': ['Launching Oracle Database Setup Wizard...', '', '[WARNING] [INS-13014] Target environment does not meet some optional requirements.', ' CAUSE: Some of the optional prerequisites are not met. See logs for details. installActions2026-04-15_03-52-24PM.log', ' ACTION: Identify the list of failed prerequisite checks from the log: installActions2026-04-15_03-52-24PM.log. Then either from the log file or from installation manual find the appropriate configuration to meet the prerequisites and fix it manually.', 'The response file for this session can be found at:', ' /u01/product/19.17.0.0/install/response/db_2026-04-15_03-52-24PM.rsp', '', 'You can find the log of this install session at:', ' /tmp/InstallActions2026-04-15_03-52-24PM/installActions2026-04-15_03-52-24PM.log', '', 'As a root user, execute the following script(s):', '\\t1. /u01/oraInventory/orainstRoot.sh', '\\t2. /u01/product/19.17.0.0/root.sh', '', 'Execute /u01/oraInventory/orainstRoot.sh on the following nodes: ', '[lin4]', 'Execute /u01/product/19.17.0.0/root.sh on the following nodes: ', '[lin4]', '', '', 'Successfully Setup Software with warning(s).', 'Moved the install session logs to:', ' /u01/oraInventory/logs/InstallActions2026-04-15_03-52-24PM'], 'stderr_lines': [], 'failed_when_result': False}"
}
TASK [ibre5041.ansible_oracle_modules.oracle_db_home : delete install db.no.comments.19c.rsp] **********************************************************
changed: [lin4]
TASK [ibre5041.ansible_oracle_modules.oracle_db_home : Check ownership of /u01/product/19.17.0.0/bin/extjob] *******************************************
ok: [lin4]
TASK [ibre5041.ansible_oracle_modules.oracle_db_home : extjob_permissions] *****************************************************************************
ok: [lin4] => {
"extjob_permissions": {
"changed": false,
"failed": false,
"stat": {
"atime": 1776261184.3690825,
"attr_flags": "e",
"attributes": [
"extents"
],
"block_size": 4096,
"blocks": 5936,
"charset": "binary",
"checksum": "aa3810de9f3415abf766cfed6df7ac1a0b3d664a",
"ctime": 1776261184.3810825,
"dev": 2049,
"device_type": 0,
"executable": true,
"exists": true,
"gid": 800,
"gr_name": "oinstall",
"inode": 2637883,
"isblk": false,
"ischr": false,
"isdir": false,
"isfifo": false,
"isgid": false,
"islnk": false,
"isreg": true,
"issock": false,
"isuid": false,
"mimetype": "application/x-executable",
"mode": "0755",
"mtime": 1776261184.3750825,
"nlink": 1,
"path": "/u01/product/19.17.0.0/bin/extjob",
"pw_name": "oracle",
"readable": true,
"rgrp": true,
"roth": true,
"rusr": true,
"size": 3035968,
"uid": 800,
"version": "1285920857",
"wgrp": false,
"woth": false,
"writeable": true,
"wusr": true,
"xgrp": true,
"xoth": true,
"xusr": true
}
}
}
TASK [ibre5041.ansible_oracle_modules.oracle_db_home : db root.sh] *************************************************************************************
changed: [lin4]
TASK [Install python3-pip] *****************************************************************************************************************************
changed: [lin4]
TASK [Install oracledb python module and other utilities] **********************************************************************************************
TASK [ibre5041.ansible_oracle_modules.oracle_post_install : Python oracledb platform drivers] **********************************************************
changed: [lin4]
TASK [ibre5041.ansible_oracle_modules.oracle_post_install : Python oracledb drivers] *******************************************************************
ok: [lin4]
TASK [ibre5041.ansible_oracle_modules.oracle_post_install : Oracles bash_profile] **********************************************************************
changed: [lin4]
TASK [ibre5041.ansible_oracle_modules.oracle_post_install : Oracles bash_profile helper script] ********************************************************
changed: [lin4]
TASK [ibre5041.ansible_oracle_modules.oracle_post_install : mkdir -p ~/dbadm/ directory] ***************************************************************
changed: [lin4] => (item=/home/oracle/dbadm/)
changed: [lin4] => (item=/home/oracle/dbadm/share/)
changed: [lin4] => (item=/home/oracle/dbadm/bin/)
TASK [ibre5041.ansible_oracle_modules.oracle_post_install : Oracles bash_profile helper script] ********************************************************
changed: [lin4] => (item=login.sql)
changed: [lin4] => (item=sqlplus.dict)
TASK [ibre5041.ansible_oracle_modules.oracle_post_install : Install Epel package rlwrap] ***************************************************************
changed: [lin4]
TASK [ibre5041.ansible_oracle_modules.oracle_post_install : Delete all files in: /u01/tmp] *************************************************************
ok: [lin4]
TASK [Create database] *********************************************************************************************************************************
[WARNING]: command: /u01/product/19.17.0.0/bin/dbca -createDatabase -silent -templateName "General_Purpose.dbc" -dbOptions
JSERVER:true,ORACLE_TEXT:false,IMEDIA:false,CWMLITE:false,SPATIAL:false,OMS:false,APEX:false,DV:false -createAsContainerDatabase false
-datafileDestination /u01/oradata -storageType FS -useOMF true -characterSet AL32UTF8 -databaseType MULTIPURPOSE -memoryMgmtType AUTO_SGA
-gdbName ORCL -sysPassword "********" -systemPassword "********" -dbsnmpPassword "********" -initParams
db_name=ORCL,db_unique_name=ORCL,memory_target=0,memory_max_target=0,sga_target=1500MB,sga_max_size=1500MB
[WARNING]: STDOUT: [WARNING] [DBT-06208] The 'SYS' password entered does not conform to the Oracle recommended standards. CAUSE: a. Oracle
recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1
digit [0-9]. b.The password entered is a keyword that Oracle does not recommend to be used as password ACTION: Specify a strong password. If
required refer Oracle documentation for guidelines. [WARNING] [DBT-06208] The 'SYSTEM' password entered does not conform to the Oracle recommended
standards. CAUSE: a. Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character,
1 lower case character and 1 digit [0-9]. b.The password entered is a keyword that Oracle does not recommend to be used as password ACTION: Specify
a strong password. If required refer Oracle documentation for guidelines. Prepare for db operation 10% complete Copying database files 40% complete
Creating and starting Oracle instance 42% complete 46% complete 50% complete 54% complete 60% complete Completing Database Creation 66% complete 69%
complete 70% complete Executing Post Configuration Actions 100% complete Database creation complete. For details check the logfiles at:
/u01/base/cfgtoollogs/dbca/ORCL. Database Information: Global Database Name:ORCL System Identifier(SID):ORCL Look at the log file
"/u01/base/cfgtoollogs/dbca/ORCL/ORCL.log" for further details. , STDERR: COMMAND: /u01/product/19.17.0.0/bin/dbca -createDatabase -silent
-templateName "General_Purpose.dbc" -dbOptions JSERVER:true,ORACLE_TEXT:false,IMEDIA:false,CWMLITE:false,SPATIAL:false,OMS:false,APEX:false,DV:false
-createAsContainerDatabase false -datafileDestination /u01/oradata -storageType FS -useOMF true -characterSet AL32UTF8 -databaseType MULTIPURPOSE
-memoryMgmtType AUTO_SGA -gdbName ORCL -sysPassword "********" -systemPassword "********" -dbsnmpPassword "********" -initParams
db_name=ORCL,db_unique_name=ORCL,memory_target=0,memory_max_target=0,sga_target=1500MB,sga_max_size=1500MB
changed: [lin4]
PLAY RECAP *********************************************************************************************************************************************
lin4 : ok=54 changed=27 unreachable=0 failed=0 skipped=8 rescued=0 ignored=0
[root@lin3 ansible]#
5. Test the access to the new Oracle Database
After the installation has finished we can test the access to the database:
# run as root on the managed node
# type exit to logout from sqlplus
su - oracle -c "sqlplus / as sysdba"
Sample Output (click to expand):
root@lin4 ~]# su - oracle -c "sqlplus / as sysdba"
Oracle Database List
********************
p=======================================================================================q
| No Type ORACLE_SID Version Status |
|---------------------------------------------------------------------------------------|
| 1 ORCL 19.27.0.0.250415 Up (OPEN) 0:24:08 |
b=======================================================================================d
Found only one instance. Loading environment...
Oracle Database 19c Enterprise Edition Version -- Up (OPEN) 0:24:09 -- SGA/PGA(1504M/1492M)
ORACLE_SID=ORCL
ORACLE_HOME=/u01/product/19.17.0.0
PATH=/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/u01/product/19.17.0.0/bin
ALERT_LOG=/u01/base/diag/rdbms/orcl/ORCL/trace/alert_ORCL.log
DBID
SQL*Plus: Release 19.0.0.0.0 - Production on Wed Apr 15 16:40:44 2026
Version 19.27.0.0.0
Copyright (c) 1982, 2024, Oracle. All rights reserved.
Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.27.0.0.0
SQL> select status from v$instance;
STATUS
------------
OPEN
SQL> exit
Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.27.0.0.0
Goodbye.
[root@lin4 ~]#
Useful Ansible Commands
| Command | Description |
|---|---|
ansible-inventory -i inventory.yaml --graph | Verify the inventory and show all Managed Nodes |
ansible -m ping -i inventory.yaml myhostgroup | Test the connection to the Managed Nodes (ping) |
ansible-playbook -i inventory.yaml install_oracle1927.yaml -vvvv | Run in very verbose mode |
ansible-playbook -i inventory.yaml install_oracle1927.yaml --start-at-task="Create database" | Start Playbook at a specific task |
ansible-doc -t module ibre5041.ansible_oracle_modules.oracle_db | Show the documentation of a Ansible Module |
ansible-playbook -i inventory.yaml install_oracle1927.yaml --step | Step through each task of a Playbook |

Leave a Reply