Custom format Username for Deploy Tokens
The problem of using special characters in Username.
I'm using Deploy Tokens for install ansible requirements.yml.
Because the dynamically created username has a special character, at startup:
$ ansible-galaxy install -r requirements.yml
found role {'scm': 'https://gitlab', 'src': 'deploy-token-2:<TOKEN>@gitlab.mydomain/ansible-roles/role1.git', 'version': 'v1.0.0', 'name': 'role1'} in yaml file
[WARNING]: - role1 was NOT installed successfully: - scm https://gitlab is not currently supported
I get an error, because ansible tries to parse the URL by specifier.
Here is the content of the requirements.yml:
- src: "https://gitlab+deploy-token-2:<TOKEN>@gitlab.mydomain/ansible-roles/role1.git"
version: v1.0.0
name: role1
I tried to isolate the URL in the requirements.yml file.
But for some reason ansible ignores the screens of special characters.
"https://gitlab+deploy-token-2:<TOKEN>@gitlab.mydomain/ansible-roles/role1.git"
'https://gitlab+deploy-token-2:<TOKEN>@gitlab.mydomain/ansible-roles/role1.git'
https://"gitlab+deploy-token-2:<TOKEN>"@gitlab.mydomain/ansible-roles/role1.git
https://'gitlab+deploy-token-2:<TOKEN>'@gitlab.mydomain/ansible-roles/role1.git
(I tried a lot more variation, but it does not work.)
It would be much easier if the Username Deploy Tokens could be overridden or set up a different format for dynamic generation, without using special characters
Edited by Mark Fletcher