Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The following changes make it easier to wrap the wordpress cookbook and control its behaviour:
node.set_unless
doesn't do what you might think it does (http://tickets.opscode.com/browse/CHEF-2945), and setting normal attributes makes things awkward. This PR changes the use of set_unless to a guard clause which means that a normal attribute will only be set if no other type of attribute is set. A wrapper cookbook can E.g. load the attribute values from a vault item and set them as default attributes, without having them persist into the node attributes or be over-written by set_unless.node['wordpress']['db']['install']
attribute that allows the wrapper to control the MySQL installation. For example I'm installing into a cloud (GCE) instance and wish to use the GCE MySQL instance via. a socket, so I don't need a local MySQL instance and can set the attribute tofalse
to disable it entirely.is_local_host?
helper that allows it to recognise UNIX sockets in the formlocalhost:/path/to/socket