Exporting the local roles correctly

The key used to check the presence of local roles and the parameter added in the JSON were wrong.