Here's the function:

module Puppet::Parser::Functions
  newfunction(:fact_to_array, :type => :rvalue) do |args|
    args[0].split(',')
  end
end

Here's the class I'm trying to use it in:

class oms::all_config {
  file { '/var/lib/oms/config':
    source => 'puppet:///deployment/deployment',
    recurse => true,
    purge => true,
    force => true,
    ignore => fact_to_array('DIR_1,DIR_2,DIR_3'),
    require => Class['oms::oms_directory'],
  }
}

Getting the following error when trying to run puppet agent --test on a 
remote agent:

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: 
Function 'fact_to_array' does not return a value at 
/etc/puppet/modules/oms/manifests/init.pp:13 on node oms-2787

I'm out of ideas as to why is it not working. Will appreciate any help on 
this.
Thanks ahead

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


Reply via email to