Task is to restore DB2 database using ansible where managed host is IBM AIX server.
There is nothing special about Ansible here to do this for you. Unfortunately, when there are not Ansible modules or collections that exist, then it is up to the end-user to specify how to move forward. What can be done is leverage existing BASH or other scripts with Ansible using the SHELL/COMMAND/RAW modules. These allow regular commands to be specified when other modules don't exist.
Again, these commands and arguments within Ansible must be valid and useable just as if you were using on the command line. It has been a very long time since I've done anything with a DB2 database, but I do remember you had to be a DB2 user to do any administration, so the playbook you create will need a BECOME_USER of DB2USER (providing that is the service account and admin for DB2).
You will then be able to use all DB2 commands to manage the database including backup and restore. From my experience a lot of DB2 admins will create their own scripts for backup and restore, so most likely your colleague was suggesting that you leverage the existing process and just add it to a playbook.
Not sure about it ( could not find it in Ansible docs ) but see if this helps you in any way :
https://github.com/bernardoVale/ansible-role-db2
else check the same in : https://www.ansible.com/community
Thank you, @Chetan_Tiwary_ , for your reply. I did see this link, but I believe this module on GitHub is intended solely for the installation of DB2 and not for tasks such as restoring DB2. Is there any other method for accomplishing this without using modules or collections that are specifically designed for DB2? I asked my colleague, and he mentioned that you can request a script file from the customer and do the restoration thing . Do you have any information about this?
There is nothing special about Ansible here to do this for you. Unfortunately, when there are not Ansible modules or collections that exist, then it is up to the end-user to specify how to move forward. What can be done is leverage existing BASH or other scripts with Ansible using the SHELL/COMMAND/RAW modules. These allow regular commands to be specified when other modules don't exist.
Again, these commands and arguments within Ansible must be valid and useable just as if you were using on the command line. It has been a very long time since I've done anything with a DB2 database, but I do remember you had to be a DB2 user to do any administration, so the playbook you create will need a BECOME_USER of DB2USER (providing that is the service account and admin for DB2).
You will then be able to use all DB2 commands to manage the database including backup and restore. From my experience a lot of DB2 admins will create their own scripts for backup and restore, so most likely your colleague was suggesting that you leverage the existing process and just add it to a playbook.
Thanks @Travis this reply does answers and clears lot of my doubt.thanks for the support.
and also thanks to @Chetan_Tiwary_ again.
Red Hat
Learning Community
A collaborative learning environment, enabling open source skill development.