lean-delivery / ansible-role-oracle-db

Apache License 2.0
20 stars 13 forks source link

Cannot install 12.1.0.2 after installing 11.2.0.4 #15

Open Ranzo3 opened 4 years ago

Ranzo3 commented 4 years ago
SUMMARY

11.2.0.4 was successful, but when attempting to install second home 12.1.0.2 it doesn't do anything.

ISSUE TYPE
COMPONENT NAME
ansible 2.9.6
  config file = /Users/ranzo.taylor/.ansible.cfg
  configured module search path = [u'/Users/ranzo.taylor/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /Users/ranzo.taylor/Library/Python/2.7/lib/python/site-packages/ansible
  executable location = /Users/ranzo.taylor/Library/Python/2.7/bin/ansible
  python version = 2.7.16 (default, Jul  5 2020, 02:24:03) [GCC 4.2.1 Compatible Apple LLVM 11.0.3 (clang-1103.0.29.21) (-macos10.15-objc-
CONFIGURATION

DEFAULT_HOST_LIST(/Users/ranzo.taylor/.ansible.cfg) = [u'/Users/ranzo.taylor/ansible/hosts'] DEFAULT_REMOTE_USER(/Users/ranzo.taylor/.ansible.cfg) = centos

OS / ENVIRONMENT

Using MAC OS 10.15.6 (Catalina) Managing CentOS 7

STEPS TO REPRODUCE
Install 11.2.0.4 successfully, then try 12.1.0.2

RanzoTaylorsMBP:ansible ranzo.taylor$ cat oracle-s3-11204.yaml 
---
- name: Install oracle db
  hosts: all
  roles:
    - role: lean_delivery.oracle_db
      oracle_version: 11
      patch_version: 11.2.0.4
      transport: web
      # transport_local: /Users/ranzo.taylor/Downloads/11.2.0.4
      transport_web: http://swoosh-oracle-software-bucket.s3-us-west-2.amazonaws.com
      oracle_images:
        - p13390677_112040_Linux-x86-64_1of7.zip
        - p13390677_112040_Linux-x86-64_2of7.zip
        - p13390677_112040_Linux-x86-64_3of7.zip
        - p13390677_112040_Linux-x86-64_4of7.zip
        - p13390677_112040_Linux-x86-64_5of7.zip
        - p13390677_112040_Linux-x86-64_6of7.zip
        - p13390677_112040_Linux-x86-64_7of7.zip
      unqname: orcl112
      sid : orcl112
      syspass: delphix
      syspassword: delphix
      systempassword: delphix
      sysmanpassword: delphix
      dbsnmppassword: delphix
      db_user_password: delphix
      oracle_base: /opt/app/oracle/product
      oracle_db_swapfile: /opt/app/oracle/oracle-swapfile-11204
      oracle_db_swap_count: 2048

RanzoTaylorsMBP:ansible ranzo.taylor$ cat oracle-s3-12102.yaml 
---
- name: Install oracle db
  hosts: all
  roles:
    - role: lean_delivery.oracle_db
      oracle_version: 12
      patch_version: 12.1.0.2
      transport: web
      # transport_local: /Users/ranzo.taylor/Downloads/11.2.0.4
      transport_web: http://swoosh-oracle-software-bucket.s3-us-west-2.amazonaws.com
      oracle_images:
        - linuxamd64_12102_database_1of2.zip
        - linuxamd64_12102_database_2of2.zip
      unqname: orcl121
      sid: orcl121
      syspass: delphix
      syspassword: delphix
      systempassword: delphix
      sysmanpassword: delphix
      dbsnmppassword: delphix
      db_user_password: delphix
      oracle_base: /opt/app/oracle
      oracle_db_swapfile: /opt/app/oracle/oracle-swapfile-12102
      oracle_db_swap_count: 2048
EXPECTED RESULTS

Install 12.1.0.2

ACTUAL RESULTS

It detects /etc/oratab, and then skips remaining steps

RanzoTaylorsMBP:ansible ranzo.taylor$ ansible-playbook oracle-s3-12102.yaml --private-key ~/.ssh/NikeDelphixSharedKey.pem --user centos --verbose --flush-cache
Using /Users/ranzo.taylor/.ansible.cfg as config file

PLAY [Install oracle db] **********************************************************************************************************************************************************

TASK [Gathering Facts] ************************************************************************************************************************************************************
ok: [52.39.157.151]

TASK [lean_delivery.oracle_db : Check /etc/oratab exists] *************************************************************************************************************************
ok: [52.39.157.151] => {"changed": false, "stat": {"atime": 1597513189.9319746, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "d24c630d08eb0983e6d0fedf4fa5ca1c4a8312a1", "ctime": 1597513185.6300023, "dev": 66306, "device_type": 0, "executable": false, "exists": true, "gid": 1001, "gr_name": "dba", "inode": 4227272, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0664", "mtime": 1597365537.887345, "nlink": 1, "path": "/etc/oratab", "pw_name": "oracle", "readable": true, "rgrp": true, "roth": true, "rusr": true, "size": 794, "uid": 1001, "version": "18446744073601020820", "wgrp": true, "woth": false, "writeable": false, "wusr": true, "xgrp": false, "xoth": false, "xusr": false}}

TASK [lean_delivery.oracle_db : Choose vars based on oracle version] **************************************************************************************************************
skipping: [52.39.157.151] => (item=/Users/ranzo.taylor/.ansible/roles/lean_delivery.oracle_db/vars/oracle12.yml)  => {"ansible_loop_var": "version", "changed": false, "skip_reason": "Conditional result was False", "version": "/Users/ranzo.taylor/.ansible/roles/lean_delivery.oracle_db/vars/oracle12.yml"}

TASK [lean_delivery.oracle_db : Make preparations and install requirements] *******************************************************************************************************
skipping: [52.39.157.151] => {"changed": false, "skip_reason": "Conditional result was False"}

TASK [lean_delivery.oracle_db : Create swap file] *********************************************************************************************************************************
skipping: [52.39.157.151] => {"changed": false, "skip_reason": "Conditional result was False"}

TASK [lean_delivery.oracle_db : Adjust kernel parameters and shared memory] *******************************************************************************************************
skipping: [52.39.157.151] => {"changed": false, "skip_reason": "Conditional result was False"}

TASK [lean_delivery.oracle_db : Oracle DB XE install] *****************************************************************************************************************************
skipping: [52.39.157.151] => {"changed": false, "skip_reason": "Conditional result was False"}

TASK [lean_delivery.oracle_db : Oracle DB 11 or 12 install] ***********************************************************************************************************************
skipping: [52.39.157.151] => {"changed": false, "skip_reason": "Conditional result was False"}

TASK [lean_delivery.oracle_db : Postinstall actions] ******************************************************************************************************************************
skipping: [52.39.157.151] => {"changed": false, "skip_reason": "Conditional result was False"}

PLAY RECAP ************************************************************************************************************************************************************************
52.39.157.151              : ok=2    changed=0    unreachable=0    failed=0    skipped=7    rescued=0    ignored=0   
Ranzo3 commented 4 years ago

Removing /etc/oratab just creates problems later in the play, so I wonder if this code is tested/supposed to work with multiple installations?