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 apt_package_security_updates fact #691

Closed
wants to merge 1 commit into from

Conversation

jle64
Copy link

@jle64 jle64 commented Jul 27, 2017

Add a apt_package_security_updates fact, similar to apt_package_updates but which only lists security updates.

@@ -42,6 +42,17 @@
end
end

Facter.add("apt_package_security_updates") do
Copy link

Choose a reason for hiding this comment

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

How is this different to lines 63-67, apologies if i am missing something obvious. No caffeine yet.

@jle64
Copy link
Author

jle64 commented Aug 1, 2017

Lines 63-67 (fact apt_security_updates) are about the number of security updates (it returns apt_package_updates[1].length), this adds the list of security updates (same array but returns the content, not the length).

(there are already facts for number of updates, list of updates, number of security updates, this adds list of security updates)

@tphoney
Copy link

tphoney commented Aug 2, 2017

@jle64 Yup i agree, totally makes sense. 👍 Apologies for what i am about to ask

Could you please have a look at replicating the facter tests https://github.com/puppetlabs/puppetlabs-apt/blob/bd3b3fbe990bfa824ebed3504c0c82175d7c7ec9/spec/unit/facter/apt_package_updates_spec.rb for this new fact.

With this new fact, could you add a line or two to the readme explaining this cool new thing.

Shout if you need a hand with either of them.

@tphoney
Copy link

tphoney commented Sep 25, 2017

Thanks for the PR #703 is merged. I just added a test.

@tphoney tphoney closed this Sep 25, 2017
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.

2 participants