Here's some ideas

You can define a host variable in your ansible inventory file, like this

-- 

# ansible inventory

# development hosts below here
devdb01 enterprise_manager_port=5500

# test hosts below here

testdb01 enterprise_manager_port=5501


and then create a template dbca.rsp file, where instead of the hard-coded 
port number, you substitute in the value associated with each host 
(something like this - i've not looked at the format for dbca.rsp but the 
stuff inside {{ }} will be substituted

enterprise_manager_port_number={{enterprise_manager_port}}


Then, in your playbook, use the `template` module (see 
http://docs.ansible.com/ansible/latest/modules/template_module.html), 
instead of just copying over the dbca.rsp, this will substitute in any 
variables before copying the templated result to your remote machine.

There are lots of ways of setting up variables in ansible - as well has for 
hosts, you can do the same for groups of hosts, or have default variables 
applied to specific roles - and other places too.  so its well worth 
putting aside a few hours to go through the documentation pages and getting 
an understanding of whats possible.

Hope this helps,

Jon

On Friday, April 13, 2018 at 2:49:16 AM UTC+1, Christopher Priest wrote:
>
> Hi There,
>
>   I have set up a playbook and two roles ->
>
>    1) The first role sets up the Linux kernel and OS 
>    2) The second role installs the Oracle software WITH a listener but 
> WITHOUT any instance. This role has checks to terminate if Oracle is 
> already installed
>
>  I am now wanting to set up a role to install multiple Oracle instances ( 
> DEV TEST UAT RCAT etc). I get stuck with the fact that each instance has a 
> different port number for enterprise manager. eg (DEV 5500, TEST 5501 etc). 
> So far, the only way I can see to do this is to not have a common dbca.rsp 
> file but rather have one per instance with the port number hard coded. 
> Also, I want to ensure that prior to attempting to create a database, that 
> the instance being created doesn't already exist. Is this possible while 
> looping?
>
> Regards
>
>   Chris  
>

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/9a367e2e-7014-457c-8476-8247f0438362%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to