Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when building an EE with no / empty requirements.yml #290

Closed
shanemcd opened this issue Sep 28, 2021 · 3 comments
Closed

Error when building an EE with no / empty requirements.yml #290

shanemcd opened this issue Sep 28, 2021 · 3 comments

Comments

@shanemcd
Copy link
Member

shanemcd commented Sep 28, 2021

@benthomasson ran into this error when using ansible-builder with an empty requirements.yml:

Error: error building at STEP "COPY --from=galaxy /usr/share/ansible /usr/share/ansible": error adding sources [/home/ben/.local/share/containers/storage/overlay/7083e897c32eb6c6313cb9c4f92c7ae6ab3500640f7b252f78fadc75bcf3b701/merged/usr/share/ansible]: error checking on source /home/ben/.local/share/containers/storage/overlay/7083e897c32eb6c6313cb9c4f92c7ae6ab3500640f7b252f78fadc75bcf3b701/merged/usr/share/ansible under "/home/ben/.local/share/containers/storage/overlay/7083e897c32eb6c6313cb9c4f92c7ae6ab3500640f7b252f78fadc75bcf3b701/merged": copier: stat: "/usr/share/ansible": no such file or directory
@benthomasson
Copy link

benthomasson commented Sep 28, 2021

requirements.yml:

---
collections: []
...

@benthomasson
Copy link

benthomasson commented Sep 28, 2021

It fails in a different way with a proper error message with an empty requirements.yml

STEP 6: RUN ansible-galaxy role install -r requirements.yml --roles-path /usr/share/ansible/roles
[WARNING]: You are running the development version of Ansible. You should only
run Ansible from "devel" if you are modifying the Ansible engine, or trying out
features under development. This is a rapidly changing source of code and can
become unstable at any point.
ERROR! No requirements found in file '/build/requirements.yml'
STEP 7: FROM quay.io/ansible/ansible-builder:latest AS builder
Error: error building at STEP "RUN ansible-galaxy role install -r requirements.yml --roles-path /usr/share/ansible/roles": error while running runtime: exit status 1

@samdoran samdoran self-assigned this Sep 28, 2021
@samdoran samdoran added needs_triage New item that needs to be triaged and removed needs_triage New item that needs to be triaged labels Nov 1, 2021
@Akasurde
Copy link
Member

With Ansible Builder v3, I am not able to reproduce this error.

---
collections: []
---
version: 3

images:
  base_image:
    name: registry.redhat.io/ansible-automation-platform-23/ee-minimal-rhel8:latest

dependencies:
    ansible_core:
        package_pip: ansible-core==2.15.0
    ansible_runner:
        package_pip: ansible-runner==2.3.2
    galaxy: requirements.yml

additional_build_files:
    - src: files/ansible.cfg
      dest: configs

additional_build_steps:
    prepend_final:
        - COPY _build/configs/ansible.cfg /etc/ansible/ansible.cfg

options:
    package_manager_path: /usr/bin/microdnf

Closing this now. Please feel free to open a new issue if the problem persists. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants