-
Notifications
You must be signed in to change notification settings - Fork 27
Modules
Mariana Villar edited this page Jan 19, 2023
·
2 revisions
ansible_mq modules allow configuration of IBM MQ's resources.
Module to create, start, delete a queue manager and run MQSC file.
-
qmname
: IBM MQ queue manager name. -
state
: Desired state of the queue manager (present
,absent
,running
). -
description
: IBM MQ queue manager description - optional. -
unit_test
: flag used for unit tests of modules. -
mqsc_file
: Specified MQSC command file to run - optional.
-
msg
: message of the performed task. -
rc
: return code. state
- name: Create queue manager
queue_manager:
qmname: 'queue_manager_name'
state: present
- name: Start queue manager
queue_manager:
qmname: 'queue_manager_name'
state: running
- name: Start queue manager
queue_manager:
qmname: 'queue_manager_name'
state: absent
- name: Run MQSC command file
queue_manager:
qmname: 'queue_manager_name'
state: running
mqsc_file: 'commfile.in'
Note: Exeption classes AnsibleExitJson
and AnsibleFailJson
should be set. See test_queue_manager.py
for reference.
def test_delete_qm(self):
set_module_args({
'qmname': 'qm1',
'state': 'absent',
'description': 'testing',
'unit_test': True
})
with self.assertRaises(AnsibleExitJson) as result:
queue_manager.main()
self.assertEquals(result.exception.args[0]['state'], 'absent')