mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Do not try to process an empty metai/main.yml file
If an empty meta/main.yml file exists, ansible-galaxy threw an unhelpful exception. Now, a warning message is printed and the installation does not fail. See https://stackoverflow.com/questions/45432994/ansible-galaxy-fails-on-dependency-with-empty-meta-main-yml
This commit is contained in:
parent
f31696f77f
commit
31dc5342f3
1 changed files with 24 additions and 21 deletions
|
@ -397,6 +397,9 @@ class GalaxyCLI(CLI):
|
|||
|
||||
# install dependencies, if we want them
|
||||
if not no_deps and installed:
|
||||
if not role.metadata:
|
||||
display.warning("Meta file %s is empty. Skipping dependencies." % role.path)
|
||||
else:
|
||||
role_dependencies = role.metadata.get('dependencies') or []
|
||||
for dep in role_dependencies:
|
||||
display.debug('Installing dep %s' % dep)
|
||||
|
|
Loading…
Reference in a new issue