voxpupuli / onceover

Your gateway drug to automated infrastructure testing with Puppet
141 stars 45 forks source link

Add choco_install_path fact to Windows factsets. #274

Closed 16c7x closed 4 years ago

16c7x commented 4 years ago

Seeing the following errors when running Onceover on Windows roles that include the puppetlabs/chocolatey module.

role::windows_webservice: failed
  errors:
    Evaluation Error: Error while evaluating a Function Call, Class[Chocolatey]: parameter 'choco_install_location' expects a match for Stdlib::Windowspath = Pattern[/^(([a-zA-Z]:[\\\/])|([\\\/][\\\/][^\\\/]+[\\\/][^\\\/]+)|([\\\/][\\\/]\?[\\\/][^\\\/]+))/], got Undef
      file: site-modules/profile/manifests/baseline/windows.pp
      line: 11
      column: 3
      factsets: windev

Because facter fact choco_install_location doesn't exist. On a real Puppet run the fact would be created via a ruby function deployed by plugin-sync. Added

 "choco_install_path": "C:\\ProgramData\\chocolatey", 

to the 3 Windows factsets.