Hello Team, I have written an ansible play book for creating oracle restore point and I am running from ansible tower and GitHub and hasivolt.
My logic is
- Provide bellow variable in template
Db name
Pdb name
Create/drop
Restore point name - Resister the output of select count(*) from v$restorepoint where restorepoint={{Restore point name}};
- If rc value of above query is 0 and restore point action is create then create restore point or else
- If rc value of above query is not equal to 0 and restorepoint action is drop then run drop restore point.
- Display the register value of create or drop register value.
But the issue is bellow task is getting skipped when executing
- name create restore point
when:- restorepoint_action = “create”
- restorepoint_exist == 0
shell |
. oraenv << {{db_name}}
sqlplus “/as sysdba” > EOF
create restore point for {{pdb}};
EOF
register created_restore
change_when