Ask Your Question
0

collected resource as define type dependency

asked 2015-03-05 20:15:23 -0500

lupin gravatar image

Hi,

As per the subject, is this possible?

I have a a define type.

define service_common {
  exec { 'starter':
     command => 'foo',
}

then I have exported a resource from server B.

@@File { '/var/tmp/flag.txt':
 tag => 'alert_flag',
}

on my class definition I have

File <<| tag == 'alert_flag' |>>

service_common { $array:
 require => '/var/tmp/flag.txt',

}

I got the following error:

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Invalid relationship: Service_common[foo] { require => File[/var/tmp/flag.txt] }, because File[/var/tmp/flag.txt] doesn't seem to be in the catalog

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2015-03-06 12:37:13 -0500

lavaman gravatar image

updated 2015-03-06 13:05:37 -0500

I think you would need to order the collector:

File <<| tag == 'alert_flag' |>> -> Service_common[$array]

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2015-03-05 20:15:23 -0500

Seen: 201 times

Last updated: Mar 06 '15