Problems with roles requirements setting #2
-
I hope this is something that can be simply answered as I cannot find the correct syntax to make it work. I am trying to add persistant roles from specific sources. I want to end up with a requirements file that functionally works like this:
I tried setting the roles: var like this and it produces bad results:
Any advice would be greatly appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Greetings @dderemiah The 'roles' list is a flat list of strings. See: requirements_persistent.yml You can add the 'scm' and 'version' to the role-string as seen in the Ansible User-Guide. Example: persistent_requirements: true
requirements:
collections: []
roles:
- 'git+https://github.com/ansibleguy/sw_semaphore,821cd2f711dbbad67d1d56a2bf1f10681be5a2a5' Of course - we could refactor the requirements-task to handle the attributes you mentioned. |
Beta Was this translation helpful? Give feedback.
Greetings @dderemiah
The 'roles' list is a flat list of strings. See: requirements_persistent.yml
You can add the 'scm' and 'version' to the role-string as seen in the Ansible User-Guide.
Example:
Of course - we could refactor the requirements-task to handle the attributes you mentioned.