New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix rocketchat module does not work with sub-directory #42750

Open
wants to merge 1 commit into
base: devel
from

Conversation

Projects
None yet
3 participants
@AmShaegar13

AmShaegar13 commented Jul 13, 2018

SUMMARY

If you setup Rocket.Chat in a subdirectory like https://example.org/chat the rocketchat notifications module has to be configured like so:

rocketchat:
  domain: example.org/chat

Which is not intuitive. I added an optional path defaulting to / to address this.

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

rocketchat

ANSIBLE VERSION
ansible 2.7.0.dev0 (fix_rocketchat_no_subdir 5644c1c6f6) last updated 2018/07/13 17:16:35 (GMT +200)
  config file = None
  configured module search path = [u'/home/idev/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /home/idev/ansible/lib/ansible
  executable location = /home/idev/ansible/bin/ansible
  python version = 2.7.9 (default, Jun 29 2016, 13:08:31) [GCC 4.9.2]
ADDITIONAL INFORMATION

Currently, rocketchat is broken in devel due to this. I hope it will be fixed but in case it's not I added method='POST' to fetch_url so that my branch is working and you can test the change.

- name: Send notification message via Rocket Chat all options
  rocketchat:
    domain: chat.example.com
    path: /sub-dir
    token: thetoken/generatedby/rocketchat
    msg: '{{ inventory_hostname }} completed'
    channel: #ansible
    username: 'Ansible on {{ inventory_hostname }}'
    icon_url: http://www.example.com/some-image-file.png
    link_names: 0
  delegate_to: localhost
@ansibot

This comment has been minimized.

Contributor

ansibot commented Jul 13, 2018

@ansibot

This comment has been minimized.

Contributor

ansibot commented Jul 13, 2018

The test ansible-test sanity --test validate-modules [explain] failed with 1 error:

lib/ansible/modules/notification/rocketchat.py:0:0: E309 version_added for new option (path) should be 2.7. Currently 0.0

click here for bot help

@AmShaegar13 AmShaegar13 force-pushed the 1and1:fix_rocketchat_no_subdir branch Jul 13, 2018

@s-hertel s-hertel removed the needs_triage label Jul 13, 2018

@ansibot ansibot added the stale_ci label Jul 21, 2018

abadger added a commit to abadger/ansible that referenced this pull request Jul 23, 2018

@AmShaegar13 AmShaegar13 force-pushed the 1and1:fix_rocketchat_no_subdir branch to 7529e85 Aug 20, 2018

@AmShaegar13

This comment has been minimized.

AmShaegar13 commented Aug 20, 2018

Undid workaround for upstream bug with fetch_url and rebased onto devel.

@ansibot ansibot removed the stale_ci label Aug 20, 2018

@ansibot ansibot added the stale_ci label Aug 28, 2018

@ansibot

This comment has been minimized.

Contributor

ansibot commented Nov 25, 2018

The test ansible-test sanity --test validate-modules [explain] failed with 1 error:

lib/ansible/modules/notification/rocketchat.py:0:0: E309 version_added for new option (path) should be 2.8. Currently 2.7

click here for bot help

@ansibot ansibot added the stale_ci label Dec 4, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment