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_plugin: Add check condition when plugin version is 'latest' #53369

Open
wants to merge 2 commits into
base: devel
from

Conversation

Projects
None yet
3 participants
@charlrvd
Copy link

charlrvd commented Mar 6, 2019

SUMMARY

grafana_plugin module was updating continuously plugins when the version was set to latest

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

This is a small change for monitoring/grafana module

ADDITIONAL INFORMATION

While using the grafana_plugin module for some testing I noticed that continuous run of playbooks using it were executed on each run.
The status of the tasks would be changed on each run, making it not optimal.

Example of test that was showing the behavior:

- name: Install grafana zabbix plugin
  grafana_plugin:
    name: alexanderzobnin-zabbix-app
    version: latest
    state: present
  notify: restart grafana

Result before:

TASK [grafana : Install grafana zabbix plugin] ***********************************************************************
changed: [XX.YY.ZZ.ABC]

Result after

TASK [grafana : Install grafana zabbix plugin] ***********************************************************************
ok: [XX.YY.ZZ.ABC]
@ansibot

This comment has been minimized.

Copy link
Contributor

ansibot commented Mar 6, 2019

The test ansible-test sanity --test pep8 [explain] failed with 2 errors:

lib/ansible/modules/monitoring/grafana_plugin.py:138:1: E302 expected 2 blank lines, found 1
lib/ansible/modules/monitoring/grafana_plugin.py:154:1: E302 expected 2 blank lines, found 1

click here for bot help

@ansibot

This comment has been minimized.

Copy link
Contributor

ansibot commented Mar 6, 2019

@Akasurde Akasurde changed the title Add check condition when plugin version is 'latest' grafana_plugin: Add check condition when plugin version is 'latest' Mar 6, 2019

@resmo

resmo approved these changes Mar 6, 2019

Copy link
Member

resmo left a comment

LGTM

@ansibot ansibot removed the needs_triage label Mar 6, 2019

@ansibot ansibot added the stale_ci label Mar 14, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.