Check this out:
- name: Start
liberty_server:
state: started
libertydir: /usr/local/WebSphere/Liberty/
name: server-01
- name: Stop
liberty_server:
state: stopped
libertydir: /usr/local/WebSphere/Liberty/
name: server-01
Ansible provides good enough modules for everything.