Hi all!

How i may use in legacy puppet (0.24.[89]) custom facts in functions?
In new documentation not good faq about this:
http://docs.reductivelabs.com/guides/plugins_in_modules.html  this
documentation has information about new versions (25.5) and very old
(prior 0.24.4),
not about our 0.24.8 >>>> 0.24.9 (we in migration now, we don'nt may
change version to 25.[0-9] in production now becouse compability)

Also i try http://projects.puppetlabs.com/projects/puppet/wiki/Adding_Facts
my version of puppet don't know key of t  and, my puppet don't retrive
facts. I'm put facts in dir:
/<module>/plugins/facter
also, i have module mod_mysql, and put fact:
/path_to_modules_of_this_enviroment/mod_mysql/plugins/facter/mysql.rb
http://paste.org.ru/?0rs4fb but client does'nt see this fact

i add in config of this enviroment option of pluginsync
also, i try add this fact in dir: /usr/lib/ruby/site_ruby/1.8/facter
manually.

Config of puppet enviroment and code of fact:

[r...@puppet2 facter]# cat /var/lib/puppet/modules/modules_development/
mod_mysql/plugins/facter/mysql.rb
Facter.add("mysql_exists") do
    ENV["PATH"]="/bin:/sbin:/usr/bin:/usr/sbin"

    setcode do
        mysqlexists = system "which mysql > /dev/null 2>&1"
        ($?.exitstatus == 0)
    end
end
[r...@puppet2 facter]#

[r...@puppet2 facter]# cat /etc/puppet/puppet.conf | grep -A4 "\
[development"
[development]
pluginsync = true
    modulepath = /etc/puppet/projects:/var/lib/puppet/modules/
modules_development
    manifest   = /etc/puppet/manifests/development_site.pp

[r...@puppet2 facter]#

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-us...@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