Closed sean-m-sullivan closed 1 year ago
I think the list should be under collections
(or roles
):
dependencies:
galaxy:
collections: 👈👈👈
- name: awx.awx
version: 21.9.0
- infra.controller_configuration
- infra.ah_configuration
@kurokobo Nope, additional properties are not allowed. Full error:
jsonschema.exceptions.ValidationError: Additional properties are not allowed ('collections' was unexpected)
Failed validating 'additionalProperties' in schema['properties']['dependencies']:
{'additionalProperties': False,
'description': 'The dependency stuff',
'properties': {'ansible_core': {'additionalProperties': False,
'description': 'Ansible package '
'installation',
'oneOf': [{'required': ['package_pip']}],
'properties': {'package_pip': {'description': 'Ansible '
'package '
'to '
'install '
'via '
'pip',
'type': 'string'}},
'type': 'object'},
'ansible_runner': {'additionalProperties': False,
'description': 'Ansible Runner '
'package '
'installation',
'oneOf': [{'required': ['package_pip']}],
'properties': {'package_pip': {'description': 'Ansible '
'Runner '
'package '
'to '
'install '
'via '
'pip',
'type': 'string'}},
'type': 'object'},
'galaxy': {'anyOf': [{'type': 'object'},
{'type': 'string'},
{'items': {'type': 'string'},
'type': 'array'}]},
'python': {'anyOf': [{'type': 'string'},
{'items': {'type': 'string'},
'type': 'array'}]},
'python_interpreter': {'additionalProperties': False,
'description': 'Python package '
'name and path',
'properties': {'package_system': {'description': 'The '
'python '
'package '
'to '
'install '
'via '
'system '
'package '
'manager',
'type': 'string'},
'python_path': {'description': 'Path '
'to '
'the '
'python '
'interpreter',
'type': 'string'}},
'type': 'object'},
'system': {'anyOf': [{'type': 'string'},
{'items': {'type': 'string'},
'type': 'array'}]}},
'type': 'object'}
On instance['dependencies']:
{'collections': [{'name': 'awx.awx', 'version': '21.9.0'},
'infra.controller_configuration',
'infra.ah_configuration'],
'galaxy': None,
'python': ['pytz', 'python-dateutil>=2.7.0', 'awxkit'],
'system': ['python38-requests [platform:centos-8 platform:rhel-8]',
'python38-pyyaml [platform:centos-8 platform:rhel-8]']}
During handling of the above exception, another exception occurred:
ansible_builder.exceptions.DefinitionError: Additional properties are not allowed ('collections' was unexpected)
@sean-m-sullivan
Seems you've specified dependencies.collections
but my comment is about dependencies.galaxy.collections
.
Try appending collections
under galaxy
.
Sorry, I didn't notice my indent error when i was testing the change, this worked, closing, Thanks!
When using the following definition in a execution_requirements file
Builder will fail with
I tried to fix this on my own, but was unable to, I believe its in here, and should allow a list of dicts. file: https://github.com/sean-m-sullivan/ansible-builder/blob/5efe17fbb5c71e1b6dde354350963d598e3d57a6/src/ansible_builder/ee_schema.py#L228
Also this is based on the following galaxy documentation: https://docs.ansible.com/ansible/devel/collections_guide/collections_installing.html#install-multiple-collections-with-a-requirements-file specifically You can specify the following keys for each collection entry: name version signatures source type