cancel
Showing results for 
Search instead for 
Did you mean: 
RMB
Mission Specialist
Mission Specialist
  • 990 Views

ch10s04 - Error: SSL certificate verify failed when execute podman build command

Jump to solution

Hello,

I had an error with the SSL certificate when I tried to build the execution environment for the last lab in Chapter 10.

 

- Command executed: 

ansible-builder build --tag hub.lab.example.com/system/ee-review-rhel8:v1.0

or

podman build -f context/Containerfile -t hub.lab.example.com/system/ee-review-rhel8:v1.0 context

 

- Error

SSL certificate verify failed

RMB_0-1727354618105.png

 

- Solution

I added this parameter to the execution-environment.yml configuration file:

 

version: 1

build_arg_defaults:

  ANSIBLE_GALAXY_CLI_COLLECTION_OPTS: "-c"

 

RMB_1-1727354808315.png

 

After adding this and rebuilding the environment, everything worked perfectly!

I hope this helps anyone who encounters the same problem!

RMB_2-1727354830584.png

 

1 Solution

Accepted Solutions
Chetan_Tiwary_
Community Manager
Community Manager
  • 933 Views

@RMB  I was unable to replicate this issue in my DO374 lab : ch10s04 step 8:

Chetan_Tiwary__0-1727380432606.png

Chetan_Tiwary__1-1727380474406.png

View solution in original post

8 Replies
rhnoname
Flight Engineer Flight Engineer
Flight Engineer
  • 977 Views

Hi,

I will keep it in mind.

Thanks for sharing!

Best Regards
Chetan_Tiwary_
Community Manager
Community Manager
  • 948 Views

@RMB Thanks for letting us know here. I will check and report it as well!

0 Kudos
Chetan_Tiwary_
Community Manager
Community Manager
  • 934 Views

@RMB  I was unable to replicate this issue in my DO374 lab : ch10s04 step 8:

Chetan_Tiwary__0-1727380432606.png

Chetan_Tiwary__1-1727380474406.png

RMB
Mission Specialist
Mission Specialist
  • 822 Views

Hi!,

I tried again, this time I just used the podman build command to see what would happen and it worked:

[student@workstation ee-build]$ podman build -f context/Containerfile \ > -t hub.lab.example.com/system/ee-review-rhel8:v1.0 context

 

Maybe the problem it was just not using podman build and using the ansible-builder build command instead.

RMB_0-1727785720290.png

 

Thanks!

Roberto 

Chetan_Tiwary_
Community Manager
Community Manager
  • 811 Views

@RMB glad that it is resolved for you!

0 Kudos
DeepakRamanath
Flight Engineer
Flight Engineer
  • 316 Views

I had the same issue and adding ANSIBLE_GALAXY_CLI_COLLECTION_OPTS: "-c" worked, but had to clear the _build directory in the context/

 

Also, out of interest, where can we find these flags in the documentation?

 

Thanks you

  • 8 Views

The ansible-galaxy man page is below.  The -c parameter ignores SSL certificate validation errors.

https://docs.ansible.com/ansible/latest/cli/ansible-galaxy.html

ansible-builder or 'podman build' both run the following when collections are required which is where the ANSIBLE_GALAXY_CLI_COLLECTION_OPTS variable comes from

ansible-galaxy collection install $ANSIBLE_GALAXY_CLI_COLLECTION_OPTS -r requirements.yml --collections-path "/usr/share/ansible/collections"

0 Kudos
  • 18 Views

I have the same issue whenever I create an execution environment that adds collections to it.  When collections are required to be added into the execution environment, ansible-galaxy runs trying to connect to https://hub.lab.example.com but fails due to the SSL certificate not being trusted.  Adding ANSIBLE_GALAXY_CLI_COLLECTION_OPTS: "-c" into execution-environment.yml runs ansible-galaxy -c which forces it to ignore SSL certificate validation errors.

You can see in the error that it is trying to run...

ansible-galaxy collection install $ANSIBLE_GALAXY_CLI_COLLECTION_OPTS -r requirements.yml --collections-path "/usr/share/ansible/collections"

The -c option ignores SSL certificate validation errors.  The ansible-galaxy man page is below:

https://docs.ansible.com/ansible/latest/cli/ansible-galaxy.html

0 Kudos
Join the discussion
You must log in to join this conversation.