Hi Amir,
In an Ansible playbook, you can also make use of the Ansible supplied shell module to issue MQSC commands as follows:
- name: Execute a MQ Command
shell:
cmd: "echo 'DISPLAY QMGR ALL' | ./runmqsc MyMQLinuxQMgr"
chdir: /opt/mqm/bin
register: qmgralloutput
- debug:
var: qmgralloutput.stdout_lines
So, you could echo a DEFINE QLOCAL command, or any other MQSC command and pipe it into the runmqsc command targeted for your MQ for Linux QMgr. As long as the hosts: variable in your Ansible playbook points to the hostname of your MQ for Linux QMgr, it will work.
------------------------------
Mayur RAJA
------------------------------
Original Message:
Sent: Fri September 29, 2023 02:38 AM
From: Mayur RAJA
Subject: procedure to create local queue on ibm linux server
Hi Amir,
So long as you have Ansible on your local machine, you should be able to run playbooks to create MQ resources on your Queue Manager on Linux. This may help you: https://community.ibm.com/community/user/integration/blogs/mayur-raja1/2023/05/22/mq-ansible-yaml-commands-collection , but because it uses the MQ REST API, it relies on you configuring an MQ Web Server.
You may also want to check out this work https://github.com/ibm-messaging/mq-ansible
Regards .. Mayur
------------------------------
Mayur RAJA
Original Message:
Sent: Thu September 28, 2023 12:47 PM
From: Amir Ali
Subject: procedure to create local queue on ibm linux server
Hi
I want to create a local queue using playbook on ibm linux server, how to do that ?
Wants code for playbook to create qlocal and any prerequisite to accomplish before it .
Thanks
------------------------------
Amir Ali
------------------------------