Add the ability of installing roles by reading several requirements.yml files placed on subdirectories inside of roles/ #3887
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
SUMMARY
At the moment AWX only supports installing roles if those are placed in a requirements.yml inside of roles/ (roles/requirements.yml). This change gives the flexibility to detect and read one or several requirements.yml files that can be placed in any subdirectory under the parent directory "roles/"
This can be useful when you want to split the roles, for example, by origin in different requirements.yml files in your Ansible repo. Personally I find this way much cleaner that mixing everything in just one roles/requirements.yml.
ISSUE TYPE
COMPONENT NAME
AWX VERSION
awx: 4.0.0
ADDITIONAL INFORMATION
This is compatible with the expected functionality this process has right now, however, it allows you to have a configuration on your repo like for example:
Or just:
Or even:
Or all the previous combined.
When updating your project from the web interface as usual, all the roles will be pulled by "ansible-galaxy install" on their respective directory where the requirement file is.