HI,

I've foudn that the problem is where the functions are saved:
/opt/puppetlabs/puppet/cache/lib/puppet/parser/functions/
vs /opt/puppetlabs/puppet/cache/lib/puppet/functions/

If I put the functions in the first path , it works. Otherwise I see the
error mentioned in the first post.

I see functions in both paths, so I wonder why the functions from the
second are not collected.

# puppet agent --configprint libdir
> /opt/puppetlabs/puppet/cache/lib
> # rpm -qa|grep puppet
> puppet-agent-5.5.17-1.el7.x86_64


Any idea?

TIA,
Arnau


El jue., 4 jun. 2020 a las 16:09, Arnau (<[email protected]>) escribió:

> Dear all,
>
> I recently upgraded the Mysql module from version 5 to 10 :
> https://forge.puppet.com/puppetlabs/mysql
>
> I'm testing if my "old" code is still compatible with this new version but
> I'm facing and issue.
> My code looks like:
>
>
>>   mysql_user { 'nagios@localhost':
>>       ensure        => 'present',
>>       password_hash => mysql_password($nagios_passwd),
>>     }
>
>
> and the first ran said:
>
> Unknown function: 'mysql_password'
>
>
> Looking into the code
> (/opt/puppetlabs/puppet/cache/lib/puppet/functions/mysql_password.rb) it
> says :
>
> *"This method has been deprecated, please use the namespaced version
> 'mysql::password' instead."*
>
> So I update my code accordingly but now it says:
>
> Unknown function: 'mysql::password'
>
>
> I see the function in here:
> /opt/puppetlabs/puppet/cache/lib/puppet/functions/mysql/password.rb and
> also tried  mysql::mysql_password (
> https://github.com/puppetlabs/puppetlabs-mysql/blob/master/REFERENCE.md#mysqlmysql_password)
> I don't manage to make it work.
>
> What am I not seeing?
>
> TIA,
> Arnau
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAM69jx-T_J0gR2JWN5TfbrbdL-e6yQP7Unc8Y%2BH_ewHdvRh%3DDQ%40mail.gmail.com.

Reply via email to