Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Chef: Migrate role name with Knife
knife exec -E 'nodes.find("role:qwerty") { |node| new_run_list = node.run_list.map { |element| (element == "role[qwerty]") ? "role[azerty]" : element }; node.run_list.reset!(new_run_list); node.save; }'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment