ansible / ansible.builtin / v2.7.9 / module / gitlab_user Creates/updates/deletes Gitlab Users | "added in version" 2.1 of ansible.builtin" Authors: Werner Dijkerman (@dj-wasabi) preview | supported by communityansible.builtin.gitlab_user (v2.7.9) — module
pip
Install with pip install ansible==2.7.9
When the user does not exist in Gitlab, it will be created.
When the user does exists and state=absent, the user will be deleted.
When changes are made to user, the user will be updated.
- name: Delete Gitlab User gitlab_user: server_url: http://gitlab.example.com validate_certs: False login_token: WnUzDsxjy8230-Dy_k username: myusername state: absent delegate_to: localhost
- name: Create Gitlab User gitlab_user: server_url: https://gitlab.dj-wasabi.local validate_certs: True login_user: dj-wasabi login_password: MySecretPassword name: My Name username: myusername password: mysecretpassword email: me@example.com sshkey_name: MySSH sshkey_file: ssh-rsa AAAAB3NzaC1yc... state: present delegate_to: localhost
name: description: - Name of the user you want to create required: true email: description: - The email that belongs to the user. required: true group: description: - Add user as an member to this group. state: choices: - present - absent default: present description: - create or delete group. - Possible values are present and absent. confirm: default: 'yes' description: - Require confirmation. type: bool version_added: '2.4' version_added_collection: ansible.builtin password: description: - The password of the user. - GitLab server enforces minimum password length to 8, set this value with 8 or more characters. required: true username: description: - The username of the user. required: true login_user: description: - Gitlab user name. server_url: description: - Url of Gitlab server, with protocol (http or https). required: true login_token: description: - Gitlab token for logging in. sshkey_file: description: - The ssh key itself. sshkey_name: description: - The name of the sshkey access_level: description: - The access level to the group. One of the following can be used. - guest - reporter - developer - master - owner login_password: description: - Gitlab password for login_user validate_certs: aliases: - verify_ssl default: 'yes' description: - When using https if SSL certificate needs to be verified. type: bool