kurokobo / awx-on-k3s

An example implementation of AWX on single node K3s using AWX Operator, with easy-to-use simplified configuration with ownership of data and passwords.
MIT License
518 stars 143 forks source link

Unable to send stdout from AWX to pod instance #369

Closed vietsoulz closed 4 weeks ago

vietsoulz commented 1 month ago

Environment

k3s version v1.29.4+k3s1 (94e29e2e) go version go1.21.9

Description

I am able to follow your guide and deployed AWX Operator 2.17.0 and AWX 24.4.0. The PV/PVC mappings worked great and able to use manual SCM to launch a playbook for Cisco devices. What I am having trouble is getting the stdout from the ansible's register and save the output to the /var/lib/awx/projects/backkups subfolder. I keep getting this error:

"path": "/var/lib/awx/projects/backups/ios-xe", "msg": "There was an issue creating /var/lib/awx as requested: [Errno 13] Permission denied: b'/var/lib/awx'", "invocation": { "module_args": { "path": "/var/lib/awx/projects/backups/ios-xe", "state": "directory",

  1. Deploy ...
  2. Invoke kubectl ...
  3. ...
  4. ...

Logs

"path": "/var/lib/awx/projects/backups/ios-xe", "msg": "There was an issue creating /var/lib/awx as requested: [Errno 13] Permission denied: b'/var/lib/awx'", "invocation": { "module_args": { "path": "/var/lib/awx/projects/backups/ios-xe", "state": "directory",

kurokobo commented 4 weeks ago

@vietsoulz Hi, sorry for the late reply, I haven't been feeling well and couldn't find the time to respond.

What I am having trouble is getting the stdout from the ansible's register and save the output to the /var/lib/awx/projects/backkups subfolder. I keep getting this error:

Your playbook is launched on the ephemeral automation job pod a.k.a. Execution Environment, so /var/lib/awx/projects on your playbook is NOT /data/projects on your K3s. If you want to mount a directory on your K3s host to the automation job pod, you have to define Container Group and specify it on your job template.

For your case, try the Case 1 of my guide for Container Group.

I'm closing this since this is explained in another guide, but feel free to create new issue if you have some trouble during following my guide. Thanks!