简体   繁体   中英

puppet unkown function validate

I have imported this module requiretty for sudoers for puppet from requiretty

i have done a test on validate function and it does not give any error when doing an irb check.

[root@yeovil functions]# irb
irb(main):001:0> require 'puppet'
=> true
irb(main):002:0> require  '/var/lib/puppet/parser/functions/validate.rb'
=> true
irb(main):003:0> Puppet::Parser::Functions.function(:validate)
=> "function_validate"
irb(main):004:0> "function_validate"
=> "function_validate"
irb(main):005:0> 
[2]+  Stopped    

         irb

however when I run " puppet agent -t " it returns

"Could not retrieve catalog from remote server: Error 400 on SERVER: Unknown function validate "

UPDATE:

fixed it by creating

{modulepath}/{module}/lib/puppet/parser/functions

but now get this error

SERVER: Can't synthesize edge: Sudo::Requiretty[kshk] -notifies- requiretty is being called (param notify)

固定:删除模块后在模块定义中有一个通知条目

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM