File not Found error

Hi All,

I am trying to execute a playbook that would make configuration changes in a Juniper router, config is inside a file ‘configuration_file.set’ but I am getting following error upon execution of Job. It seems that the Execution-environment is unable to access my file. Please help, what can I do to resolve this issue?

An exception occurred during task execution. To see the full traceback, use -vvv. The error was: FileNotFoundError: [Errno 2] No such file or directory: ‘/var/lib/rancher/k3s/storage/pvc-75ec43af-e15f-41f7-8d4f-b7874a597141_awx_awx-projects-claim/south-cbbr/configuration_file.set’

fatal: [192.168.83.234]: FAILED! => {“changed”: false, “module_stderr”: "Traceback (most recent call last):\n File "/root/.ansible/tmp/ansible-tmp-1678433012.2555647-33-133736931794061/AnsiballZ_juniper_junos_config.py", line 107, in \n _ansiballz_main()\n File "/root/.ansible/tmp/ansible-tmp-1678433012.2555647-33-133736931794061/AnsiballZ_juniper_junos_config.py", line 99, in _ansiballz_main\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n File "/root/.ansible/tmp/ansible-tmp-1678433012.2555647-33-133736931794061/AnsiballZ_juniper_junos_config.py", line 47, in invoke_module\n runpy.run_module(mod_name=‘ansible.modules.juniper_junos_config’, init_globals=dict(_module_fqn='ansib…

Since your job is running in a pod, that pod will need access to that file (the project pvc is not mounted to the launched job pods).

You could consider placing this under under source control in your github project, or look into using the job settings Path to expose, which allows you to mount directories to the job pod

https://docs.ansible.com/automation-controller/4.3.0/html/userguide/execution_environments.html#execution-environment-mount-options

AWX Team