gitlab_project_variable – Creates/updates/deletes GitLab Projects Variables¶
New in version 2.9.
- When a project variable does not exist, it will be created.
- When a project variable does exist, its value will be updated when the values are different.
- Variables which are untouched in the playbook, but are not untouched in the GitLab project, they stay untouched (purge is
false) or will be deleted (purge is
The below requirements are needed on the host that executes this module.
- python >= 2.7
- python-gitlab python module <= 1.12.1
- name: Set or update some CI/CD variables gitlab_project_variable: api_url: https://gitlab.com api_token: secret_access_token project: markuman/dotfiles purge: false vars: ACCESS_KEY_ID: abc123 SECRET_ACCESS_KEY: 321cba - name: Delete one variable gitlab_project_variable: api_url: https://gitlab.com api_token: secret_access_token project: markuman/dotfiles state: absent vars: ACCESS_KEY_ID: abc123
Common return values are documented here, the following are the fields unique to this module: