I’m using this Ansible module to create a gitlab user. It keeps returning 401. How can I debug this?
- name: create service user for Jenkins
become: false
gitlab_user:
api_url: https://192.168.122.99
validate_certs: false
api_username: root
api_password: "{{ gitlab.root_password }}"
name: Jenkins service
username: jenkins01
password: "{{ gitlab.jenkins_user_password }}"
email: jenkins01.example.com
state: present
access_level: developer
confirm: false
delegate_to: localhost
register: jenkins_result
I see this in /var/log/gitlab/gitlab-workhorse:
{
"content_type": "application/json",
"correlation_id": "01F9ESMWXTCKK4DVM2CBFV3143",
"duration_ms": 9,
"host": "192.168.122.99",
"level": "info",
"method": "GET",
"msg": "access",
"proto": "HTTP/1.1",
"referrer": "",
"remote_addr": "127.0.0.1:0",
"remote_ip": "127.0.0.1",
"route": "^/api/",
"status": 401,
"system": "http",
"time": "2021-06-30T11:47:21-04:00",
"ttfb_ms": 9,
"uri": "/api/v4/user",
"user_agent": "python-gitlab/2.5.0",
"written_bytes": 30
}