Nice, thanks!

On Tuesday, March 11, 2014 8:39:39 AM UTC-5, Craig Dunn wrote:
>
>
> Just to clarify, apt::source is a defined resource type, not a class.  
> Defined resource types can be required like any other resource, for example
>
> package { [ 'libvirt-bin', 'vzctl' ]:
>   ensure => present,
>   require => Apt::Source['openvz'],
> }
>
>
>
>
> On Tue, Mar 11, 2014 at 1:13 PM, kai <[email protected] <javascript:>>wrote:
>
>> I have the following two resources defined in a class:
>>
>> class openvz::install {
>>  $openvz_repo_key = hiera('openvz_repo_key')
>>  $openvz_repo = hiera('openvz_repo')
>>  $openvz_kernel_image = hiera('openvz_kernel_image')
>>  $openvz_kernel_headers = hiera('openvz_kernel_headers')
>>
>>
>> apt::source { "openvz":
>>
>>     location => "$openvz_repo",
>>     release => "wheezy",
>>     repos => "main",
>>     http_key => "$openvz_repo_key",
>>     http_key_server => "$openvz_repo"
>>   }
>>
>>   package {
>>     'libvirt-bin': ensure => present;
>>     'vzctl': ensure => present;
>>   }
>>
>> }
>>
>>
>> where apt:source is an external class in a module. In most cases the package 
>> resource will run before the apt::source, causing it to fail as the apt repo 
>> is not there yet. 
>> How can I make the package resource dependent on the apt::source ? I am 
>> assuming using the "require" attribute, but in this case I am not quite sure 
>> what the best practice might be. All suggestions are highly appreciated. 
>>
>>  -- 
>> 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 [email protected] <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/puppet-users/d3f57517-c5d8-424a-b1cc-479876e55804%40googlegroups.com<https://groups.google.com/d/msgid/puppet-users/d3f57517-c5d8-424a-b1cc-479876e55804%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
> *Enviatics *| Automation and configuration management
> http://www.enviatics.com | @Enviatics
> Puppet Training http://www.enviatics.com/training/
>
>  

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/fca5fa5b-ca15-44a3-8027-267f5fd9131c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to