code: def add_role_info(self, role_name, role_type, host_id, config=None):
      
      if self.roles is None:
        self.roles = [ ]
      api_config_list = config is not None and config_to_api_list(config) or None
      self.roles.append({
          'name' : role_name,
          'type' : role_type,
          'hostRef' : { 'hostId' : host_id },
          'config' : api_config_list })
docs: Add a role info. The role will be created along with the service setup.
  
      @param role_name: Role name
      @param role_type: Role type
      @param host_id: The host where the role should run
      @param config: (Optional) A dictionary of role config values