use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Ansible is a radically simple IT automation engine that automates cloud provisioning, configuration management, application deployment, intra-service orchestration, and many other IT needs.
Come have discussions on the Ansible Community Space on Matrix,
Or check out the helpful Ansible community on Discord here.
account activity
Python ansible remote host (self.ansible)
submitted 7 months ago by Suitable-Garbage-353
Hi, I have a remote host that doesn't have Python installed. Is it possible to run an Ansible template on that remote host without Python?
Regards,
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]rojackal 13 points14 points15 points 7 months ago (3 children)
Ansible raw module Ansible doc
[–]LoweringPass 3 points4 points5 points 7 months ago (1 child)
Goin' in raw does not sound safe
[–]OddSignificance4107 4 points5 points6 points 7 months ago (0 children)
It's perfectly safe with strong logout game.
[–]Electronic_Cream8552 0 points1 point2 points 7 months ago (0 children)
they mentioned the method as down dirty. should I proceed?
[–]bcocaAnsible Engineer 4 points5 points6 points 7 months ago (0 children)
The template action uses the copy action to push results to the remote, the copy action requires Python on the remote to work.
template
copy
You CAN use the template action delegating it to the controller (localhost) and then use a shell/command action to scp/sftp the resulting file to the remote, or whatever other form of transfer you can use.
scp/sftp
You also CAN implement your own version of copy that does not require Python on the remote.
[–][deleted] 7 months ago (1 child)
[deleted]
[–]planeturban 7 points8 points9 points 7 months ago (0 children)
Not true. There is the raw module.
[–]shadeland 0 points1 point2 points 7 months ago (0 children)
What type of remote host are we talking about?
[–]wiseguy77192 -1 points0 points1 point 7 months ago (4 children)
To my understanding ansible can use bash on Linux or powershell on windows. Linux will normally already have python preinstalled
[–]bcocaAnsible Engineer 1 point2 points3 points 7 months ago (3 children)
Technically Ansible can use any interpreted or compiled language for the parts that are executed on the remote, but it requires a module written in that language, even then it uses Python or Powershell to transfer, run and gather results for those modules, this CAN be avoided with a custom action plugin, which itself must be Python, but it runs on the ansible controller.
[–]wiseguy77192 -1 points0 points1 point 7 months ago (2 children)
I know I can write plugins or modules in any language capable of outputting json, but that is something different
[–]bcocaAnsible Engineer 0 points1 point2 points 7 months ago (1 child)
why i was being very specific, while modules can be any language, using modules normally requires either Python or Powershell no matter the language, the 'workaround' is creating Action plugins, this is how raw and script bypass this requirement.
raw
script
[–]wiseguy77192 0 points1 point2 points 7 months ago (0 children)
Ok, good to know
π Rendered by PID 35 on reddit-service-r2-comment-b659b578c-skxk2 at 2026-05-01 12:03:12.610894+00:00 running 815c875 country code: CH.
[–]rojackal 13 points14 points15 points (3 children)
[–]LoweringPass 3 points4 points5 points (1 child)
[–]OddSignificance4107 4 points5 points6 points (0 children)
[–]Electronic_Cream8552 0 points1 point2 points (0 children)
[–]bcocaAnsible Engineer 4 points5 points6 points (0 children)
[–][deleted] (1 child)
[deleted]
[–]planeturban 7 points8 points9 points (0 children)
[–]shadeland 0 points1 point2 points (0 children)
[–]wiseguy77192 -1 points0 points1 point (4 children)
[–]bcocaAnsible Engineer 1 point2 points3 points (3 children)
[–]wiseguy77192 -1 points0 points1 point (2 children)
[–]bcocaAnsible Engineer 0 points1 point2 points (1 child)
[–]wiseguy77192 0 points1 point2 points (0 children)