self.load_role

in files/gitlab-cookbooks/package/libraries/config/roles/redis_master.rb [17:30]


  def self.load_role
    master_role = Gitlab['redis_master_role']['enable']
    replica_role = Gitlab['redis_replica_role']['enable']

    return unless master_role || replica_role

    raise 'Cannot define both redis_master_role and redis_replica_role in the same machine.' if master_role && replica_role

    
    Gitlab['gitlab_rails']['enable'] ||= false

    Services.enable_group('redis_node') if master_role || replica_role
  end