2018-03-01 Ansible Playbook for Oracle Directories

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.

The previous procedure created an Ansible playbook that installed the Oracle pre-installation RPM. In this procedure, I want to complete the set-up of the Oracle user.

References

Procedure

Create Directories

Following the suggestions made in 6.1.6 Creating the Oracle Home and Oracle Base Directory, I created a new playbook called install-dir.yml with the following entries:

--- - name: Prepare REDFERN Cluster for Oracle GI 12.1 installation (Installation Directories) hosts: redfern1.yaocm.id.au become: true tasks: - name: Creating the Oracle Home and Oracle Base Directory file: path: /opt/{{ item }} owner: oracle group: oinstall mode: 0755 state: directory recurse: yes with_items: - app/12.1.0/grid - app/grid - app/oracle

On AUBURN, I executed the playbook as follows:

ansible-playbook -K install-dir.yml

The output was:

SUDO password: PLAY [Prepare REDFERN Cluster for Oracle GI 12.1 installation (Installation Directories)] *** TASK [Gathering Facts] ********************************************************* ok: [redfern1.yaocm.id.au] TASK [Creating the Oracle Home and Oracle Base Directory] ********************** changed: [redfern1.yaocm.id.au] => (item=app/12.1.0/grid) changed: [redfern1.yaocm.id.au] => (item=app/grid) changed: [redfern1.yaocm.id.au] => (item=app/oracle) PLAY RECAP ********************************************************************* redfern1.yaocm.id.au : ok=2 changed=1 unreachable=0 failed=0

To verify this, I executed the following command on REDFERN1:

ls -lR /opt/app

The output was:

/opt/app: total 0 drwxr-xr-x. 3 oracle oinstall 18 Mar 1 23:11 12.1.0 drwxr-xr-x. 2 oracle oinstall 6 Mar 1 23:11 grid drwxr-xr-x. 2 oracle oinstall 6 Mar 1 23:11 oracle /opt/app/12.1.0: total 0 drwxr-xr-x. 2 oracle oinstall 6 Mar 1 23:11 grid /opt/app/12.1.0/grid: total 0 /opt/app/grid: total 0 /opt/app/oracle: total 0

Apart from the incorrect modification dates (the time is correct), the directory settings appear to be correct.