RocketChat / Rocket.Chat.Ansible

Deploy Rocket.Chat with Ansible!
MIT License
94 stars 80 forks source link

Installing Rocket.chat on CentOS7 via Ansible #82

Open herstell opened 6 years ago

herstell commented 6 years ago

Hey Guys,

i try to install rocketchat via ansible on centos7. After some obscurities with node I come to a new problem, and I dont know a solution. I installed it via documentation (https://rocket.chat/docs/installation/automation-tools/ansible/) I defined my server in my inventoryfile... everythings fine with this but after execute ansible-playbook -i inventory rocket_chat.yml I get the following error

TASK [RocketChat.Server : Unpack the Rocket.Chat binary tarball] ***************
fatal: [centos1]: FAILED! => {"failed": true, "msg": "ERROR! file or module does not exist: /var/lib/rocket.chat/rocket.chat-latest.tgz"}

PLAY RECAP *********************************************************************
centos1                    : ok=20   changed=0    unreachable=0    failed=1

The file in /var/lib exists

[root@localhost bin]# ls -lhrt /var/lib/rocket.chat/rocket.chat-latest.tgz
-rw-r--r--. 1 rocketchat rocketchat 461 May  4 02:03 /var/lib/rocket.chat/rocket.chat-latest.tgz

Whats my problem with this?

nanocat-net commented 6 years ago

Hi!

I just ran into this problem too. The role defines a fixed checksum to check the downloaded file against, and if it doesn't match, I was getting this failure.

I suppose this means that rocket.chat-latest.tgz has been re-created (updated) since that checksum was added to the role.

While I can't recommend that you do this, I worked around this on my development server by modifying the checksum defined in RocketChat.Server/defaults/main.yml to match the checksum reported by ansible (I think I needed to add -vv to my ansible command line to see enough details, including the "valid" and "invalid" checksums).

I would say that a better pinning workflow needs to be used by the maintainers of this ansible role! Otherwise people are going to start doing dirty checksum hacks on production systems ^^

HTH N

aoyawale commented 6 years ago

yes, you need to add the checksum since It has been a while and has changed. I been trying to submit PR's to fix a lot of stuff that needs but, it looks like the maintainers are not around.

Lawri-van-Buel commented 6 years ago

While i did not test it on centos check out my pull request for a new role.

https://github.com/RocketChat/Rocket.Chat.Ansible/pull/84

It checks for the cryptographically signature instead of the hash. Also it gives you the capability to change the mongodb url. (Like add ssl or use a cluster)

xenithorb commented 6 years ago

I'm around, I just haven't had time to work on it with starting new employment. Most of the work and bug fixes people are complaining about are located on this branch: https://github.com/RocketChat/Rocket.Chat.Ansible/commits/v3.1.0_updates and it's my fault for not getting it out sooner. I just need to sit down review some things and merge it, honestly.

aoyawale commented 6 years ago

@xenithorb let us know when you do so we can help further :) some of us are actively trying to make it better.