ansible playbook to start and stop a WebSphere application

0 votes
I was looking for an ansible playbook to start and stop a WebSphere application. Any help will be appreciated...

Thanks you!
Oct 30, 2019 in Ansible by Hannah
• 18,040 points
910 views

1 answer to this question.

0 votes

The below playbook should be good enough:

- name: Start
  server: 
    state: started 
    wasdir: /usr/local/WebSphere/AppServer/ 
    name: server-01

- name: Stop
  server: 
    state: stopped 
    wasdir: /usr/local/WebSphere/AppServer/ 
    name: server-01
answered Oct 30, 2019 by Tanya
How it will stop and start without  stop.sh and start.sh
You can use this kind of code.

- name: Create
  profile_dmgr:
    state: present
    wasdir: /usr/local/WebSphere/AppServer/
    name: dmgr
    cell_name: devCell
    host_name: localhost
    node_name: devcell-dmgr
    username: admin
    password: allyourbasearebelongtous

- name: Remove
  profile_dmgr:
    state: absent
    wasdir: /usr/local/WebSphere/AppServer/
    name: dmgr

Before running this also set variables like hostname in conf file.

Related Questions In Ansible

0 votes
1 answer
0 votes
0 answers
0 votes
1 answer
0 votes
1 answer

Ansible playbook to wget a file

Hey @Celia, one recommendation, try not using ...READ MORE

answered Jan 16, 2019 in Ansible by Vaishu
4,576 views
+13 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 26, 2018 in DevOps & Agile by DragonLord999
• 8,400 points
491 views
0 votes
1 answer
0 votes
1 answer

ansible playbook to create and remove a WebSphere Application Server Node Agent profile

This should workout: - name: Create profile_nodeagent: ...READ MORE

answered Oct 30, 2019 in Ansible by Tanishq
117 views