This guide provides an Ansible example for WebSphere Traditional using Installation Manager and pre-staged licensed media.
It focuses on RHEL-compatible systems used in enterprise deployments.
- name: Install IBM WebSphere Traditional
hosts: ibm-websphere
become: true
vars:
ws_user: websphere
ws_group: websphere
ws_install_root: /opt/IBM/WebSphere/AppServer
imcl_path: /opt/IBM/InstallationManager/eclipse/tools/imcl
ws_offering: com.ibm.websphere.ND.v90
ws_fixpack: 9.0.5026.20241106_1234
ws_repo_path: /mnt/ibm-repo/WAS9
ws_response_file: /tmp/was-install-response.xml
tasks:
- name: Install runtime dependencies on RHEL family
dnf:
name:
- java-17-openjdk
- libnsl
state: present
when: ansible_os_family == "RedHat"
- name: Create WebSphere group
group:
name: "{{ ws_group }}"
state: present
- name: Create WebSphere user
user:
name: "{{ ws_user }}"
group: "{{ ws_group }}"
home: /home/websphere
shell: /usr/sbin/nologin
create_home: true
- name: Assert Installation Manager exists
stat:
path: "{{ imcl_path }}"
register: imcl_stat
- name: Fail if Installation Manager is missing
fail:
msg: "Installation Manager not found at {{ imcl_path }}. Stage IBM media first."
when: not imcl_stat.stat.exists
- name: Create response file for silent install
copy:
dest: "{{ ws_response_file }}"
mode: "0600"
content: |
<?xml version="1.0" encoding="UTF-8"?>
<agent-input>
<server>
<repository location="{{ ws_repo_path }}"/>
</server>
<profile id="IBM WebSphere Application Server V9.0" installLocation="{{ ws_install_root }}">
<data key="eclipseLocation" value="{{ ws_install_root }}"/>
<data key="user.import.profile" value="false"/>
</profile>
<install>
<offering id="{{ ws_offering }}" version="{{ ws_fixpack }}" profile="IBM WebSphere Application Server V9.0"/>
</install>
<preference name="com.ibm.cic.common.core.preferences.preserveDownloadedArtifacts" value="true"/>
</agent-input>
- name: Run silent WebSphere install
command: >
{{ imcl_path }}
input {{ ws_response_file }}
-acceptLicense
-showProgress
register: ws_install
changed_when: "'Installed' in ws_install.stdout or 'installed' in ws_install.stdout"
- name: Set ownership of install root
file:
path: "{{ ws_install_root }}"
state: directory
owner: "{{ ws_user }}"
group: "{{ ws_group }}"
mode: "0755"
recurse: true
ws_offering for your edition (Base/ND/Liberty) and align with IBM entitlement.ws_fixpack to the currently recommended fixpack from IBM support pages.Any questions?
Feel free to contact us. Find all contact information on our contact page.