apt::force: Added 2 parameters for automatic configuration file handling; fixes ...
authorMartin Seener <martin.seener@barzahlen.de>
Fri, 5 Sep 2014 08:14:08 +0000 (10:14 +0200)
committerMartin Seener <martin.seener@barzahlen.de>
Mon, 22 Sep 2014 17:53:45 +0000 (19:53 +0200)
commit93567aef4a376b97d2dc71a0e6eb14a96b201a6e
treed661e2c1707bc6bc813b85a276c2b3ea50c115b6
parent932c3a7e6bb4632c42336699c9b798c4b86088b0
apt::force: Added 2 parameters for automatic configuration file handling; fixes #modules-1306

when updating or installing newer packages with apt::force and you have changed previous
configuration files aptitude or apt-get will prompt what to do. You can suppress that
by pre-define the action with cfg_files parameter (new, old or unchanged and its backward
compatible if not defined). With a second optional parameter cfg_missing you can force
your provider to install missing configuration files as well.

Signed-off-by: Martin Seener <martin@seener.de>
apt::force: Changed selectors used in force.pp to case statements; refs #module-1306

Signed-off-by: Martin Seener <martin@seener.de>
apt::force: rspec: fixed the failing tests and added validate_re for cfg_files and validate_bool for cfg_missing. Also removed default values for both case statements and only allow pre-defined values or true/false. Furthermore enhanced the README refs #module-1306

Was able to fix the failing rspec tests for the patch.
Thanks to Morgan Haskel.

Signed-off-by: Martin Seener <martin@seener.de>
Despite the puppetlabs-stdlib documentation says validation_re supports 3 arguments the tests failed telling that only 2 are supported. Fixed this by removing the 3 optional argument; refs #modules-1306

Signed-off-by: Martin Seener <martin.seener@barzahlen.de>
apt::force: updated readme refs #module-1306

Signed-off-by: Martin Seener <martin@seener.de>
README.md
manifests/force.pp
spec/defines/force_spec.rb