Programatically create a new role
$roles = array('role1','role2','role3');
foreach($roles as $name) {
 $existing_role = user_role_load_by_name($name);
 if (empty($existing_role)) {
  $role = new stdClass();
  $role-&gt;name = $name;
  user_role_save($role);
 }
}


I have placed the same snippet in module install file and it is working just fine. You need to enable and then uninstall the module and re-enable it, I hope it will work.