Quantcast
Channel: Ask Puppet: Puppet DevOps Q&A Community - RSS feed
Viewing all articles
Browse latest Browse all 6104

split function not accept by puppet

$
0
0
Hi, I got below error when I rspec-puppet /opt/puppetlabs/puppet/bin/bundle exec rake spec Puppet::PreformattedError: Evaluation Error: Error while evaluating a Function Call, 'split' parameter 'str' expects a String value, got Undef at /root/modules_new/module_name/spec/fixtures/modules/module_name/manifests/params.pp:29:17 on node. when I open the code it contain. class module_name::params{ $tmp1 = split($::blockdevices, ',') $tmp2 = grep($tmp1, 'sd') $count =count(tmp2) } The code take the node disk count. below is my gem list /opt/puppetlabs/puppet/bin/gem list bigdecimal (1.2.4) bundle (0.0.1) bundler (1.12.5) hiera (3.0.5) puppet (4.3.1) puppet_forge (2.1.1) r10k (2.1.1) rake (10.1.0) rdoc (4.1.0) rest-client (1.6.9) rugged (0.21.4) semantic_puppet (0.1.0) stomp (1.3.3) test-unit (2.1.7.0)

Viewing all articles
Browse latest Browse all 6104

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>