Skip to content

Conversation

agadelshin
Copy link

Here the idea:

  1. I'm collecting resources with type 'Class'
  2. Getting module name $module from class name
  3. Getting tail of class name - $subclass
  4. Copying serverspecs from $module/files/serverspec/$subclass directory to /var/lib/puppet/policy/server/.

I have 2 problems: resources with type Class contain stages and "Settings" builtin class. Maybe I can filter this with puppet API. Haven't find methods for this and wrote ugly workaround.
I want to have default serverspecs for module in $module/files/serverspec/, but If parent class doesn't have implementation (or wasn't include to node), I haven't. Maybe I'll write check for directory $module/files/serverspec/policy. It should work

BTW, can you review my commit and say good it or bad?

@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling 9bc44d8 on pondohva:spec_sync into fd83d15 on raphink:master.

@raphink
Copy link
Owner

raphink commented Sep 9, 2015

So this is to avoid using policy::serverspec?

@agadelshin
Copy link
Author

Actually you were right, this won't work. You shouldn't merge this. Sorry, I forgot about this too. It'll work, I think, only in masterless mode.

BTW, I moved all my tests to beaker and abandon idea to have tests in production environment.

@agadelshin agadelshin closed this Sep 9, 2015
@raphink
Copy link
Owner

raphink commented Sep 9, 2015

OK. I don't use this module either in production, but I'm keeping this PoC alive because I think it might lead somewhere.

@raphink
Copy link
Owner

raphink commented Sep 9, 2015

(or inspire someone)

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.

3 participants