Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make this work with Ansible Runner #8

Closed
ghjm opened this issue Jun 20, 2020 · 1 comment
Closed

Make this work with Ansible Runner #8

ghjm opened this issue Jun 20, 2020 · 1 comment

Comments

@ghjm
Copy link
Contributor

ghjm commented Jun 20, 2020

Supporting Ansible Runner may be as simple as having the right command-line parameters and stdin, running in --json mode, and passing the output as Receptor stdout. The existing --via-receptor parameter in Runner expects to import old Receptor, so this should be modified.

The current Receptor plugin in Ansible Runner is incomplete anyway. It supports passing job results to stout, but does not call the Python callbacks on the originating side. We should make the implementation more transparent, so a Python user of Runner doesn't have to change their API at all to run jobs through Receptor.

@AlanCoding
Copy link
Member

Link ansible/ansible-runner#505

Several bits of history here:

  • that PR is removing the old plugin as this issue suggests
  • some new flags were toyed around with like --worker-in and --worker-out, but these have been removed
  • the updated commands
    • write lines of JSON to stdout in the case of ansible-runner transmit
    • both read and write lines of JSON from and to stdout in the case of ansible-runner worker
    • read lines of JSON from stdout in the case of ansible-runner process
  • the private data directory is bundled into a zip file and sent by transmit to worker

In terms of how to configure a receptor mesh to use this, we have a controller and a worker. The controller needs to say "hey worker, run ansible-runner worker and start streaming from me". Then worker will know how to interpret that stream and starts a subprocess running ansible-playbook, podman, or whatever. Then process is probably self-obvious, but I will have more questions after I understand the capabilities of the runner mesh.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants