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

Add optional notify_update parameter #31

Merged
merged 3 commits into from
Oct 23, 2015
Merged

Add optional notify_update parameter #31

merged 3 commits into from
Oct 23, 2015

Conversation

clauded
Copy link
Contributor

@clauded clauded commented Oct 16, 2015

In our environment we make sure apt_update is ran before any packages is installed with the following:
Exec['apt_update'] -> Package <| |>

With this statement, a dependency cycle is created:
(Exec[apt_update] => Package[unattended-upgrades] => Apt::Conf[unattended-upgrades] => Apt::Setting[conf-unattended-upgrades] => File[/etc/apt/apt.conf.d/50unattended-upgrades] => Class[Apt::Update] => Exec[apt_update])

It's possible to call apt::conf (v2.2.0 or later) and not run apt_update by specifying 'notify_update => false'. This avoids our dependency problem.

This PR adds an optional parameter 'notify_update' to init.pp (if the parameter is not specified, the defaults applies and apt_update is notified). The parameter can be undef (default), true or false.

@@ -5,6 +5,6 @@ fixtures:
ref: "4.6.0"
apt:
repo: "puppetlabs-apt"
ref: "2.0.0"
ref: "2.2.0"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what does this mean for our own version?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't believe our dependencies have any bearing on semver progression. If this change requires a bump, we bump. Updates of our version are just determined by the nature of the change itself.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm given more thought, I'm not so sure anymore. But a minor update in a dependency should not cause issues for (m)any users.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A user upgrading this module without upgrading the apt module (using r10k for example) will get an error at execution (invalid parameter). The change should be well documented in the changelog.

@chrisjohnson1988
Copy link

I have hit this issue to. I got around it by adding:

Apt::Conf<|tag=='unattended-upgrades'|> {
    notify_update => false
}

in our manifest which include unattended-upgrades. A little obscure, so +1 for this pull request.

igalic added a commit that referenced this pull request Oct 23, 2015
Add optional notify_update parameter
@igalic igalic merged commit e2c493f into voxpupuli:master Oct 23, 2015
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