gitlab_user – Creates/updates/deletes GitLab Users¶
Synopsis¶
- 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.
Requirements¶
The below requirements are needed on the host that executes this module.
- python >= 2.7
- python-gitlab python module <= 1.12.1
- administrator rights on the GitLab server
Parameters¶
Examples¶
- name: "Delete GitLab User"
gitlab_user:
api_url: https://gitlab.example.com/
api_token: "{{ access_token }}"
validate_certs: False
username: myusername
state: absent
delegate_to: localhost
- name: "Create GitLab User"
gitlab_user:
api_url: https://gitlab.example.com/
validate_certs: True
api_username: dj-wasabi
api_password: "MySecretPassword"
name: My Name
username: myusername
password: mysecretpassword
email: me@example.com
sshkey_name: MySSH
sshkey_file: ssh-rsa AAAAB3NzaC1yc...
state: present
group: super_group/mon_group
access_level: owner
delegate_to: localhost
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Status¶
- This module is not guaranteed to have a backwards compatible interface. [preview]
- This module is maintained by the Ansible Community. [community]
Authors¶
- Werner Dijkerman (@dj-wasabi)
- Guillaume Martinez (@Lunik)
Hint
If you notice any issues in this documentation, you can edit this document to improve it.