Comments (13)
Hello,
According to the error message it is an issue with the assert clause in orahost main task file.
I just submitted a pull request to fix this.
Concerning the "host not matched" problem, you should either create a group named after hosts key value(orafs) in your inventory file (/etc/ansible/hosts) or change the hosts key value in single-instance-db-on-fs.yml playbook to match the group you're IP belongs. Example:
/etc/ansible/hosts:
[my group] <<<=======
my_host
single-instance-db-on-fs.yml:
-
name: Host configuration
hosts: my_group <<<=======
user: ansible
sudo: yes
roles:
- common
- orahost -
name: Database Server Installation & Database Creation
hosts: my_group <<<======
user: ansible
sudo: yes
roles:- oraswdb-install
- oradb-create
(DO NOT specifiy a group containing production hosts for tests :p)
from ansible-oracle.
Thank you so much for reply..But I get different issue now...
[DEPRECATION WARNING]: Instead of sudo/sudo_user, use become/become_user and make sure become_method is 'sudo' (default). This feature will be removed in version 2.6. Deprecation warnings
can be disabled by setting deprecation_warnings=False in ansible.cfg.
PLAY [Host configuration] *******************************************************************************************************************************************************************
TASK [Gathering Facts] **********************************************************************************************************************************************************************
The authenticity of host 'xx.xx.xxx.202 (x.x.x.202)' can't be established.
ECDSA key fingerprint is SHA256:ViELXTA2mJU0vBGJz2PZm/+wplOWEpqHT4ibl3mYOdY.
ECDSA key fingerprint is MD5:f2:75:b6:0c:fd:7f:2b:8b:06:f3:04:ff:be:52:24:ca.
Are you sure you want to continue connecting (yes/no)? yes
fatal: [xx.xx.xxx.202]: UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host via ssh: Warning: Permanently added 'xx.xx.xxx.202' (ECDSA) to the list of known hosts.\r\nPermission denied (publickey,gssapi-keyex,gssapi-with-mic).\r\n", "unreachable": true}
to retry, use: --limit @/home/ec2-user/ansible-oracle/single-instance-db-on-fs.retry
PLAY RECAP **********************************************************************************************************************************************************************************
xx.xx.xxx.202 : ok=0 changed=0 unreachable=1 failed=0
real 0m20.043s
user 0m13.631s
sys 0m1.865s
The below is the one i have added as per suggestion in hosts file
[dbservers]
xx.x.x.202
But I am able to login to this aws instance via putty ...where i have given ppk file for authentication..
any specific changes we need to in this case ?
from ansible-oracle.
Hi,
First of all, thanks for trying this out! Much appreciated.
Secondly, you'd also have to change this in single-instance-db-on-fs.yml:
user: ansible
, to:
user: ec2-user
(unless you've created a user called ansible
on your instance)
from ansible-oracle.
thank you so much oravit for response..
Now i have done the change to ec2-user in that yml ran it...
I still see this issue ... is any specific thing that we need to connect ec2instance from our playbook ? how ever i am running this playbook from from same host 1.2.3.202.
sorry buddy.. I am dumb in these configurations. could you please check if possible to check on aws instance...and let me know results...sorry to trouble you...
do we need to add pem key or ppk also in host , if yes whats is the format ? did you ever tried your solution to install db on aws ec2instance
The authenticity of host '1.2.3.202 ('1.2.3.202)' can't be established.
ECDSA key fingerprint is SHA256:ViELXTA2mJU0vBGJz2PZm/+wplOWEpqHT4ibl3mYOdY.
ECDSA key fingerprint is MD5:f2:75:b6:0c:fd:7f:2b:8b:06:f3:04:ff:be:52:24:ca.
Are you sure you want to continue connecting (yes/no)? yes
fatal: ['1.2.3.202]: UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host via ssh: Warning: Permanently added ''1.2.3.202' (ECDSA) to the list of known hosts.\r\nPermission denied (publickey,gssapi-keyex,gssapi-with-mic).\r\n", "unreachable": true}
to retry, use: --limit @/home/ec2-user/ansible-oracle/single-instance-db-on-fs.retry
sorry to trouble you... when i tried different repos, this one i feel to be more robust one...to install
from ansible-oracle.
HI,
So if you're running the playbook on the same host as where you want to install Oracle you have to options:
- You copy your .pem file (the same file you used when creating the instance) to the instance (make sure the permissions are ok), and call the playbook like this:
ansible-playbook single-instance-db-on-fs.yml --private-key path/to/your/pemfile
- Add the line 'connection: local' to the playbook.
e.g
user: ec2-user
connection: local <-- Add this line
and call the playbook like this:
ansible-playbook single-instance-db-on-fs.yml
Both of these options work fine.
from ansible-oracle.
Hi buddy,
Thank you very much ..some luck now.. I followed option 2...connection issue resolved...it started next... but now playbook stopped at below section
TASK [orahost : Install packages required by Oracle on OL/RHEL] *****************************************************************************************************************************
failed: [1.2.3.202] (item=[u'libselinux-python', u'procps', u'psmisc', u'module-init-tools', u'ethtool', u'bc', u'bind-utils', u'nfs-utils', u'util-linux-ng', u'xorg-x11-utils', u'xorg-x11-xauth', u'binutils', u'compat-libstdc++-33', u'compat-libstdc++-33.i686', u'unixODBC-devel', u'unixODBC-devel.i686', u'gcc', u'gcc-c++', u'glibc', u'glibc.i686', u'glibc-devel', u'glibc-devel.i686', u'libaio', u'libaio-devel', u'libaio.i686', u'libaio-devel.i686', u'libgcc', u'libgcc.i686', u'libstdc++', u'libstdc++-devel', u'libstdc++.i686', u'libstdc++-devel.i686', u'make', u'sysstat', u'openssh-clients', u'compat-libcap1', u'xorg-x11-xauth', u'xorg-x11-xinit', u'libXtst', u'xdpyinfo', u'xterm', u'xsetroot', u'libXp', u'libXt', u'libXtst', u'ntp', u'ksh', u'lvm2', u'xfsprogs', u'btrfs-progs', u'parted', u'nc', u'smartmontools', u'elfutils-libelf-devel.i686', u'elfutils-libelf-devel']) => {"changed": false, "item": ["libselinux-python", "procps", "psmisc", "module-init-tools", "ethtool", "bc", "bind-utils", "nfs-utils", "util-linux-ng", "xorg-x11-utils", "xorg-x11-xauth", "binutils", "compat-libstdc++-33", "compat-libstdc++-33.i686", "unixODBC-devel", "unixODBC-devel.i686", "gcc", "gcc-c++", "glibc", "glibc.i686", "glibc-devel", "glibc-devel.i686", "libaio", "libaio-devel", "libaio.i686", "libaio-devel.i686", "libgcc", "libgcc.i686", "libstdc++", "libstdc++-devel", "libstdc++.i686", "libstdc++-devel.i686", "make", "sysstat", "openssh-clients", "compat-libcap1", "xorg-x11-xauth", "xorg-x11-xinit", "libXtst", "xdpyinfo", "xterm", "xsetroot", "libXp", "libXt", "libXtst", "ntp", "ksh", "lvm2", "xfsprogs", "btrfs-progs", "parted", "nc", "smartmontools", "elfutils-libelf-devel.i686", "elfutils-libelf-devel"], "msg": "No package matching 'compat-libstdc++-33' found available, installed or updated", "rc": 126, "results": ["libselinux-python-2.5-11.el7.x86_64 providing libselinux-python is already installed", "procps-ng-3.3.10-16.el7.x86_64 providing procps is already installed", "psmisc-22.20-15.el7.x86_64 providing psmisc is already installed", "kmod-20-15.el7_4.7.x86_64 providing module-init-tools is already installed", "2:ethtool-4.8-1.el7.x86_64 providing ethtool is already installed", "bc-1.06.95-13.el7.x86_64 providing bc is already installed", "32:bind-utils-9.9.4-51.el7_4.2.x86_64 providing bind-utils is already installed", "1:nfs-utils-1.3.0-0.48.el7_4.2.x86_64 providing nfs-utils is already installed", "util-linux-2.23.2-43.el7_4.2.x86_64 providing util-linux-ng is already installed", "xorg-x11-utils-7.5-22.el7.x86_64 providing xorg-x11-utils is already installed", "1:xorg-x11-xauth-1.0.9-1.el7.x86_64 providing xorg-x11-xauth is already installed", "binutils-2.27-27.base.el7.x86_64 providing binutils is already installed", "No package matching 'compat-libstdc++-33' found available, installed or updated"]}
to retry, use: --limit @/home/ec2-user/ansible-oracle/single-instance-db-on-fs.retry
PLAY RECAP **********************************************************************************************************************************************************************************
1.2.3.202 : ok=6 changed=3 unreachable=0 failed=1
"No package matching 'compat-libstdc++-33' found available, installed or updated"]}
is this stopping play book ? does our playbook automitcally install required packages or do we need to install it manually by our self ?
and would like to know is there any specific reason this file getting created @/home/ec2-user/ansible-oracle/single-instance-db-on-fs.retry.. is that means when i retry do i need to run this yml or we can safely remove this one
and also I would like to contribute to make read.md better with steps so that it can help others as well :)
thanks for your patience oravit... can you advice further..
from ansible-oracle.
You don't have to do anything manually, the playbooks will take care of it.
Not sure why the package can't be found. You said this was a RHEL system, correct?
I'm thinking maybe some other repo needs to be enabled for the compat- packages to be available, so I'll look into this.
Do you think you could give me your aws region and the ami-id you're using? It makes it easier to debug.
Sorry this didn't work out of the box, I'll fix it though.
from ansible-oracle.
Hi
It seems i am getting closer to successful step one by one...
Yes, mine is fresh and latest RHEL
for this package issue did following step from command prompt :
First I tried to user yum update yum update --skip-broken from commandline.. reran.. our playbook
Result : Same error again
Next , after googling some one said. to use yum clean all ----> followed by ----> yum update from command line --> now again when I said yum update ---> then it said perfectly no package to be updated ---> re ran our playbook now...I successfully passed the OS Rhel package task...successful
so ideally our playbook should have yum clean all and then yum update functionality , can you please add this logic ? so that playbook should fix this issue automatically
Next,
Re-ran play book..now firewalled issue came.. "Could not find firewalld "
to solve this, again I have installed yum install firewalld from command line. I think we need to add this also to playbook functionality so that it will automatically installed packages which is not available "
Again re-ran playbook...
so firewall issue also passed, now struck at error " Cannnot alloacte memory "... i think this is my free tier aws account...it seems that is issue. I may need to try at larger size instance...
I will keep you posted on my progress...what ever the fixes i have done manually, I think play book has to validate based on error message and initiate remedial action...so that we can make this solution a great one. However thanks for your wonderful solution though and thanks a lot for solution....
I am using us-east-2 as region ami id is RHEL-7.5_HVM_GA-20180322-x86_64
Few more doubts:
if playbook fails in middle, when we re-run it, shall it continue from where it failed last time ?
Because now, folders, groups got created, due to some failure, if you re run, since groups , users were created, shall playbook skip this step and move further ?
any thoughts ? thanks for your help
from ansible-oracle.
Ok - that looks like the same AMI I'm using.
So, re the firewalld issue: This is an issue that I've not run into before (or accounted for), where firewalld is not installed (I don't think I've ever come across such a system before). There are 2 options here:
- Make sure it is actually installed
- Check for the existance of firewalld, and only try to disable it if is is available
I'm leaning towards 2, but I'll have to look into this before I make a decision.
Typically, I test my code on EL systems with a vanilla 'minimal' or 'core' installation-base and then firewalld (and a lot of other packages) are always a part of that installation.
AMI's are typically stripped down versions (packagewise), and that's why this happened. I should probably expand my testing to run against a RHEL AMI as well....
Re: The memory error: You need ~3-4GB for Oracle to work reliably, so a bigger instance type should fix that error (t2.medium usually works fine. It will not be a performance beast, but it'll get you a DB at least)
Re: Packages, if I added enable-repo=* to the yum module, it also fixed the problem. Will see how to fix this. I have not had to do this for earlier version of EL7, so not sure what has changed....
As for the playbook failing:
If this happens, it will always start from the top again (unless you pass in the --start-at-task taskname flag.)
This should not matter though, as all tasks are idempotent, meaning they can be run over and over and only making changes if the desired state differs from the current state of an object (user, package, directory etc)
from ansible-oracle.
Thank for detailed reply.... concur with your views.. i understand challenges to make it out of box (hopefully possible).. I am waiting for better larger instance to check out...I shall keep you posted... Thanks for answering all the questions I have... ...keep you posted
from ansible-oracle.
A comment regarding RHEL7.
The following repository must be added:
subscription-manager repos --enable=rhel-7-server-optional-rpms
Is it possible that AMI has a similar repository in disabled mode? I think it is expected, that this repo is disabled on AMI, when that OS is comaptible against RHEL7.
Is enabling all repos with enablerepo=* a good idea?
from ansible-oracle.
Setting enablerepo=* is how I've solved it. 19cf908
from ansible-oracle.
Update:
This has been changed with this: 5e1cf4e
from ansible-oracle.
Related Issues (20)
- Undefined variable 'listener_home_config' on v4.2.0 HOT 2
- Need Oracle patch to install 19c on EL9 HOT 4
- configuge_hugepages does not work anymore HOT 1
- default oracle_packages for OEL7 contain weird arch HOT 3
- roles/oraswgi_install/tasks/assert.yml fails on empty default_gipass, even if sysasmpassword/asmmonitorpassword are set HOT 2
- become doesn't work if ansible_user is other than root HOT 5
- cvuqdisk doesn't install on FIPS-enabled system HOT 4
- gi_patches:example in roles/oraswgi_meta/defaults/main.yml doesn't clearly explain how gi_patches relates to gi_patches_config HOT 1
- false-positive home-check in inventory.xml if home was deinstalled HOT 1
- grid_base doesn't have to be different from oracle_base if role_separation==false HOT 1
- roles/oraswgi_manage_patches failing due to several variable issues HOT 1
- oraswgi_install deploys ocenv although deploy_ocenv==false HOT 1
- ASM failgroups
- Add additional hosts entres to /etc/hosts
- On systems that handle logrotate differently, it logrotate setup by orahost_logrotate should be optional
- Optionally size vm.nr_hugepages and kernel.sem according to database settings HOT 1
- Add a dict of environment settings to shell and command modules HOT 2
- Introduce a global_handlers role to collect handlers needed by different roles HOT 1
- Check system for reboot recommendation after package updates
- Disable transparent hugepages by kernel cmdline HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ansible-oracle.