Supriyo Sarkar
Supriyo Sarkar

Reputation: 9

How to deploy applications(war file) to IBM WebSphere using Ansible?

I was trying to automate the deployment process of WAR files to IBM WebSphere using Ansible. I could find examples of playbooks for starting and stopping the services, but I was looking for the playbook code to deploy the WAR files to the server using Ansible.

Upvotes: 0

Views: 463

Answers (1)

Gas
Gas

Reputation: 18030

I'm not an Ansible expert so this is only draft of the steps.
You can install application using wsadmin.sh tool see Commands for the AdminApp object using wsadmin scripting .
The installation procedure could look like this:

  • scp your war file to the target machine (dmgr in clustered environment)
  • execute wsadmin on target machine, something like:
$ DMGR_HOME\bin\wsadmin.sh -c "AdminApp.install(path_to_app_on_remote_server/myapp.war', [-appname myappname])"

Here is an ansible wsadmin module, but dont know it it will be more useful to you https://github.com/amimof/ansible-websphere/blob/master/library/wsadmin.py

Upvotes: 0

Related Questions