Skip to content

Commit

Permalink
Install MQ client on RHEL
Browse files Browse the repository at this point in the history
  • Loading branch information
UNiXMIT committed Jan 29, 2025
1 parent 60037b0 commit 7bac46c
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 3 deletions.
12 changes: 12 additions & 0 deletions rhel/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,18 @@
import_tasks: fail.yml
tags: default

- name: Install IBM MQ Client
hosts: awsEC2
gather_facts: no
tasks:
- block:
- name: Import mq.yml
import_tasks: mq.yml
rescue:
- name: Import fail.yml
import_tasks: fail.yml
tags: default

- name: Create Support Files and Directories
hosts: awsEC2
gather_facts: no
Expand Down
37 changes: 37 additions & 0 deletions rhel/mq.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
- name: Create Directory for MQ
file:
path: "/opt/ibm/mq"
state: directory
mode: '0755'
become: yes

- name: Download IBM MQ Client
ansible.builtin.get_url:
url: https://ibm.biz/IBM-MQC-Redist-LinuxX64targz
dest: /opt/ibm/mq/IBM-MQC-Redist-LinuxX64.tar.gz
mode: '0755'
become: yes

- name: Extract IBM MQ Client
ansible.builtin.unarchive:
src: /opt/ibm/mq/IBM-MQC-Redist-LinuxX64.tar.gz
dest: /opt/ibm/mq
remote_src: yes
become: yes

- name: Change Ownership of /opt/ibm/mq Directory
file:
path: /opt/ibm/mq
state: directory
recurse: yes
mode: '0755'
become: yes

- name: Set MQ Environment
copy:
dest: /etc/profile.d/mq.sh
content: |
#!/bin/bash
export PATH=$PATH:/opt/ibm/mq/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/ibm/mq/lib64
become: yes
2 changes: 1 addition & 1 deletion win/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
import_tasks: fail.yml
tags: default

- name: Install IBM MQ Client Libraries
- name: Install IBM MQ Client
hosts: awsEC2
gather_facts: no
tasks:
Expand Down
4 changes: 2 additions & 2 deletions win/mq.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
- name: Download IBM MQ Client Libraries
- name: Download IBM MQ Client
ansible.windows.win_get_url:
url: https://ibm.biz/IBM-MQC-Redist-Win64zip
dest: C:\Users\Public\Documents\IBM-MQC-Redist-Win64.zip

- name: Unzip IBM MQ Client Libraries
- name: Unzip IBM MQ Client
community.windows.win_unzip:
src: C:\Users\Public\Documents\IBM-MQC-Redist-Win64.zip
dest: C:\Program Files\IBM\MQ
Expand Down

0 comments on commit 7bac46c

Please sign in to comment.