|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Ansble + IIB9 + mqm user |
« View previous topic :: View next topic » |
Author |
Message
|
sleepyjamie |
Posted: Thu Nov 26, 2015 3:05 pm Post subject: Ansble + IIB9 + mqm user |
|
|
Centurion
Joined: 29 Apr 2015 Posts: 135
|
Hello,
I'm wondering if anyone has used Ansible with IIB. Specifically when running mqsi commands on the remote host.
---
- hosts: 10.0.0.5
remote_user: jamie
become: yes
become_user: mqm
tasks:
- name: deploy bar
shell: mqsideploy -q IB9QMGR -e EG -a MyBar.bar
The above playbook results in the following error:
mqsideploy: command not found
I can confirm that when ssh into the remote server manually the environment for mqsi commands is initialized.
sudo su - mqm
[sudo] password for jamie:
MQSI 9.0.0.4
/opt/ibm/mqsi/9.0.0.4
BIP1284I: Broker 'IB9BRK' on queue manager 'IB9QMGR' is running.
BIP8071I: Successful command completion.
QMNAME(IB9QMGR) STATUS(Running)
This likely isn't the right forum to ask, but I thought I would throw it out there first, before asking on the ansible forums. |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Nov 26, 2015 5:13 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
You might want to integrate into your ansible script what is done at user initialization, such as running the .profile and maybe sourcing mqsiprofile?  _________________ MQ & Broker admin |
|
Back to top |
|
 |
sleepyjamie |
Posted: Thu Nov 26, 2015 5:28 pm Post subject: |
|
|
Centurion
Joined: 29 Apr 2015 Posts: 135
|
fjb_saper wrote: |
You might want to integrate into your ansible script what is done at user initialization, such as running the .profile and maybe sourcing mqsiprofile?  |
Yeah that might work. I'm still a n00b so I wasn't really sure what scripts or environment settings mqm user account was running under.
I will try and source the mqsiprofile after a successful sudo su. |
|
Back to top |
|
 |
sleepyjamie |
Posted: Thu Nov 26, 2015 6:16 pm Post subject: |
|
|
Centurion
Joined: 29 Apr 2015 Posts: 135
|
As expected sourcing the mqsiprofile did the trick
shell: source /opt/ibm/mqsi/9.0.0.4/bin/mqsiprofile && mqsideploy -q IB9QMGR -e EG -a MyBar.bar |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|