HI
So got this to work
volume_group { 'vg_pgdata':
ensure => present,
physical_volumes => '/dev/sdc1'
}
logical_volume { 'lv_pgdata92':
ensure => present,
volume_group => 'vg_pgdata',
require => Volume_Group['vg_pgdata'],
}
Also found out that I can't have spaces between File and [
so
File[ is difference from File [
Not sure I fully understand the <resource>[] and the difference between
<resource>{ '':}
A
On Wednesday, 17 August 2016 09:44:42 UTC+10, Alex Samad wrote:
>
> Hi
>
> Just tried this
>
>
> logical_volume { 'lv_pgdata92':
> ensure => present,
> volume_group => 'vg_pgdata',
>
> requires => volume_group { 'vg_pgdata':
> ensure => present,
> physical_volumes => '/dev/sdc1'
> }
>
> Got this
> Error: Could not retrieve catalog from remote server: Error 400 on SERVER:
> Evaluation Error: Error while evaluating a Resource Statement, Syntax error
> at '{' at
> /etc/puppetlabs/code/environments/testing/site/profile/manifests/ybpostgresql92.pp:51:32
>
> on node bitbucket.yieldbroker.com
> W
>
>
> On Wednesday, 17 August 2016 09:27:29 UTC+10, Alex Samad wrote:
>>
>> Okay
>>
>> that sounds okay, how do I add fatal call to it to stop it processing any
>> more
>>
>> Alex
>>
>> On Tuesday, 16 August 2016 17:53:33 UTC+10, Gavin Williams wrote:
>>>
>>> Alex
>>>
>>> You're looking for 'Requires' - See
>>> https://docs.puppet.com/puppet/latest/reference/lang_relationships.html
>>>
>>> Basically, you can add "requires => Logical_Volume['lv_pgdata']" to the
>>> 'postgresql::server' class, and if the Logical_Volume resource fails for
>>> whatever reason, then the 'postgresql::server' class will be skipped...
>>>
>>> HTH
>>>
>>> Gav
>>>
>>>> [snip]
>>>>
>>>
--
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/b6ea0bad-ef0b-4e5b-85af-3bd6bbba7b03%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.