Giter Site home page Giter Site logo

Comments (4)

kurokobo avatar kurokobo commented on July 22, 2024

@hoanbc
Thanks for filling the issue.

The short answer

Place your copyfile.txt on the project root directory, or under the files directory that placed on the project root.
I mean, if you are using hoanbc/test as your project, copyfile.txt should be either:

.
|-- hello_world.yml
|-- copyfile.txt     👈 here,
`-- files
    `-- copyfile.txt     👈 or here

The long answer

Your playbook will be executed inside the volatile pod that called Execution Environment (EE). Yes, the awx-ee is the one of the EE, but this is not for your playbook, but for internal management job. The EE for your playbook will be created as the pod named automatuon-job-* at the run time, and will be deleted once your playbook will be finished.

/runner/project is the directory inside the volatile EE. The all files under your project will be copied to this directory at the run time. So, you should place your copyfile.txt in your project directory.

If you want to use the file that placed on the K3s host, since that file can't be touched from inside the volatile EE, you should create additional PV/PVC and specify it by defining customized specification for the Container Group. Refer my guide for detail: https://github.com/kurokobo/awx-on-k3s/tree/main/containergroup

from awx-on-k3s.

hoanbc avatar hoanbc commented on July 22, 2024

Hi @kurokobo

I did try put my file need copy to project directory but it not work. Please review my playbook and confirm this is true.
[root@srv-awx _9__project_test]# pwd
/data/projects/_9__project_test
[root@srv-awx _9__project_test]# ls -la
-rw-r--r-- 1 root root 9 May 29 01:46 copyfile.txt
drwxr-xr-x 2 root root 26 May 29 11:11 files
-rw-r--r-- 1 devops root 219 May 29 11:14 hello_world.yml
[root@srv-awx _9__project_test]# ls -la files/
-rw-r--r-- 1 root root 9 May 29 11:11 copyfile.txt

My playbook.yml

  • name: Copy file
    hosts: all
    tasks:
    • name: Copy file
      ansible.builtin.copy:
      src: copyfile.txt
      dest: /opt/

from awx-on-k3s.

kurokobo avatar kurokobo commented on July 22, 2024

@hoanbc
Hi, if your project type is SCM, any manual modification under /data/projects/_9__project_test will not be copied to the EE.
Place your copyfile.txt in the SCM and update your project to make your copyfile.txt visible in the EE.

from awx-on-k3s.

hoanbc avatar hoanbc commented on July 22, 2024

Hi.

Nice, this working. Thank for tutorial me.

from awx-on-k3s.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.