EX294 Create content collections and execution environments • Complete Question Bank
Complete EX294 Create content collections and execution environments question bank — all 0 questions with answers and detailed explanations.
A DevOps engineer is creating an execution environment for a team that needs both Ansible and the 'requests' Python library. The engineer creates an execution environment definition file (EE.yml) with the following content: --- version: 3 images: base_image: name: registry.redhat.io/ansible-automation-platform-22/ee-minimal-rhel8:latest options: package_manager_path: /usr/bin/microdnf dependencies: python: requirements.txt system: bindep.txt
What is missing from this definition to ensure the 'requests' library is installed?
Refer to the exhibit. $ ansible-galaxy collection list # /home/user/.ansible/collections/ansible_collections Collection Version -------------------------------- ------- community.general 5.0.0 myorg.mycollection 1.2.3 # /usr/share/ansible/collections/ansible_collections Collection Version -------------------------------- ------- redhat.insights 1.0.0
Refer to the exhibit.
$ cat execution-environment.yml
---
version: 3
images:
base_image:
name: registry.redhat.io/ansible-automation-platform-22/ee-minimal-rhel8:latest
options:
package_manager_path: /usr/bin/microdnf
dependencies:
galaxy: requirements.yml
python: requirements.txt
system: bindep.txt
$ cat requirements.txt
ansible
requests
$ cat bindep.txt
python3-devel [platform:rpm]
gcc [platform:rpm]
$ ansible-builder build -f execution-environment.yml
Build fails with: 'Error: No matching package to install: python3-devel'.You are an automation engineer at a large enterprise. The company uses Ansible Automation Platform 2.x and has a private Automation Hub server. The security team mandates that all execution environments must be built from a hardened base image that has been approved by the security team. The base image is stored in a private container registry at registry.internal.company.com/hardened-ee:latest. You need to create an execution environment that includes a custom collection 'company.tools' which is hosted on the private Automation Hub. Additionally, the execution environment must include the Python library 'cryptography' version 3.4.8. You have created the following files:
execution-environment.yml: --- version: 3 images: base_image: name: registry.internal.company.com/hardened-ee:latest options: package_manager_path: /usr/bin/microdnf dependencies: galaxy: requirements.yml python: requirements.txt
requirements.yml: --- collections: - name: company.tools source: https://automationhub.company.com/api/galaxy/content/private/
requirements.txt:
cryptography==3.4.8
When you run 'ansible-builder build -f execution-environment.yml', the build fails with an error: 'Error: Failed to resolve dependency cryptography==3.4.8'. Based on this scenario, what is the most likely cause of the failure?
Refer to the exhibit. $ cat execution-environment.yml --- version: 1 build_arg_defaults: EE_BASE_IMAGE: 'registry.redhat.io/ansible-automation-platform-21/ee-minimal-rhel8:latest' dependencies: galaxy: requirements.yml python: requirements.txt $ cat requirements.yml --- collections: - name: redhat.insights - name: community.general $ cat requirements.txt ansible==2.9.27
You are a Red Hat Certified Engineer tasked with creating a content collection for your organization. The collection will contain roles and modules used by multiple teams. The requirements are: (1) The collection must follow the Ansible community structure. (2) It must include a module that manages network devices. (3) The collection must be versioned and published to Automation Hub. (4) You must provide a minimal working example for other developers. After initial development, you run 'ansible-galaxy collection build' and it fails with 'ERROR! Unknown file type in collection: .gitkeep'. The collection directory contains:
- galaxy.yml - plugins/modules/network_config.py - roles/network/ - tests/ - .gitkeep (in tests/)
What single action should you take to resolve the build error?
Drag steps to the numbered slots on the right, or tap a step then tap a slot.
Drag a concept onto its matching description — or click a concept then click the description.
Default zone, untrusted network
Private network, slightly trusted
Demilitarized zone, limited access
All traffic accepted
All incoming packets dropped
Error: Unable to find a matching container image for execution environment 'ee-30'. Check that the execution environment is defined in the local container registry.
collections:
- name: namespace.collection
version: ">=1.0.0,<2.0.0"
- name: other.collection
source: https://internal.galaxy.example.com/api/{
"results": [
{
"namespace": "redhat",
"name": "insights",
"version": "1.0.0",
"signatures": [
{"signature": "abc123...", "signing_key_id": "key1"},
{"signature": "def456...", "signing_key_id": "key2"}
],
"download_url": "https://console.redhat.com/api/automation-hub/content/published/collections/redhat-insights-1.0.0.tar.gz"
}
]
}Refer to the exhibit. ``` $ ansible-galaxy collection list # /home/user/.ansible/collections/ansible_collections Collection Version ---------------------------- ------- community.general 5.0.0 redhat.insights 1.0.0 ansible.posix 1.3.0 ```
Refer to the exhibit. ```yaml # execution-environment.yml --- version: 1 build_arg_defaults: EE_BASE_IMAGE: 'registry.redhat.io/ansible-automation-platform/ansible-builder-rhel8:latest' dependencies: galaxy: requirements.yml python: requirements.txt system: bindep.txt ```
[galaxy] server_list = my_automation_hub [galaxy_server.my_automation_hub] url=https://privatehub.example.com/api/automation-hub/ auth_url=https://privatehub.example.com/auth/realms/automation-hub/protocol/openid-connect/token token=my_token_value
version: 3 build_arg_defaults: EE_BASE_IMAGE: registry.redhat.io/ansible-automation-platform-24/ee-minimal-rhel8:latest dependencies: galaxy: requirements.yml python: requirements.txt system: bindep.txt
---
ansible-navigator:
execution-environment:
image: registry.example.com/ansible-ee:latest
enabled: true
pull:
policy: missing
volume-mounts:
- src: /home/user/project
dest: /project
container-engine: podmanA DevOps team maintains an Ansible environment using execution environments. They have been using a local execution environment image named 'custom-ee:latest' built with ansible-builder. Recently, they updated the requirements.yml file to include a new collection from Automation Hub. They rebuilt the execution environment using ansible-builder and pushed it to their private registry as 'registry.internal/custom-ee:1.2'. However, when running ansible-navigator on a control node, it still uses the old local image and does not pull the updated one. The ansible-navigator configuration file (ansible-navigator.yml) specifies:
execution-environment: image: registry.internal/custom-ee:1.2
enabled: true
pull: policy: tag
The control node has no prior local image with that tag. What is the most likely reason the new image is not being used?