Skip to content
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

grafana_team: Unable to add team with space in name #164

Closed
rsirny opened this issue Apr 23, 2021 · 2 comments
Closed

grafana_team: Unable to add team with space in name #164

rsirny opened this issue Apr 23, 2021 · 2 comments

Comments

@rsirny
Copy link

rsirny commented Apr 23, 2021

SUMMARY

grafana_team: Unable to add team with space in name

ISSUE TYPE
  • Bug Report
COMPONENT NAME

grafana_team

ANSIBLE VERSION
ansible 2.9.15
  config file = /mnt/c/myrepo/ansible.cfg
  configured module search path = ['/home/myuser/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3.9/site-packages/ansible
  executable location = /usr/bin/ansible
  python version = 3.9.0 (default, Oct  6 2020, 00:00:00) [GCC 10.2.1 20200826 (Red Hat 10.2.1-3)]
CONFIGURATION

OS / ENVIRONMENT

Fedora 33; Grafana 7.5.4

STEPS TO REPRODUCE

Run the following playbook.

The root cause is missing URL-friendly encoding in get_team function. It seems that similar issue has been reported and fixed for grafana_folder module.

---
- hosts: localhost
  gather_facts: no
  become: no
  tasks:
  - name: Add teams
    community.grafana.grafana_team:
      grafana_url: "{{ grafana_base_uri }}"
      grafana_user: "{{ grafana_admin_user }}"
      grafana_password: "{{ grafana_admin_password }}"
      name: "Team With Space"
      email: ""
      state: present
EXPECTED RESULTS

Team "Team With Space" with space in name is created.

ACTUAL RESULTS

Add team step fails with message "Grafana Teams API answered with HTTP -1".

PLAY [localhost] ************************************************************************************************************************************************************************************************
TASK [Add teams] ************************************************************************************************************************************************************************************************fatal: [localhost]: FAILED! => {"changed": false, "msg": "Grafana Teams API answered with HTTP -1"}

PLAY RECAP ******************************************************************************************************************************************************************************************************localhost                  : ok=0    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0
@CWollinger
Copy link
Contributor

Should be fixed with #169

@Nemental
Copy link
Collaborator

Nemental commented Jan 4, 2024

Can be closed - fixed by #169 and also tested by changes in #328

@Nemental Nemental closed this as completed Jan 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants