Is there a way to define relationships between create_resources

泄露秘密 提交于 2019-12-11 08:33:24

问题


In my puppet class i use 3 create_resources. I want to execute these create_resources in order. Thus there are relationships between each other

create_resources(change_config::cr1, $resource)

create_resources(change_config::cr2, $resource)

create_resources(change_config::cr3, $resource)

cr3 should be executed after cr2 and cr2 should be after cr1.

Is there a way to do this ?

Regards, Malintha


回答1:


You can use Puppet Collectors here. Simply add this line into your manifest:

Change_config::Cr1<| |> -> Change_config::Cr2<| |> -> Change_config::Cr3<| |>

It will order all Cr1's before 2's before 3s. You can even put extra filtering inside the <| |> like

Change_config::Cr1<| title == 'some_name' |> -> Change_config::Cr1<| <| title != 'some_name' |>


来源:https://stackoverflow.com/questions/25375880/is-there-a-way-to-define-relationships-between-create-resources

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!