Thank you Lowe for your prompt reply.
define appneta::updatejs (
$artifact,
$jsfile,
)
{
$parent_dir = "/opt/${artifact}"
exec { "update_${parent_dir}/${jsfile}":
command => "/bin/sed -i '1 a\var tv = hello;' ${parent_dir}/${jsfile} ",
notify => Service["$artifact"],
}
}
On Wednesday, 31 August 2016 23:00:48 UTC+5:30, Lowe Schmidt wrote:
>
> Can you please show us the code for the class appneta::updatejs
>
> --
> Lowe Schmidt | +46 723 867 157
>
> On 31 August 2016 at 18:38, Afroz Hussain <[email protected]
> <javascript:>> wrote:
>
>> Hi All,
>>
>> I have a class with stage='post-10' that mean that has to executed after
>> main stage but a resource of that class getting executed twice that is
>> before main and after.
>>
>> example code as shown:
>>
>> appneta::nodejs (
>> $stage = "post-10",
>> )
>> {
>>
>> exec { 'install_agent':
>> } ->
>> Appneta::Updatejs<| tag == 'run_first' |>
>> }
>>
>>
>> Getting cyclic graph error as:
>>
>> Exec[install_agent] => Appneta::Updatejs[artifact1] => Stage[main] =>
>> Stage[post-10] => Class[Appneta::Nodejs] => Exec[install_agent])
>>
>> Any help will be appreciated!!
>>
>> Thanks,
>> Afroz
>>
>>
>> --
>> 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/05dcdc96-c2d8-4ae7-ba84-415399151295%40googlegroups.com
>>
>> <https://groups.google.com/d/msgid/puppet-users/05dcdc96-c2d8-4ae7-ba84-415399151295%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
--
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/c9eb382a-8b7b-4e0c-b68e-053c972f2a14%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.