Commit graph

486 commits

Author SHA1 Message Date
intrigeri
8723519f0f Fix newly introduced white-space issues. 2016-06-29 18:21:19 +00:00
Tech SOGEECOM
05ca5b0a05 ident the upgrade notices correctly 2016-06-29 13:59:51 -04:00
Tech SOGEECOM
5a7336ad47 fix formatting errors 2016-06-29 13:55:29 -04:00
Tech SOGEECOM
419f9e4601 add back the parts of the README that were lost 2016-06-29 13:42:41 -04:00
Tech SOGEECOM
eedc5eef88 fix 🔑 in Gitlab markdown 2016-06-29 12:01:18 -04:00
Tech SOGEECOM
0250f57b82 use the same style for all the examples 2016-06-29 12:00:21 -04:00
Gabriel Filion
2bbfe8cab9 Fix some minor lint issues
This was shown by the testing that was added in merge request !34
2016-06-29 17:31:14 +02:00
Gabriel Filion
354bada721 Merge remote-tracking branch 'varac/beaker' into blah
The README file has been changed, use the new syntax to match the rest
of the file.
2016-06-29 17:05:54 +02:00
intrigeri
a875536532 Merge remote-tracking branch 'lelutin-gitlab/backports_follow_debian_url' into shared-master 2016-06-29 14:53:57 +00:00
Gabriel Filion
8859eba152 add an upgrade notice about the change of default value for $repos 2016-06-29 16:45:22 +02:00
Gabriel Filion
8727cf7b8b Merge branch 'master' into backports_follow_debian_url
The README file was changed on the master branch and we'd like to change
it to add an upgrade notice.
2016-06-29 16:41:29 +02:00
Jérôme Charaoui
53c49fe2ae Merge branch 'merge_debian_preferences_templates'
Conflicts:
	manifests/preferences.pp
	templates/Debian/preferences_jessie.erb
	templates/Debian/preferences_squeeze.erb
	templates/Debian/preferences_wheezy.erb
2016-06-29 16:35:17 +02:00
Gabriel Filion
5d95c3f5e7 README: make examples more compact
also, use commas instead of semi-colon at the end of resources to use a
coding style that makes things more extensible.
2016-06-27 23:47:43 +02:00
Gabriel Filion
bb823a23f8 extraneous space in subsection title 2016-06-27 23:47:14 +02:00
LeLutin
e18dfe91a3 Merge branch 'master' into 'master'
Update the README to use markdown

This module's documentation is pretty good, but god plain text is awful when a document gets this long.

I _really_ dislike Gitlab's markdown flavor, but IMHO bad markdown is better than no markdown.

You can see the result here: https://gitlab.com/sogeecom/apt/blob/master/README.md

--
pollo

See merge request !41
2016-06-27 21:39:02 +00:00
Gabriel Filion
0752201ce4 push logic behind apt::repos back in apt::params
The logic in specifying the default value for apt::repos is in the wrong
place: it should be in apt::params since this is exactly what this
latter class is for.

There's no special case that can involve making default the value follow
the value of another parameter so there's no point in having that logic
in the main class.
2016-06-27 15:41:19 +02:00
Gabriel Filion
770f8fb5da make backports_url follow debian_url by default
backports_url was already set to the same value than debian_url by
default, but it was set to the default value of debian_url. this meant
that when giving a url to the debian_url parameter to the apt class, the
backports_url would not follow and would still be using the default
value for debian_url.

