forked from evolvingweb/puppet-apt
-
Notifications
You must be signed in to change notification settings - Fork 462
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Convert to use apt::setting instead of file resources
This adds consistency across the module
- Loading branch information
Morgan Haskel
committed
Feb 25, 2015
1 parent
1c0c6f1
commit 351c8d5
Showing
7 changed files
with
52 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,13 @@ | ||
define apt::conf ( | ||
$content, | ||
$ensure = present, | ||
$priority = '50' | ||
$priority = '50', | ||
) { | ||
|
||
file { "${apt::conf_d}/${priority}${name}": | ||
ensure => $ensure, | ||
content => template('apt/_header.erb', 'apt/conf.erb'), | ||
owner => root, | ||
group => root, | ||
mode => '0644', | ||
apt::setting { "conf-${name}": | ||
ensure => $ensure, | ||
base_name => $name, | ||
setting_type => 'conf', | ||
priority => $priority, | ||
content => template('apt/_header.erb', 'apt/conf.erb'), | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
With that change, apt::setting is called with "undef" priority param, so it seems that the default value is used ('50'). Due to that, after the upgrade of the module from 1.8.0 to 2.1.1, all my existing pref files have been kept but new files with 50xxx have been created.
I think the old behavior should be kept or the old files should be renamed...
Same issue with the *.pref extension (see #554 )