Skip to content

Allow resources to skip repository install#256

Open
patcon wants to merge 1 commit intodjoos-cookbooks:masterfrom
blendedperspectives:256-skip-install
Open

Allow resources to skip repository install#256
patcon wants to merge 1 commit intodjoos-cookbooks:masterfrom
blendedperspectives:256-skip-install

Conversation

@patcon
Copy link

@patcon patcon commented Aug 3, 2016

Some restricted environments cannot add yum repositories, and must install newrelic manually. Would be great if there was a resource attribute flag that would allow the "install_repository" method to be skipped.

Would you be willing to accept a PR for this?

@djoos
Copy link
Member

djoos commented Jul 29, 2016

Definitely @patcon, ping it over!

FYI: I'm hoping to catch up on PRs and issues over the next couple of weeks...

Thanks in advance!
David

@patcon
Copy link
Author

patcon commented Aug 3, 2016

Would you mind if I made the "skip_install" attr top-level (ie. not for a specific type of agent install, like app or server). The rationale being that turning off auto-install would be applied when repos can't be managed, so it should affect all.

On a related note, perahps we could separate :install and :configure actions on the resource? That might be a little cleaner than just a "skip_install" resource attr.

EDIT: The good news is that it seems default_action when defining the custom resource can be an array :)
https://github.com/chef/chef/blob/master/spec/unit/lwrp_spec.rb#L266-L272

@patcon
Copy link
Author

patcon commented Aug 3, 2016

OK, this was how I was thinking. I can further run and fix up any integrations tests (?). We could also force the other LWRPs to use the same pattern.

While this is mostly backward compat, if someone has explicitly used the resource and explicitly set the :install action, it might silently stop managing config, which might call for a major version bump (or further consideration of our strategy)

@djoos
Copy link
Member

djoos commented Aug 4, 2016

Hi @patcon,

just to make sure I've got it at the right end of the stick: would the "manual" install be the manual installation on other Linux flavours?

Thanks in advance for the additional background!

Kind regards,
David

@patcon
Copy link
Author

patcon commented Aug 4, 2016

Yep, that's right :)

@shatil
Copy link

shatil commented Sep 1, 2016

I don't see any other means of up-voting, but +1. Can't wait to see this in master. Thanks @patcon!

My use case is similar: some networks aggressively limit outbound connections, particularly over HTTP (I see New Relic's download servers do serve HTTPS though the recipe specifies HTTP).

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