Comments

No, I got "Evaluation Error: Error while evaluating a Function Call, OS release 7 is not supported. at /root/modules_new/module_name/spec/fixtures/modules/module_name/manifests/params.pp:15:16 on node"

One way or another, the params.pp file in your post can't be the one that's actually being used. For a start, your error message says the error's on line 15 of params.pp, but your params.pp above only has 8 lines.

I have added few commented line before the class { } in params.pp manifests, but I didn't paste it here. That's the reason it howing line no 15, but the actual error line is " default => fail(" ${::operatingsystemrelease} is not supported.")"