Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

how to set priority of instances in define type

I have this kind of define code: example :
define { Exec {" command1": some dependecy } Exec {" command2": some other dependency } Exec {" command3": some dependency }
Exec {" command4": some other dependency } Exec {" command5": } file { "myfile": }

My goal is to run file resource at last, after checking or executing all other Exec resourses. I want to set the priority like this - for example : Exec(command2) should run after Exec(command1), without caring if Exec(command1) failed or worked . likewise command3 should execute only after executing command 2 , inspite of command2 fails or works. I tried to use require ., ifonly and before but it gives error if any of depdency resource fails. for example if Exec (command 3) fails then Exec(command 4,5 ) wont run.

So, here my question again how to run resources in a chain,even if any link fails. My sole purpose is to run events one after another, in a chain without making them dependent on other.

how to set priority of instances in define type

I have this kind of define code: example :
define { Exec {" command1": some dependecy } Exec {" command2": command1":
some dependecy
}
Exec {" command2":
some other dependency } Exec {" command3": some dependency }
Exec {" command4":
dependency
}
Exec {" command3":
some dependency
}
Exec {" command4":
some other dependency } Exec {" command5": } dependency
}
Exec {" command5":
}
file { "myfile": }"myfile":
}

My goal is to run file resource at last, after checking or executing all other Exec resourses. I want to set the priority like this - for example : Exec(command2) should run after Exec(command1), without caring if Exec(command1) failed or worked . likewise command3 should execute only after executing command 2 , inspite of command2 fails or works. I tried to use require ., ifonly and before but it gives error if any of depdency resource fails. for example if Exec (command 3) fails then Exec(command 4,5 ) wont run.

So, here my question again how to run resources in a chain,even if any link fails. My sole purpose is to run events one after another, in a chain without making them dependent on other.