with this change, when backports_url is not specified, but debian_url
is, then both of them take on the value given to the debian_url. of
course if backports_url is also given a value, then it keeps the value
given by the user.
2016-06-27 15:39:51 +02:00
Louis-Philippe Véronneau
3abd96bb65 use the same code indenting (Puppet's code guideline one) everywhere to uniform 2016-04-27 15:12:19 -04:00
Louis-Philippe Véronneau
ec3bceff10 syntax highlighting 2016-04-27 15:00:35 -04:00
Louis-Philippe Véronneau
b45d09561e typo (tris?) 2016-04-27 14:38:47 -04:00
Louis-Philippe Véronneau
cfb1eefa1d typo (bis) 2016-04-27 14:33:08 -04:00
Louis-Philippe Véronneau
511cd83922 typo 2016-04-27 14:31:20 -04:00
Louis-Philippe Véronneau
fca9b745ea README is now markdown 2016-04-27 14:29:00 -04:00
Louis-Philippe Véronneau
d7c9feda05 README is now markdown 2016-04-27 14:28:47 -04:00
Micah
8c8bd7bb1e Merge branch 'remove_loglevel_info' into 'master'
Remove loglevel directive from Exec[update_apt]

When using puppet apply (v 3.7), loglevel 'info'
won't show the output on error. This is bad for
debugging.

micah, assigning to you because this has already bitten me while debugging a failed `apt-get update` for the leap_platform.

See merge request !39
2016-02-26 09:39:42 +00:00
varac
7714aa0436 Remove loglevel directive from Exec[update_apt]
When using puppet apply (v 3.7), loglevel 'info'
won't show the output on error. This is bad for
debugging.
2016-02-25 19:59:58 +01:00
varac
6ba1b097c2 Merge branch 'unatt_upg_logdir' into 'master'
Manage unattended-upgrades log directory

In some situations, the log directory for unattended-upgrades might not
exist. In those cases, packages will not get upgraded!

unattended-upgrades crashes with a python backtrace because the log dir
is not present.

See merge request !38
2016-02-02 22:22:47 +00:00
Gabriel Filion
c4a0aff2af Manage unattended-upgrades log directory
In some situations, the log directory for unattended-upgrades might not
exist. In those cases, packages will not get upgraded!

unattended-upgrades crashes with a python backtrace because the log dir
is not present.
2016-02-02 17:07:21 -05:00
varac
207218cee8 [refactor] Get rid of the disable_update parameter
The `disable_update` parameter has been removed. The main apt class
defaults to *not* run an `apt-get update` on every run anyway so
this parameter seems useless.
You can include the `apt::update` class if you want it to be
run every time.
2016-02-01 20:42:37 +01:00
varac
d2ae98e89b [feat] Remove apt-get autoclean from apt::update
`apt-get autoclean` should not be run on every puppetrun when
including `apt::update`, but rather be configured as a `APT::Periodic`
task that is run by cron, see
https://wiki.debian.org/UnattendedUpgrades.
2016-02-01 20:25:50 +01:00
varac
f12b007edd [refactor] Unify apt-get update into one resource
Before, there were two Execs that did an `apt-get update`,
`Exec[refresh_apt]` and `Exec[apt_updated]`, which were triggered
by different resources.
This changes gets rid of the first one, and all resources now depend
on `Exec[apt_updated]`.
2016-02-01 20:25:46 +01:00
varac
fa1751c4de [bug] Deploy preferene snippets before apt_refresh
When pinning packages with apt::preferences_snippet,
we need to make sure these get deployed before an
`apt-get update` is triggered, so pinned packages can
get installed in the right way with a single puppetrun.
2016-01-05 20:04:10 +01:00
varac
005f06f3dd [tests] Use beaker+docker for acceptance tests
Beaker together with docker is a very fast way to do
acceptance testing.
This commit adds basic beaker/docker support:

- Add a debian jessie nodeset
- Test if the module applies idempotentially, so it doesn't
  change resources on a second run with the same parameters.

https://github.com/puppetlabs/beaker/blob/master/docs/Docker-Support.md
2015-12-20 22:46:54 +01:00
Micah
185ac30062 Merge branch 'gitlab_ci' into 'master'
[feat] Enable gitlab CI builds, simplify Gemfile

Test this module using existing rspec test, using gitlab CI on gitlab.com shared runners.

See https://gitlab.com/varac/apt/builds/473836 for the CI build of this merge req.

See merge request !33
2015-12-20 21:36:20 +00:00
varac
275ca2e4cf [feat] Enable gitlab CI builds, simplify Gemfile 2015-12-19 00:25:05 +01:00
ng
c410b5c8de Merge branch 'remove_double_apt_get_update' into 'master'
[feat] Don't run an additional apt-get update

When adding custom keys, an additional `apt-get update` would
be run before the Exec['refresh_apt'], which don't make sense.

See merge request !31
2015-12-16 07:39:12 +00:00
varac
d67dfe4beb [feat] Don't run an additional apt-get update
When adding custom keys, an additional `apt-get update` would
be run before the Exec['refresh_apt'], which don't make sense.
2015-12-13 17:56:17 +01:00
varac
abe5212b01 Fix require path for ubuntu_nextcodename.rb 2015-12-07 22:09:42 +01:00
varac
2c656517bd [rspec] extend test for custom facts 2015-12-07 21:54:49 +01:00
varac
5381cb7b61 [bug] Fix debian_nextcodename on wheezy hosts
I noticed this behaviour because $::debian_nextcodename was
"squeeze" on a wheezy host.
For debugging, i inserted a "puts codenames" in
lib/facter/debian_nextcodename.rb, and it turned out that it
was sorted differently on wheezy and jessie hosts:

On wheezy:

    buster
    stretch
    jessie
    wheezy
    squeeze
    lenny

On jessie:

    lenny
    squeeze
    wheezy
    jessie
    stretch
    buster

So i decided to rewrite this so this doesn't happen again.
2015-12-07 19:43:31 +01:00
varac
bf4daa73b1 [docs] Add test docs how to use custom facter/puppet version 2015-12-07 14:36:48 +01:00
varac
a70c52c1d4 Fix loading of util/debian.rb for custom facts
requirering the facter/util/debian.rb module causes
puppet warnings on wheezy hosts, and custom facts like
`$::debian_codename` cannot be evaluated.

    warning: Could not load fact file
      /srv/dev/projects/puppet/shared-modules//apt/lib/facter/debian_nextcodename.rb:
      no such file to load -- facter/util/debian

Removing the require line solves this.
2015-12-07 14:27:04 +01:00
varac
6b27efb434 Add inital puppet rspec test for custom facts 2015-12-07 13:29:41 +01:00
Micah
d372562329 Merge branch 'support_missing_ubuntu_releases' into 'master'
[feat] Support vivid, wily, xenial ubuntu release



See merge request !27
2015-12-04 21:27:26 +00:00
Gabriel Filion
2942cd0dd8 remove requirement on lsb package for sources.list file
Managing requirements for installing the lsb package has proven over
time to make no sense. The best approach to this is to require
lsb-release to be installed alongside puppet, since otherwise there are
so much facts that get no value during the run and you end up needing to
run puppet twice to get the real end result.

Also, since we're not including a class that is actually installing the
'lsb' package, that require line makes it so that including the apt
module doesn't work, and there's no documentation in the README about
needing to provide a package{'lsb':} resource with the apt class.

Because of all that, it makes more sense to just get rid of that require
line and mark lsb as a pre-requirement in the README file.
2015-12-04 14:35:27 -05:00
Jerome Charaoui
4d3b720308 Simplify conditional expressions 2015-12-04 12:36:25 -05:00
Jerome Charaoui
f492e5840b Switch old $release and $codename local variables to new debian_* facts 2015-12-04 12:36:25 -05:00
Antoine Beaupré
e4a9222d86 move backports to snippets
this allows for third party modules to enable this on the fly
2015-12-04 12:36:25 -05:00
Gabriel Filion
bfa973a668 Use $ubuntu_url as default value of $backports_url on Ubuntu
Ubuntu shouldn't be using debian backports by default.

This was written by Anoine Beaupré, but split from the commit "move
backports to snippets" since the change is unrelated and needs to be
more visible in the commit history.
2015-12-04 12:36:25 -05:00
varac
b5c65e29f1 [feat] Support vivid, wily, xenial ubuntu release 2015-11-02 23:50:08 +01:00