2018-02-28 Ansible Playbook for GI 12.1.0.2 Install

Overview

Following the successful creation of AUBURN as an Ansible server, I wanted to create a playbook for the installation of Grid Infrastructure (GI) 12.1.0.2 that could be used as I experimented with GI.

References

Procedure

Install Oracle Preinstallation RPM

According to step #7 of 3.3 Installing Oracle Linux with Oracle Linux Yum Server Support, I should use the following command to install the Oracle pre-installation RPM:

yum install oracle-rdbms-server-12cR1-preinstall

Create Playbook

The equivalent Ansible playbook entries are:

--- - name: Install Oracle 12.1 pre-installation RPM on REDFERN Cluster hosts: redfern1.yaocm.id.au become: true tasks: - name: Install Oracle 12.1 pre-installation RPM yum: name: oracle-rdbms-server-12cR1-preinstall state: present

This is stored in preinstall.yml.

Execute Playbook

The playbook (preinstall.yml) is executed as follows (on AUBURN:

ansible-playbook -K preinstall.yml

The output is:

SUDO password: PLAY [Install Oracle 12.1 pre-installation RPM on REDFERN Cluster] ************* TASK [Gathering Facts] ********************************************************* ok: [redfern1.yaocm.id.au] TASK [Install Oracle 12.1 pre-installation RPM] ******************************** changed: [redfern1.yaocm.id.au] PLAY RECAP ********************************************************************* redfern1.yaocm.id.au : ok=2 changed=1 unreachable=0 failed=0

Note: If the -K option is not used, then an error message similar to the following is produced:

fatal: [redfern1.yaocm.id.au]: FAILED! => {"changed": false, "module_stderr": "Shared connection to redfern1.yaocm.id.au closed.\r\n", "module_stdout": "sudo: a password is required\r\n", "msg": "MODULE FAILURE", "rc": 1}

Confirm Installation of RPM

When I run the same command again, I get the following output:

SUDO password: PLAY [Install Oracle 12.1 pre-installation RPM on REDFERN Cluster] ************* TASK [Gathering Facts] ********************************************************* ok: [redfern1.yaocm.id.au] TASK [Install Oracle 12.1 pre-installation RPM] ******************************** ok: [redfern1.yaocm.id.au] PLAY RECAP ********************************************************************* redfern1.yaocm.id.au : ok=2 changed=0 unreachable=0 failed=0