I can't seem to get $::processorcount to be an integer...

127 views
Skip to first unread message

Matthias Saou

unread,
Apr 16, 2015, 5:02:46 AM4/16/15
to puppet...@googlegroups.com
Hi,

Using :
puppet-3.7.5-1.el6.noarch
puppetserver-1.0.2-1.el6.noarch
facter-2.4.1-1.el6.x86_64

And with this in my puppetserver's puppet.conf :
parser = future
stringify_facts = false

I still get this error :
Error: Comparison of: String > Integer, is not possible. Caused by 'A
String is not comparable to a non String'.

With the following code :

if ( $::processorcount > 16 ) { ... }

When running 'facter -j', I don't see any double quotes surrounding the
value of that fact, which leads me to believe that it should be
possible and correct to get it as a number instead of a string :

"mtu_eth0": 1500,
"operatingsystemrelease": "6.6",
"swapsize_mb": "4032.00",
"processorcount": 8,

Is this a known limitation? Am I doing something wrong?

Matthias

--
Matthias Saou ██ ██
██ ██
Web: http://matthias.saou.eu/ ██████████████
Mail/XMPP: matt...@saou.eu ████ ██████ ████
██████████████████████
GPG: 4096R/E755CC63 ██ ██████████████ ██
8D91 7E2E F048 9C9C 46AF ██ ██ ██ ██
21A9 7A51 7B82 E755 CC63 ████ ████

Nick Howes

unread,
Apr 16, 2015, 8:51:23 AM4/16/15
to puppet...@googlegroups.com


On Thursday, 16 April 2015 10:02:46 UTC+1, Matthias Saou wrote:
Hi,

Using :
puppet-3.7.5-1.el6.noarch
puppetserver-1.0.2-1.el6.noarch
facter-2.4.1-1.el6.x86_64

And with this in my puppetserver's puppet.conf :
    parser = future
    stringify_facts = false

I still get this error :
Error: Comparison of: String > Integer, is not possible. Caused by 'A
String is not comparable to a non String'. 


stringify_facts needs to be false on the agent. 
Reply all
Reply to author
Forward
0 new messages