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

Don't override package name unless "latest" #108

Merged
merged 1 commit into from
Sep 10, 2019
Merged

Don't override package name unless "latest" #108

merged 1 commit into from
Sep 10, 2019

Conversation

matttrach
Copy link
Contributor

Description of PR

Flip conditional to prevent override of package name unless 'latest' flag is given

Type of change

Bugfix Pull Request

Fixes an issue

#95

@matttrach
Copy link
Contributor Author

The failing lint test has nothing to do with my change.

    [204] Lines should be no longer than 160 chars
    /home/travis/build/dj-wasabi/ansible-telegraf/tasks/Debian.yml:68
        url: https://dl.influxdata.com/telegraf/releases/telegraf_{{ telegraf_agent_version }}-{{ telegraf_agent_version_patch }}_{{ telegraf_agent_package_arch }}.deb

@dj-wasabi dj-wasabi merged commit a4cf482 into dj-wasabi:download-from-influxdb Sep 10, 2019
@dj-wasabi
Copy link
Owner

Thanks! 👍

I'll try to fix the error tonight, as this has indeed nothing to do with your change.

@sdurrheimer
Copy link
Contributor

Hi there,

This modification is actually introducing a regression.

Before that we could use telegraf_agent_package_state: latest as a way to not take into account the often out-of-date telegraf_agent_version variable.

As influxdata repositories doesn't keep an history of the previous versions of their package, this playbook will break everytime they release a new version.

@gaelL
Copy link
Contributor

gaelL commented Sep 10, 2019

Adding some ref #92

sdurrheimer added a commit to cycloidio/ansible-telegraf that referenced this pull request Sep 10, 2019
@sdurrheimer
Copy link
Contributor

After some investigation, this PR should actually be reverted.

You can't set the fact telegraf_agent_package: telegraf={{ telegraf_agent_version }}-{{ telegraf_agent_version_patch }} when telegraf_agent_package_state: latest because it will result to the following error:

TASK [dj-wasabi.telegraf : Debian | Install Telegraf package] ******************
    FAILED - RETRYING: Debian | Install Telegraf package (3 retries left).
    FAILED - RETRYING: Debian | Install Telegraf package (2 retries left).
    FAILED - RETRYING: Debian | Install Telegraf package (1 retries left).
    fatal: [instance]: FAILED! => {"attempts": 3, "changed": false, "msg": "version number inconsistent with state=latest: telegraf=1.12.0-1"}

When telegraf_agent_package_state: latest, telegraf_agent_package should be telegraf.

@matttrach
Copy link
Contributor Author

Maybe instead of reverting this change, a new change to convert the ’telegraf_agent_package’ variable to ‘telegraf’ when latest is set?

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

Successfully merging this pull request may close these issues.

4 participants