Skip to content

Commit

Permalink
Fix: Execution environment files (#466)
Browse files Browse the repository at this point in the history
  • Loading branch information
ClausHolbechArista authored Mar 11, 2022
1 parent a5e75c8 commit 84357b6
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 32 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ assets
*context/
*_build/
Containerfile

Dockerfile

# Translations
*.mo
Expand Down
7 changes: 7 additions & 0 deletions ansible_collections/arista/cvp/bindep.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
make
wget
curl
less
git
vim
sshpass
23 changes: 4 additions & 19 deletions ansible_collections/arista/cvp/meta/execution-environment.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,9 @@
# execution-environment.yml
# Read by ansible-builder when this collection is a dependency for an execution-environment
---
version: 1

build_arg_defaults:
EE_BASE_IMAGE: 'quay.io/ansible/ansible-runner:latest'

dependencies:
galaxy: ../collections.yml
python: ../requirements.txt

additional_build_steps:
prepend: |
RUN pip install --upgrade pip setuptools
RUN yum install -y \
make \
wget \
curl \
less \
git \
vim \
sshpass
append:
- RUN ansible-galaxy collection install arista.cvp
galaxy: collections.yml
python: requirements.txt
system: bindep.txt
19 changes: 7 additions & 12 deletions execution-environment.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,20 @@
# execution-environment.yml
# Used to create image from cloned directory instead of galaxy
# Run from root of repo
# Example:
# ansible-builder build --container-runtime=docker --tag=arista-cvp-runner --verbosity 3 -c .
---
version: 1

build_arg_defaults:
EE_BASE_IMAGE: 'quay.io/ansible/ansible-runner:latest'
EE_BASE_IMAGE: 'quay.io/ansible/ansible-runner:stable-2.12-latest'
ANSIBLE_GALAXY_CLI_COLLECTION_OPTS: '--force --verbose'

dependencies:
galaxy: ansible_collections/arista/cvp/collections.yml
python: ansible_collections/arista/cvp/requirements.txt
system: ansible_collections/arista/cvp/bindep.txt

additional_build_steps:
prepend: |
RUN pip install --upgrade pip setuptools
RUN yum install -y \
make \
wget \
curl \
less \
git \
vim \
sshpass
append:
- COPY ansible_collections/arista/cvp/ /usr/share/ansible/collections/ansible_collections/arista/cvp
- RUN ls -la /usr/share/ansible/collections/ansible_collections/arista

0 comments on commit 84357b6

Please sign in to comment.