ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Ansble + IIB9 + mqm user

Post new topic  Reply to topic
 Ansble + IIB9 + mqm user « View previous topic :: View next topic » 
Author Message
sleepyjamie
PostPosted: Thu Nov 26, 2015 3:05 pm    Post subject: Ansble + IIB9 + mqm user Reply with quote

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
View user's profile Send private message
fjb_saper
PostPosted: Thu Nov 26, 2015 5:13 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20696
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
View user's profile Send private message Send e-mail
sleepyjamie
PostPosted: Thu Nov 26, 2015 5:28 pm    Post subject: Reply with quote

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
View user's profile Send private message
sleepyjamie
PostPosted: Thu Nov 26, 2015 6:16 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Ansble + IIB9 + mqm user
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.