Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: no implicit conversion of Integer into String #199

Closed
hpkunz opened this issue May 2, 2019 · 6 comments
Closed

Error: no implicit conversion of Integer into String #199

hpkunz opened this issue May 2, 2019 · 6 comments

Comments

@hpkunz
Copy link

hpkunz commented May 2, 2019

I get a lot of these errors:

Error: /Stage[main]/Os_hardening::Sysctl/Sysctl[net.ipv4.conf.default.rp_filter]/ensure: change from 'absent' to 'present' failed: Could not set 'present' on ensure: no implicit conversion of Integer into String (file:/etc/puppetlabs/code/environments/ifi/modules/os_hardening/manifests/sysctl.pp, line: 78)
Error: Could not set 'present' on ensure: no implicit conversion of
Integer into String (file:/etc/puppetlabs/code/environments/ifi/modules/os_hardening/manifests/sysctl.pp, line: 111)
Error: Could not set 'present' on ensure: no implicit conversion of Integer into String (file:/etc/puppetlabs/code/environments/ifi/modules/os_hardening/manifests/sysctl.pp, line: 111)
Wrapped exception:no implicit conversion of Integer into String

even if I just use the module with default parameter values, i.e.

class { "os_hardening": }

in fact, it seems I get such an error for every instance of 'bool2num' in os_hardening/manifests/sysctl.pp, e.g. (corresponding to the error above)

line 111: sysctl { 'net.ipv4.conf.all.arp_ignore': value =>
bool2num($arp_restricted) }

I am using

  • puppetserver 6.3.0-1stretch (on debian stretch)
  • herculesteam-augeasproviders_sysctl (v2.3.1)

Best,
Hp

@mcgege
Copy link
Member

mcgege commented May 8, 2019

@hpkunz Which version of stdlib do you use here?

And also please paste the output of puppet --version from the system where you get the error ...

@mcgege
Copy link
Member

mcgege commented May 28, 2019

Closed due to inactivity

@mcgege mcgege closed this as completed May 28, 2019
@hpkunz
Copy link
Author

hpkunz commented May 31, 2019

sorry, I got no notification from github, so I didn't know that there was a question. I have the following puppet version installed:

  • debian stretch machines: puppet --version => 6.4.2
  • debian buster machines: puppet --version => 6.4.2

I use stdlib version v5.2.0

Best and thanks
Hp

@mcgege
Copy link
Member

mcgege commented Jun 1, 2019

@hpkunz It looks like Puppet in the latest version needs an explicit conversion to string here ... I'll try to fix this with #207 and publish a new release when this is successful.

@mcgege mcgege reopened this Jun 1, 2019
@mcgege
Copy link
Member

mcgege commented Jun 1, 2019

Version 2.2.5 is out, please try it!

@hpkunz
Copy link
Author

hpkunz commented Jun 3, 2019

This fixed my errors. Many thanks!

@hpkunz hpkunz closed this as completed Jun 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants