Dear All

Am trying to install Oracle Database 12.1.0.2 on a target host, using a 
ansible script on Ansible Master server.

On the target host 'oracle' OS user has the correct groups:



$ id oracle
uid=101(oracle) gid=204(oinstall) groups=205(dba),204(oinstall)


But the ansible script is failing with error :

     [FATAL] [INS-35341] The installation user is not a member of the 
following groups: [dba, dba, dba, dba]


-------------------

Here is the chunk of code used in the ansible script:



  - name: ensure oinstall group exists
    group: name=oinstall gid=204 state=present
    become: true
    become_method: su

  - name: ensure dba group exists
    group: name=dba gid=205 state=present
    become: true
    become_method: su

  - name: ensure oracle user exists with correct groups
    user: name=oracle uid=101 group=oinstall groups=dba createhome=no 
shell=/bin/bash
    become: true
    become_method: su

  - name: create oracle_base directory
    file:
      path: "{{ oracle_base }}"
      state: directory
      owner: oracle
      group: oinstall
      mode: 0775

  - name: install base software
    command: "{{ sw_library }}/oracle/{{ oracle_ver 
}}/database/runInstaller -silent -ignorePrereq -ignoreSysPrereqs 
-waitforcompletion -responseFile {{ sw_library 
}}/oracle/response_files/db_12102.rsp ORACLE_HOME={{ oracle_home }}"
    register: install_db_software
    args:
      creates: "{{ oracle_home }}"
    failed_when: "'skipped' not in install_db_software.stdout and 
'Successfully Setup Software.' not in install_db_software.stdout"

--------------

And the console output from the ansible script run is:



TASK [ensure oinstall group exists] 
********************************************
ok: [oradb-a01-d.adcom.ucl.ac.uk]

TASK [ensure dba group exists] 
*************************************************
changed: [oradb-a01-d.adcom.ucl.ac.uk]

TASK [ensure oracle user exists with correct groups] 
***************************
changed: [oradb-a01-d.adcom.ucl.ac.uk]

TASK [create oracle_base directory] 
********************************************
ok: [oradb-a01-d.adcom.ucl.ac.uk]

TASK [install base software] 
***************************************************
fatal: [oradb-a01-d.adcom.ucl.ac.uk]: FAILED! => {"changed": true, "cmd": 
["/software_library/oracle/12.1.0.2/database/runInstaller", "-silent", 
"-ignorePrereq", "-ignoreSysPrereqs", "-waitforcompletion", 
"-responseFile", "/software_library/oracle/response_files/db_12102.rsp", 
"ORACLE_HOME=/orahome/app/oracle/product/12.1.0/dbhome_1"], "delta": 
"0:00:05.125817", "end": "2016-12-08 13:46:54.465875", "failed": true, 
"failed_when_result": true, "rc": 254, "start": "2016-12-08 
13:46:49.340058", "stderr": "", "stdout": "Starting Oracle Universal 
Installer...\n\nChecking Temp space: must be greater than 500 MB.   Actual 
10480 MB    Passed\nChecking swap space: must be greater than 150 MB.   
Actual 4094 MB    Passed\nPreparing to launch Oracle Universal Installer 
from /tmp/OraInstall2016-12-08_01-46-49PM. Please wait ...[FATAL] 
[INS-35341] The installation user is not a member of the following groups: 
[dba, dba, dba, dba]\n   CAUSE: The installation user account must be a 
member of all groups required for installation.\n   ACTION: Ensure that the 
installation user is a member of the system privileges operating system 
groups you selected.\nA log of this session is currently saved as: 
/tmp/OraInstall2016-12-08_01-46-49PM/installActions2016-12-08_01-46-49PM.log. 
Oracle recommends that if you want to keep this log, you should move it 
from the temporary location.", "stdout_lines": ["Starting Oracle Universal 
Installer...", "", "Checking Temp space: must be greater than 500 MB.   
Actual 10480 MB    Passed", "Checking swap space: must be greater than 150 
MB.   Actual 4094 MB    Passed", "Preparing to launch Oracle Universal 
Installer from /tmp/OraInstall2016-12-08_01-46-49PM. Please wait ...[FATAL] 
[INS-35341] The installation user is not a member of the following groups: 
[dba, dba, dba, dba]", "   CAUSE: The installation user account must be a 
member of all groups required for installation.", "   ACTION: Ensure that 
the installation user is a member of the system privileges operating system 
groups you selected.", "A log of this session is currently saved as: 
/tmp/OraInstall2016-12-08_01-46-49PM/installActions2016-12-08_01-46-49PM.log. 
Oracle recommends that if you want to keep this log, you should move it 
from the temporary location."], "warnings": []}


-------------------

I wonder why the script is changing for the Tasks "ensure dba group exists" 
and "ensure oracle user exists with correct groups". Since the user/group 
settings are in place before running the script. 

I also observed that the script is changing the /etc/passwd and /etc/group 
files.


Any pointer will help



Regards
BPradhan

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/d3263e74-d6b0-4178-b52b-ad77da2dea39%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to