This guide installs WSO2 Identity Server from the official distribution archive and registers a systemd service.
- name: Install WSO2 IS on Debian family
hosts: wso2is_debian
become: true
vars:
wso2_version: "7.0.0"
wso2_archive_url: "https://github.com/wso2/product-is/releases/download/v{{ wso2_version }}/wso2is-{{ wso2_version }}.zip"
wso2_home: /opt/wso2is
tasks:
- name: Install dependencies
ansible.builtin.apt:
update_cache: true
name:
- openjdk-17-jdk
- unzip
- curl
state: present
- name: Download WSO2 IS archive
ansible.builtin.get_url:
url: "{{ wso2_archive_url }}"
dest: /tmp/wso2is.zip
mode: "0644"
- name: Extract WSO2 IS archive
ansible.builtin.unarchive:
src: /tmp/wso2is.zip
dest: /opt
remote_src: true
failed_when: false
- name: Ensure symlink to current WSO2 home
ansible.builtin.file:
src: "/opt/wso2is-{{ wso2_version }}"
dest: "{{ wso2_home }}"
state: link
force: true
failed_when: false
- name: Install systemd unit
ansible.builtin.copy:
dest: /etc/systemd/system/wso2is.service
mode: "0644"
content: |
[Unit]
Description=WSO2 Identity Server
After=network.target
[Service]
Type=forking
ExecStart={{ wso2_home }}/bin/wso2server.sh start
ExecStop={{ wso2_home }}/bin/wso2server.sh stop
Restart=on-failure
[Install]
WantedBy=multi-user.target
- name: Enable and start WSO2 IS
ansible.builtin.systemd:
name: wso2is
enabled: true
state: started
daemon_reload: true
failed_when: false
- name: Install WSO2 IS on RHEL family
hosts: wso2is_rhel
become: true
vars:
wso2_version: "7.0.0"
wso2_archive_url: "https://github.com/wso2/product-is/releases/download/v{{ wso2_version }}/wso2is-{{ wso2_version }}.zip"
wso2_home: /opt/wso2is
tasks:
- name: Install dependencies
ansible.builtin.dnf:
name:
- java-17-openjdk-devel
- unzip
- curl
state: present
- name: Download WSO2 IS archive
ansible.builtin.get_url:
url: "{{ wso2_archive_url }}"
dest: /tmp/wso2is.zip
mode: "0644"
ansible-playbook -i inventory.ini wso2is-install.yml
wso2is_debian.Beyond this playbook, we offer:
Contact our automation team: office@linux-server-admin.com