lean-delivery/ansible-role-gitlab

Unable to connect to GitLab api with preconfigured personal token

Closed this issue · 0 comments

SUMMARY

Gitlab configuration didn't working

ISSUE TYPE
  • Bug Report
COMPONENT NAME
ANSIBLE VERSION
2.7.11
CONFIGURATION
OS / ENVIRONMENT

Centos 7 / Ubuntu 18.04
Gitlab version 11.11.2

STEPS TO REPRODUCE

Run role with default variables

---
- name: install gitlab
  hosts: gitlab
  roles:
    - role: lean_delivery.gitlab
  vars:
    gitlab_project_group_create: true
    gitlab_project_create: true
    gitlab_master_user_create: true
    gitlab_webhooks_create: true
    gitlab_labels_create: true
    gitlab_allow_local_requests: true
EXPECTED RESULTS

Role should install and configure Gitlab without errors

ACTUAL RESULTS
    TASK [ansible-role-gitlab : List existing groups] ******************************
    Friday 07 June 2019  10:22:55 +0000 (0:00:00.185)       0:09:44.436 ***********
    fatal: [gitlab.server.com]: FAILED! => {
        "cache_control": "no-cache", 
        "changed": false, 
        "connection": "close", 
        "content": "{\"message\":\"401 Unauthorized\"}", 
        "content_length": "30", 
        "content_type": "application/json", 
        "date": "Fri, 07 Jun 2019 10:22:58 GMT", 
        "json": {
            "message": "401 Unauthorized"
        }, 
        "redirected": false, 
        "server": "nginx", 
        "status": 401, 
        "url": "https://gitlab.server.com/api/v4/groups", 
        "vary": "Origin", 
        "x_content_type_options": "nosniff", 
        "x_frame_options": "SAMEORIGIN", 
        "x_request_id": "oShVUFlVqOa", 
        "x_runtime": "0.161962"
    }
    
    MSG:
    
    Status code was 401 and not [200]: HTTP Error 401: Unauthorized