Skip to content

Instantly share code, notes, and snippets.

@spalenza
Last active October 26, 2018 18:56
Show Gist options
  • Save spalenza/17e5b7dc10535c846d85ba634468c3e4 to your computer and use it in GitHub Desktop.
Save spalenza/17e5b7dc10535c846d85ba634468c3e4 to your computer and use it in GitHub Desktop.
List OpsWorks Custom Recipes
function getRecipes(id) {
return $.map($('*[data-region="' + id + '"] li.opaque'), function(elem) {
return $(elem).text().replace('remove', '').trim();
})
};
var setupRecipes = getRecipes('CustomRecipes.Setup');
var configureRecipes = getRecipes('CustomRecipes.Configure');
var deployRecipes = getRecipes('CustomRecipes.Deploy');
var undeployRecipes = getRecipes('CustomRecipes.Undeploy');
var shutdownRecipes = getRecipes('CustomRecipes.Shutdown');
var packagesSoftwares = getRecipes('Packages');
console.log('Setup: ' + setupRecipes.join(','));
console.log('Configure: ' + configureRecipes.join(','));
console.log('Deploy: ' + deployRecipes.join(','));
console.log('Undeploy: ' + undeployRecipes.join(','));
console.log('Shutdown: ' + shutdownRecipes.join(','));
console.log('Packages: ' + packagesSoftwares.join(','));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment