I got the following lines in Hiera:
# My hash array
somehash::somevalues:
# NODE1 - ukdc1-c1-pscn01 -- 172.19.128.2 - below
FIRSTARTEFACT1:
artefact: FIRSTARTEFACT
order: ??????
SECONDARTEFACT:
artefact: SECONDARTEFACT
order: FIRSTARTEFACT1
THIRDARTEFACT:
artefact: THIRDARTEFACT
order: SECONDARTEFACT
and from those I have created resources:
create_resources(something, $ransomething)
When I try to deploy this in order (from top to bottom – although this may not be clear from the listing here), I use something like:
I use exec of course – sample of this is below:
exec { " something _${name}":
command => $some_command_here,
require => something [$order],
creates => some entry here
}
but what do I need to put in Hiera file, on the FIRST hash – where the question marks are in my example?
If I put the name of the first component - in this case: FIRSTARTEFACT1 - I got an error message like this:
Error: Could not apply complete catalog: Found 1 dependency cycle:
If I leave this field empty, it also causes an error....
Hope I have presented the problem clearly….
Can you help me out with this issue?
On 05/06/2014 06:04 PM, Marcin wrote:
> I use exec of course – sample of this is below:
>
> exec { " something _${name}":
>
> command => $some_command_here,
>
> require => something [$order],
>
> creates => some entry here
>
> }
>
>
>
> but what do I need to put in Hiera file, on the FIRST hash – where the
> question marks are in my example?
>
Hi,
use an empty string and build this slightly differently:
exec { " something _${name}":
command => $some_command_here,
creates => some entry here
}
if something[$order] {
Exec["something_${name}"] { require => something [$order] }
}
But I've got to add - this design feels very hacky. Are you sure you
want to do things this way? It will be horrible to maintain.
If you can explain the whole problem you are solving, someone may have a
suggestion on how to design the solution in a more straight-forward fashion.