hiera-mysql - truncated parameter

13 views
Skip to first unread message

Karel

unread,
Nov 19, 2015, 3:53:24 PM11/19/15
to Puppet Users
Hello,

I am testing the puppet forge module hiera-mysql. It works well but if I search for value that includes dots than parameter is truncated. See an example below.

Here you can see my hiera.yaml config.

hiera.yaml

---
:backends:
  - mysql

:mysql:
   :host: dbserver
   :user: dbusr
   :pass: password
   :database: db
   :port: 3306
   :query: SELECT ADSITE FROM puppetdb.ALL_SERVERS_ADSITE where servername='%{key}'
:logger: console


here is hiera lookup.

root@ubuntu:/etc/puppetlabs/code# hiera czserver1.cl.domain.com --debug
DEBUG: 2015-11-19 16:42:17 +0100: mysql_backend initialized
DEBUG: 2015-11-19 16:42:17 +0100: JDBC mode false
DEBUG: 2015-11-19 16:42:17 +0100: Using Hiera 1.x backend API to access instance of class Hiera::Backend::Mysql_backend. Lookup recursion will not be detected
DEBUG: 2015-11-19 16:42:17 +0100: mysql_backend invoked lookup
DEBUG: 2015-11-19 16:42:17 +0100: resolution type is priority
DEBUG: 2015-11-19 16:42:17 +0100: Executing SQL Query: SELECT ADSITE FROM puppetdb.ALL_SERVERS_ADSITE where servername='czserver1'
DEBUG: 2015-11-19 16:42:18 +0100: Mysql Query returned 0 rows
nil


Thanks

Karel
Reply all
Reply to author
Forward
0 new messages