noseka1 / openshift-auto-upi

OpenShift Automated User-Provided Infrastructure
Apache License 2.0
98 stars 51 forks source link

mirror_registry.yml fails from remote client #26

Closed hashnao closed 3 years ago

hashnao commented 3 years ago
description of the issue

Running mirror_registry.yml fails when the playbook runs on the remote client but not on the helper host.

Steps To Reproduce
Current Result
$ ansible-playbook mirror_registry.yml -e 'ansible_host=192.168.150.2 ansible_connection=ssh'

PLAY [helper] ***********************************************************************************************************************************************************************

TASK [Gathering Facts] **************************************************************************************************************************************************************
ok: [helper]

TASK [mirror_registry : Install required packages] **********************************************************************************************************************************
ok: [helper]

TASK [mirror_registry : Create a mirror registry directory structure] ***************************************************************************************************************
ok: [helper] => (item=/home/cloud-user/openshift-auto-upi-workspace/ocp4/mirror_registry)
ok: [helper] => (item=/home/cloud-user/openshift-auto-upi-workspace/ocp4/mirror_registry/auth)
ok: [helper] => (item=/home/cloud-user/openshift-auto-upi-workspace/ocp4/mirror_registry/certs)
ok: [helper] => (item=/home/cloud-user/openshift-auto-upi-workspace/ocp4/mirror_registry/data)

TASK [mirror_registry : Generate private key] ***************************************************************************************************************************************
ok: [helper]

TASK [mirror_registry : Generate certificate signing request] ***********************************************************************************************************************
ok: [helper]

TASK [mirror_registry : Generate self-signed certificate for common name helper.ocp4.tt.testing] ************************************************************************************
ok: [helper]

TASK [mirror_registry : Copy the self-signed certificate to the anchors directory] **************************************************************************************************
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: If you are using a module and expect the file to exist on the remote, see the remote_src option
fatal: [helper]: FAILED! => {"changed": false, "msg": "Could not find or access '/home/cloud-user/openshift-auto-upi-workspace/ocp4/mirror_registry/certs/domain.crt' on the Ansible Controller.\nIf you are using a module and expect the file to exist on the remote, see the remote_src option"}

PLAY RECAP **************************************************************************************************************************************************************************
helper                     : ok=6    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0   
Expected Result

Running mirror_registry.yml succeeds when the playbook runs on the remote client.

Additional Information
noseka1 commented 3 years ago

@hashnao Thanks for catching this!