Hi Haani,

On 15 Nov 2015, at 06:58, Haani Niyaz <haani.ni...@gmail.com> wrote:

> Our SOE document states that all repositories should be disabled by default 
> and enabled on installing a package. So when we write modules our package 
> resource more or less looks like this:
> 
>  package { $package_name:
>  ensure => "${package_version}-${release_version}",
>  install_options => [ {'--disablerepo' => "*"}, { '--enablerepo' => 
> "$releases_repo" } ],
>  notify => Class['::apache::service'],
>  }
> 
> In our base profile (which is included in every role) a module ensures that 
> all repos are disabled. However this has proven to be a problem when using 
> forge modules where it seems to expect the repositories will be enabled by 
> default. 
> 
> One untested suggestion was to use the package resource default statement and 
> set the install option to enable the repositories. Example shown below:
> 
> 
> class profiles::phpwebserver {
> 
>  Package{
>   install_options => [ {'--disablerepo' => "*"}, { '--enablerepo' => "*" } ],
>  }

put this resource default into site.pp
Then the resource default is set globally and not only in class namespace.

Be aware that module developers might set install_options by themselves which 
might overwrite your default setting.

Best,
Martin

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/57E9CF72-D11B-4637-85E3-E8273B6AD734%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to