Virtual concat fragment resource error

asked 2014-10-31 15:43:16 -0500

Glueon gravatar image

Found a strange behavior which caused me to spend quite a time to figure out what is the problem. Suppose I forgot to mention target in a non-virtual concat::fragment I'll get an error:

Error: Must pass target to Concat::Fragment

But in such a case when concat::fragment is exported:

    @@concat::fragment { "$::fqdn" :
        content => "server $ip:$port;",
        tag => 'nginx-backend',
    Concat::Fragment <<| tag == 'nginx-backend' |>> { target => 'nginx-backend' }

I will receive no warnings at all and exported resource will not be added to be puppetDB. If I add target to concat::fragment everything works normally.

Isn't that a bug? Or it's impossible to handle such errors?

edit retag flag offensive close merge delete