You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Was able to reproduce this error on all 3.x versions.
When running ansible-builder build or ansible-builder create, the files in the dependencies are not filled in correctly causing this error:
#15 [galaxy 5/6] RUN ansible-galaxy role install -r requirements.yml --roles-path "/usr/share/ansible/roles"
#15 0.399 ERROR! Expecting requirements yaml to be a list or dictionary but got str
#15 ERROR: process "/bin/sh -c ansible-galaxy role install $ANSIBLE_GALAXY_CLI_ROLE_OPTS -r requirements.yml --roles-path \"/usr/share/ansible/roles\"" did not complete successfully: exit code: 1
------
> [galaxy 5/6] RUN ansible-galaxy role install -r requirements.yml --roles-path "/usr/share/ansible/roles":
0.399 ERROR! Expecting requirements yaml to be a list or dictionary but got str
------
4 warnings found (use docker --debug to expand):
- FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 49)
- FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 70)
- FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 10)
- FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 31)
Dockerfile:45
--------------------
43 |
44 | RUN mkdir -p /usr/share/ansible
45 | >>> RUN ansible-galaxy role install $ANSIBLE_GALAXY_CLI_ROLE_OPTS -r requirements.yml --roles-path "/usr/share/ansible/roles"
46 | RUN ANSIBLE_GALAXY_DISABLE_GPG_VERIFY=1 ansible-galaxy collection install $ANSIBLE_GALAXY_CLI_COLLECTION_OPTS -r requirements.yml --collections-path "/usr/share/ansible/collections"
47 |
--------------------
ERROR: failed to solve: process "/bin/sh -c ansible-galaxy role install $ANSIBLE_GALAXY_CLI_ROLE_OPTS -r requirements.yml --roles-path \"/usr/share/ansible/roles\"" did not complete successfully: exit code: 1
The content of each file is its path instead of its content
The dependencies structure you have provided does not match the documentation:
python - This may either be a filename, or a list of requirements
galaxy - This may be a filename, a dictionary, or a multi-line string representation of an Ansible Galaxy requirements.yml file
system - This may either be a filename, or a list of requirements
In all cases, you can either provide a string of just a filename, or a datastructure representative of the contents of the dependency file.
As such, your dependencies should look like the following:
Was able to reproduce this error on all 3.x versions.
When running ansible-builder build or ansible-builder create, the files in the dependencies are not filled in correctly causing this error:
The content of each file is its path instead of its content
Dir structure
Real content of the dependency files
execution-environment.yml
Workaround
ansible-builder
create to create the contextinside context/_build
docker build <options> context/
The text was updated successfully, but these errors were encountered: