Add ability to change intended role on CLI

In order to change the intended role from the command line i have
integrated an API endpoint and added the crowbar_machines implementation
as well. Now an admin can manipulate the intended role from the CLI
pretty easy.
is there a way to avoid duplicating the list of roles? the validation could be done in the machines_controller and the exception could be caught here.