New in version 2.1.
When the user does not exists 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.
| parameter | required | default | choices | comments |
|---|---|---|---|---|
| access_level | no |
The access level to the group. One of the following can be used.
guest
reporter
developer
master
owner
|
||
| email | yes | The email that belongs to the user. |
||
| group | no | Add user as an member to this group. |
||
| login_password | no | Gitlab password for login_user |
||
| login_token | no | Gitlab token for logging in. |
||
| login_user | no | Gitlab user name. |
||
| name | yes | Name of the user you want to create |
||
| password | yes | The password of the user. |
||
| server_url | yes | Url of Gitlab server, with protocol (http or https). |
||
| sshkey_file | no | The ssh key itself. |
||
| sshkey_name | no | The name of the sshkey |
||
| state | no | present |
|
create or delete group.
Possible values are present and absent.
|
| username | yes | The username of the user. |
||
| validate_certs | no | True |
When using https if SSL certificate needs to be verified. aliases: verify_ssl
|
- name: "Delete Gitlab User"
local_action: gitlab_user
server_url="http://gitlab.dj-wasabi.local"
validate_certs=false
login_token="WnUzDsxjy8230-Dy_k"
username=myusername
state=absent
- name: "Create Gitlab User"
local_action: 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 protected]
sshkey_name=MySSH
sshkey_file=ssh-rsa AAAAB3NzaC1yc...
state=present
For more information on what this means please read Extras Modules
For help in developing on modules, should you be so inclined, please read Community Information & Contributing, developing_test_pr and Developing Modules.
© 2012–2016 Michael DeHaan
© 2016 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/gitlab_user_module.html