Skip to content

Commit

Permalink
Install MQ client on SLES and Ubuntu
Browse files Browse the repository at this point in the history
  • Loading branch information
UNiXMIT committed Jan 29, 2025
1 parent 7bac46c commit a6bf91c
Show file tree
Hide file tree
Showing 4 changed files with 98 additions and 0 deletions.
12 changes: 12 additions & 0 deletions sles/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 sles/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
12 changes: 12 additions & 0 deletions ubuntu/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 ubuntu/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

0 comments on commit a6bf91c

Please sign in to comment.