Skip to content

Commit a6fd6ac

Browse files
Added create mqm user and group to setup users, changed IBM MQ version to 9.3.1
1 parent 346492a commit a6fd6ac

5 files changed

Lines changed: 29 additions & 22 deletions

File tree

ansible_collections/ibm/ibmmq/mq-install.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
roles:
88
- role: setupusers
99
vars:
10-
gid: 909
10+
appUid: 909
11+
appGid: 909
1112
- downloadmq
1213
- installmq

ansible_collections/ibm/ibmmq/roles/downloadmq/tasks/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
- name: Download MQ Advanced for Developers
44
get_url:
5-
url: https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/messaging/mqadv/mqadv_dev920_ubuntu_x86-64.tar.gz
5+
url: https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/messaging/mqadv/mqadv_dev931_ubuntu_x86-64.tar.gz
66
dest: /tmp/mq.tar.gz
77
force: no
88
tags: download

ansible_collections/ibm/ibmmq/roles/installmq/tasks/main.yml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -44,17 +44,6 @@
4444
apt-get update
4545
changed_when: 'installed_mq_packages.stdout_lines | string is not search("ibmmq")'
4646

47-
- name: Add the user to group mqm
48-
become: true
49-
shell: adduser ${SUDO_USER:-${USER}} mqm
50-
51-
- name: Add the user to group mqm
52-
become: true
53-
user:
54-
name: "{{ ansible_ssh_user }}"
55-
groups: mqm
56-
append: yes
57-
5847
- name: reset ssh connection
5948
meta: reset_connection
6049

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
---
22

3-
gid: 989
3+
appUid: 909
4+
appGid: 909
5+
mqmUid: 2001
6+
mqmGid: 2001
Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,28 @@
11
---
22

3+
- name: Create mqm group
4+
group:
5+
name: mqm
6+
gid: "{{ mqmGid }}"
7+
8+
- name: Create mqm user
9+
user:
10+
name: mqm
11+
uid: "{{ mqmUid }}"
12+
group: mqm
13+
14+
- name: Create an admin user
15+
user:
16+
name: mqadm
17+
groups: mqm
18+
append: yes
19+
320
- name: Add 'mqclient' group
421
become: true
522
group:
623
name: mqclient
724
state: present
8-
gid: "{{ gid }}"
25+
gid: "{{ appGid }}"
926

1027
- name: Add the user 'app' with a specific UID
1128
become: true
@@ -14,11 +31,8 @@
1431
user:
1532
name: app
1633
password: "{{ 'apppassword' | password_hash('sha512', 65534 | random(seed=inventory_hostname) | string) }}"
17-
uid: "{{ gid }}"
34+
uid: "{{ appUid }}"
1835
group: mqclient
19-
20-
- name: Create an admin user
21-
user:
22-
name: mqadm
23-
groups: mqm
24-
append: yes
36+
37+
38+

0 commit comments

Comments
 (0)