and oracle_home_user_password is passed from inventory
make install command bat file(run.bat.j2 jinjer2 template) on the virtual server.
run.bat is below
setup.exe -silent -noconfig -waitforcompletion -nowait -responseFile C:\Work\db_install.rsp
run.bat on the virtual server.
It always worked, but one day it failed.
It was because password included specific characters like “$”, “#”,“%” …
I thought that variable oracle_home_user_password in inventory or jinjer2 must be escaped but I don’t know.
I tried these…
In install.rsp.j2 ,
OracleHomeUserPassword={{ oracle_home_user_password | escape }}
in install.rsp.j2,
OracleHomeUserPassword={{ oracle_home_user_password| regex_escape }}
In install.rsp.j2 ,
OracleHomeUserPassword={{ oracle_home_user_password | escape() }}
in install.rsp.j2,
OracleHomeUserPassword={{ oracle_home_user_password| regex_escape() }}
They were all failed…(T_T
Anyone know how to escape specific character in jinjer2 or any other better way?
I’m sorry, I might be wrong.
I checked the ansible job message again, and it was oracle error.
The parameter “OracleHomeUserPassword” and variable was in install.rsp file made by ansible.
But when specific character “#” in the password was passed to the setup.exe of oracle installer, it failure.
So, I wrote , adding double quate to install.rsp.j2 like below.
And I’ll try.
oracleHomeUserPassword=“{{ oracle_home_user_password| escape() }}” # double quate
or
oracleHomeUserPassword=“”{{ oracle_home_user_password| escape() }}“” # double quate x2
or
oracleHomeUserPassword=‘{{ oracle_home_user_password| escape() }}’ # single quate
or
oracleHomeUserPassword=‘’{{ oracle_home_user_password| escape() }}‘’ # single quate x2
or other.
It’ll take for a little time.
I’ll share the result later.
I'm sorry, I might be wrong.
I checked the ansible job message again, and it was oracle error.
The parameter "OracleHomeUserPassword" and variable was in install.rsp file made by ansible.
But when specific character "#" in the password was passed to the setup.exe of oracle installer, it failure.
So, I wrote , adding double quate to install.rsp.j2 like below.
And I'll try.
oracleHomeUserPassword="{{ oracle_home_user_password| escape() }}" # double quate
or
oracleHomeUserPassword=""{{ oracle_home_user_password| escape() }}"" # double quate x2
or
oracleHomeUserPassword='{{ oracle_home_user_password| escape() }}' # single quate
or
oracleHomeUserPassword=''{{ oracle_home_user_password| escape() }}'' # single quate x2
or other.
It'll take for a little time.
I'll share the result later.
So this is only related to Ansible when you know how the specific characters are supposed to
escaped in the configuration file.
- ansible run fails?
- ansible runs OK but batch file fails?
- ??
is the install.rsp file OK?
>
> I'm using ansible tower.
> And I made workflow to install Oracle on the virtual server.
>
> The way to install oracle is ...
> 1. copy Oracle installer.exe file to the virtual server.
>
> 2. make response file(install.rsp.j2 jinjer2 template) on the virtual server.
> install.rsp includes below
>
> OracleHomeUserPassword={{ oracle_home_user_password }}
>
> and oracle_home_user_password is passed from inventory
>
> 3. make install command bat file(run.bat.j2 jinjer2 template) on the virtual server.
> run.bat is below
> setup.exe -silent -noconfig -waitforcompletion -nowait -responseFile C:\Work\db_install.rsp
>
> 4. run.bat on the virtual server.
>
> It always worked, but one day it failed.
> It was because password included specific characters like "$", "#","%" ....
>
> I thought that variable oracle_home_user_password in inventory or
jinjer2 must be escaped but I don't know.
>
> I tried these...
> 1) In install.rsp.j2 ,
> OracleHomeUserPassword={{ oracle_home_user_password | escape }}
> 2) in install.rsp.j2,
> OracleHomeUserPassword={{ oracle_home_user_password| regex_escape }}
> 3) In install.rsp.j2 ,
> OracleHomeUserPassword={{ oracle_home_user_password | escape() }}
> 4) in install.rsp.j2,
> OracleHomeUserPassword={{ oracle_home_user_password| regex_escape() }}
>
> They were all failed.......(T_T
>
> Anyone know how to escape specific character in jinjer2 or any other better way?
>
> --
> 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-proje...@googlegroups.com.