Hello everyone,

I just encountered this and was wondering if this is expected?

defined_test.pp:
----------------

class foo {
    file { 'deftest':
        path => '/tmp/deftest.tmp',
        ensure => present,
        alias => 'aliastest'
    }
    $def_title = defined(File['deftest'])
    $def_path = defined(File['/tmp/deftest.tmp'])
    $def_alias = defined(File['aliastest'])
    notice("Results:\n\tdefined(title): ${def_title}\n\tdefined(path): 
${def_path}\n\tdefined(alias): ${def_alias}")
}

node default {
    include foo
}

----------------

This returns:

# puppet --debug ./defined_test.pp
notice: Scope(Class[foo]): Results:
        defined(title): true
        defined(path): false
        defined(alias): false
...

Is this expected?  Why would File['aliastest'] not work when referencing the 
resource for 'defined()' function call and yet it would work when referencing 
the resource in e.g. 'require' property of another resource?

Any ideas?

Thanks,

Michael

-- 
Michael Gliwinski
Henderson Group Information Services
9-11 Hightown Avenue, Newtownabby, BT36 4RT
Phone: 028 9034 3319

**********************************************************************************************
The information in this email is confidential and may be legally privileged.  
It is intended solely for the addressee and access to the email by anyone else 
is unauthorised.
If you are not the intended recipient, any disclosure, copying, distribution or 
any action taken or omitted to be taken in reliance on it, is prohibited and 
may be unlawful.
When addressed to our clients, any opinions or advice contained in this e-mail 
are subject to the terms and conditions expressed  in the governing client 
engagement leter or contract.
If you have received this email in error please notify 
supp...@henderson-group.com

John Henderson (Holdings) Ltd
Registered office: 9 Hightown Avenue, Mallusk, County Antrim, Northern Ireland, 
BT36 4RT.
Registered in Northern Ireland
Registration Number NI010588
Vat No.: 814 6399 12
*********************************************************************************


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to