I want to do the equivalent via the CLI that clicking on the stack, selecting only instances in a specific layer and running Execute Recipes command (or alternatively trigger the Configure lifecycle step).
I need to do this programmatically, there is an option to do it at the Stack level but that does not help,
Trying to avoid something like the following, I will probably end up pulling the layer members into an array and then hitting them independently as suggested below. Not great though since I'll have to add static information for Stack & Layer info.
if deploy[:application_type] != 'php'
Chef::Log.debug("Skipping mod_php5_apache2::php application #{application} as it is not an PHP app")
next
end