Created
March 18, 2015 15:32
-
-
Save obazoud/9aa1d005ce619ccea5e8 to your computer and use it in GitHub Desktop.
Chef: Migrate role name with Knife
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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