Commit graph

12 commits

Author SHA1 Message Date
WolverineFan
e7fee16589 Fix apt_has_updates fact not parsing apt-check output correctly
The /usr/lib/update-notifier/apt-check script returns its output
to STDERR but a recent change to the script redirects STDERR to
/dev/null.  This will cause the array to always be empty.

Combined with that problem, while we were checking for the result
being nil, we never checked for an invalid array.  As a result,
the apt_has_updates was always true and the apt_updates and
apt_security_updates facts were trying to read from an empty array
and failing.
2015-01-16 17:45:55 -05:00
Simon Kohlmeyer
b0e0024730
Allow ports that consist of 5 decimals 2015-01-08 05:26:53 +01:00
Morgan Haskel
e5338f2e53 Merge remote-tracking branch 'upstream/1.6.x' into merge_1.6.x
Conflicts:
	lib/facter/apt_package_updates.rb
	lib/facter/apt_security_updates.rb
	lib/facter/apt_updates.rb
2014-11-21 11:59:04 -05:00
Travis Fields
559787268a MODULES-1119 Fixed to now have username and passwords passed in again 2014-11-20 20:57:40 -05:00
Morgan Haskel
2fdad79f74 Fix tests to reflect behavior fixed on 1.7.x
The facts don't really work with 2>&1 in the case of an error, so you
want 2>/dev/null instead.
2014-10-27 10:10:52 -04:00
Daniele Sluijters
5d96da0c6a Merge pull request #375 from raphink/dev/facts_perfs
Refactor facts to improve performance.
2014-10-16 10:07:25 +02:00
Raphaël Pinson
d090ae4ebb Refactor facts to improve performance:
* Add an apt_has_updates boolean fact
* Make other facts depend on it
2014-10-15 15:44:50 +02:00
Morgan Haskel
febda27623 We aren't truncating in the type
So don't check for truncated IDs in the type test.
2014-10-01 13:46:14 -05:00
Wolf Noble
7a192d7bea - add bits for updating apt
- fix spec tests to include osfamily fact
- add spec tests to verify current default behavior unimpacted.
- manage the update-stamp file in puppet via content rather than a served file.
- update custom fact to return -1 if the file doesn't exist
- add spec test for custom fact
- refactor to use a variable vs a collector/override
- document parameters a bit more verbosely
- remove empty unconstrained fact
- Add osfamily fact to backports tests to facilitate functional tests on non-debian hosts
2014-09-24 16:29:27 -07:00
Damien Churchill
7eb9d00360 add facts showing available updates
Making use of the apt-check command from the 'update-notifier-common'
package (if available) display the number of available updates, number of
security updates as well as the update package names.
2014-06-27 11:21:58 +01:00
Daniele Sluijters
c3b3f5bb42 apt_key: Support fetching keys over FTP. 2014-02-21 09:06:47 +01:00
Daniele Sluijters
374101612c Add a type and provider to manage apt keys.
This commits introduces:
 * The apt_key type;
 * The apt_key provider;
 * Unit tests for the type;
 * Beaker/acceptance tests for the type/provider.

The idea behind apt_key is that apt::key will simply become a wrapper
that uses apt_key. Being a native type/provider apt_key is a lot less
error prone than the current exec behaviour of apt::key and adds a few
nice bonuses like inventory capabilities for mcollective users.
2014-02-18 22:51:08 +01:00