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

use stdlib puppet facts for configuration #352

Merged
merged 1 commit into from
May 1, 2017

Conversation

vchepkov
Copy link
Contributor

puppetserver doesn't honor puppet.conf vardir settings

This would solve #351

@rnelson0
Copy link
Member

This broke all the tests. Can you review the failures to see what the fix is?

@vchepkov
Copy link
Contributor Author

vchepkov commented Apr 4, 2017

As far as I can tell, all failures have nothing to do with my change, seems Travis environment is broken to begin with.

@rnelson0
Copy link
Member

rnelson0 commented Apr 6, 2017

The errors are definitely related to your changes, they have to do with r10k_basedir. It's expecting an actual path and getting something else. It may be a missing fact or it may need to change the data type. I suggest rebasing on master first, though, there has been a modulesync since this was submitted.

@vchepkov
Copy link
Contributor Author

vchepkov commented Apr 6, 2017

I will be first one to admit I am bad with tests. I presume the problem is, actual puppet is not running there, so facts are not being collected. Do I add them to default_module_facts.yml ?

@vchepkov
Copy link
Contributor Author

vchepkov commented Apr 6, 2017

Well, that didn't help :(

@rnelson0
Copy link
Member

rnelson0 commented Apr 6, 2017

I think you need to set the facts hash element directly, rspec-puppet doesn't normalize between global facts and the facts hash.

@vchepkov
Copy link
Contributor Author

vchepkov commented Apr 6, 2017

How do I do this?

@vchepkov
Copy link
Contributor Author

vchepkov commented Apr 6, 2017

From what I understand by reading spec/spec_helper.rb, it should load those facts

@vchepkov
Copy link
Contributor Author

I found this PR https://github.com/voxpupuli/puppet-selinux/pull/217/files
And it is using exactly the same changes, but their test succeeds.
I am not sure what I am doing wrong here

@rnelson0
Copy link
Member

rnelson0 commented May 1, 2017

@vchepkov Can you rebase on master? We updated with a modulesync recently, at the least that should make the test results easier to read.

@vchepkov
Copy link
Contributor Author

vchepkov commented May 1, 2017

Done

@@ -1,2 +1,4 @@
---
pe_version: '2016.4.1'
puppet_environmentpath: '/etc/puppetlabs/code/environments'
puppet_vardir: '/opt/puppetlabs/puppet/cache'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this file go in spec? That's where selinux puts it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I honestly don't know, I added to an existing file, I assumed it's in the right place
let me move it

puppetserver doesn't honor puppet.conf vardir settings
@vchepkov
Copy link
Contributor Author

vchepkov commented May 1, 2017

Much better now

@rnelson0
Copy link
Member

rnelson0 commented May 1, 2017

You can blame me for putting the file in the wrong spot :) Thanks!

@rnelson0 rnelson0 merged commit 1d0c344 into voxpupuli:master May 1, 2017
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

Successfully merging this pull request may close these issues.

2 participants