Deploying a application using WAR file on Websphere

629 views
Skip to first unread message

Rachna Dodia

unread,
Sep 2, 2020, 7:01:29 AM9/2/20
to Ansible Project
Need your inputs on how to go forward with deploying application using WAR file on Websphere using Ansible.

I cannot see any modules or playbooks related to the same. 

Looking for any suggestion or approach how to take this forward.

Thanks,
Rachna Dodia

Avinash Jadhav

unread,
Sep 2, 2020, 7:16:09 AM9/2/20
to ansible...@googlegroups.com
Hi Rachna,

Please find below playbook for  war file deployment you need to changes your sources WAR and destination for Websphere 

Thank you 
Avinash 

-
---
- hosts: tomcatServer
  vars:
  - warName: helloworld.war
  - warRemotePath: /path/to/put/war

  tasks:
  - name: Download WAR to server
    synchronize: src={{ warLocalPath }}/{{ warName }} dest={{ warRemotePath }}/{{ warName }}

  - name: Unzip WAR file
    unarchive: src={{ warRemotePath }}/{{ warName }} dest=/var/lib/tomcat7/webapps/ROOT/ copy=no mode=0755 owner=tomcat7 group=tomcat7
    notify:
        - Restart tomcat7

  - name: Delete remote war file
    file: path={{ warRemotePath }}/{{ warName }} state=absent

  handlers:
    - name: Restart tomcat7
      service: name=tomcat7 state=restarted

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/c58bfb7b-fcde-4ab5-ab80-4049f9ee0a3dn%40googlegroups.com.

Abhijeet Kasurde

unread,
Sep 2, 2020, 7:18:19 AM9/2/20
to ansible...@googlegroups.com

Rachna Dodia

unread,
Sep 2, 2020, 8:06:52 AM9/2/20
to Ansible Project
Thanks for the response.

@Abhijeet , the example which you have shared have already available modules for JBOSS deployment. 

Where I cannot see or map any module as such for application deployment on Websphere.

Thanks,
Rachna Dodia 

Supriyo Sarkar

unread,
May 17, 2023, 5:07:01 AM5/17/23
to Ansible Project
Hi, Do you have any solution till now? I am also looking for answers for the same.
Reply all
Reply to author
Forward
0 new messages