example42 / puppet-tp

Tiny Puppet - The Universal Installer
http://tiny-puppet.com
Apache License 2.0
68 stars 21 forks source link

malformed format string - %{ at install3.pp:122 #22

Closed amateo closed 8 years ago

amateo commented 8 years ago

I'm trying to use tp to install and configure exim in ubuntu 14.04 servers. I'm running puppet 3.8.6 and my puppetservers is an ubuntu 12.04. My puppet code is

tp::install3 {'exim':}

In the reported line, the line is:

$tp_settings=tp_lookup($title,'settings',$data_module,'merge')

Debuging the tp_lookup function I've found that the problem is trying to load the hiera.yaml file at modules/tinydata/data/exim/hiera.yaml. The content of this file is:


---
 :hierarchy:
   - "%{title}/osfamily/%{osfamily}"
   - "%{title}/default"
   - default

and the %{ shown in the error is the one for %{title}. If I remove all %{xxx} in this file then puppet works (although I'm not sure it is using the correct information for the exim configuration)

Any help? Thank you.

alvagante commented 8 years ago

Probably you have an unsupported version of ruby on the puppetmaster. Check these: https://github.com/example42/puppet-tp#prerequisites-and-limitations

amateo commented 8 years ago

You right. I'm running ruby 1.8.7 in my puppemaster:

# facter -p rubyversion
1.8.7
alvagante commented 8 years ago

If you want to experiment with tp, I suggest to do it in a Puppet 4 installation. Puppet 3 tp defines are actually more used and tested, but are less likely going to benefit of future enhancements.

amateo commented 8 years ago

I know it. My problem is that I'm now migrating from puppet 3 to puppet 4 and I need to maintain some compatibility. In fact, I'm using tp to replace some modules that are not puppet4 compatible (f.e. example42/exim that I was using now). But I could handle this in other way.