Closed RobertFloor closed 2 years ago
Hi, thanks for the fixes. I was trying the latest version in main. I ran the playbook again and it went a little bit further. However, it failed at another task (I removed the no_log settings for this task):
< TASK [amq_broker : Configure users] >
-------------------------------------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||
fatal: [192.168.2.211]: FAILED! => {"msg": "Failed to get information on remote file (/opt/amq/amq-broker/etc/artemis-users.properties): Permission denied"}
fatal: [192.168.2.212]: FAILED! => {"msg": "Failed to get information on remote file (/opt/amq/amq-broker/etc/artemis-users.properties): Permission denied"}
These are the permissions for the etc
folder:
[root@amq1 etc]# ll
total 44
-rw-r--r--. 1 amq-broker amq-broker 966 Sep 2 07:38 artemis-roles.properties
-rw-r--r--. 1 amq-broker amq-broker 1166 Sep 2 07:38 artemis-users.properties
-rw-r--r--. 1 amq-broker amq-broker 3101 Sep 2 07:38 artemis.profile
-rw-r--r--. 1 amq-broker amq-broker 1521 Sep 2 07:38 bootstrap.xml
-rw-r--r--. 1 amq-broker amq-broker 12150 Sep 2 07:38 broker.xml
-rw-r--r--. 1 amq-broker amq-broker 1316 Sep 2 07:38 jolokia-access.xml
-rw-r--r--. 1 amq-broker amq-broker 3259 Sep 2 07:38 logging.properties
-rw-r--r--. 1 amq-broker amq-broker 1086 Sep 2 07:38 login.config
-rw-r--r--. 1 amq-broker amq-broker 2364 Sep 2 07:38 management.xml
I am running Ansible with the default user for Ansible. I don't know if this meant to be?
SUMMARY
The default installation makes root the owner of the folder /opt/amq/amq-broker and its subfolder. I believe the amq-broker user should be the owner of this directory. The ownership by root creates a problem when running the task that masks the passwords (actual command: /opt/amq/amq-broker/bin/artemis mask -- amq-broker)
ISSUE TYPE
ANSIBLE VERSION
COLLECTION VERSION
STEPS TO REPRODUCE
Run the playbook as specified in the readme:
ansible-playbook -i hosts_vagrant.yml activemq.yml -v
It fails on this task:
EXPECTED RESULTS
ACTUAL RESULTS
< TASK [amq_broker : Get masked password for user] >
I believe it is caused by the ownership of the amq-broker directory by root