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

Forcing apt-update on Debian causes hosts to be considered 'Changed' #132

Closed
gfokkema opened this issue Jul 13, 2016 · 9 comments
Closed

Comments

@gfokkema
Copy link

When using this module in conjunction with Puppetboard, using notify to enforce an apt-update causes a hosts to consider itself to have changes.
See code.

The enforced apt-update seems to apply as well when the puppet agent is already at the target version.
Therefore, when using this module, every host in my environment is reporting to have applied changes every puppet run.

@MikaelSmith
Copy link
Contributor

May be able to change that to a subscribe. It should happen only if the repo config changes, or if a newer version is specified in the class parameters.

@Hakon
Copy link

Hakon commented Jan 16, 2017

Wouldn't it suffice to let the package resource require => Apt::Source['pc_repo'] on debian?

@MikaelSmith
Copy link
Contributor

I think there was previously an issue in how containment worked that made the refresh happen too late. I'll have to retest it.

jghward pushed a commit to jghward/puppetlabs-puppet_agent that referenced this issue Mar 9, 2017
@jghward
Copy link
Contributor

jghward commented Mar 10, 2017

I worked around this in the above commit by changing the Notify resource to an Exec, allowing me to use the refreshonly param. Happy to submit as a pull request if it's an acceptable solution.

@MikaelSmith
Copy link
Contributor

That seems interesting, I'd love to see it.

@MikaelSmith
Copy link
Contributor

Also filed as MODULES-4171.

@sigv
Copy link

sigv commented Mar 22, 2017

apt::source appears to have notify_update since 2.3.0 - that is the latest release, released in September 2016. Why not use that instead of this custom notify/exec flow?

@MikaelSmith
Copy link
Contributor

I wasn't aware of it, I'll take a look. Thanks!

@sigv
Copy link

sigv commented Mar 22, 2017

Behind the scenes, it seems to just add a notify => Class['apt::update'] to the sources.list file and I haven't tested out how will fare here, but it seems to be made just for the use case here - running apt update after having added the source..

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

5 participants