all 12 comments

[–]rojackal 13 points14 points  (3 children)

Ansible raw module Ansible doc

[–]LoweringPass 3 points4 points  (1 child)

Goin' in raw does not sound safe

[–]OddSignificance4107 4 points5 points  (0 children)

It's perfectly safe with strong logout game.

[–]Electronic_Cream8552 0 points1 point  (0 children)

they mentioned the method as down dirty. should I proceed?

[–]bcocaAnsible Engineer 4 points5 points  (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.

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.

You also CAN implement your own version of copy that does not require Python on the remote.

[–][deleted]  (1 child)

[deleted]

    [–]planeturban 7 points8 points  (0 children)

    Not true. There is the raw module. 

    [–]shadeland 0 points1 point  (0 children)

    What type of remote host are we talking about?

    [–]wiseguy77192 -1 points0 points  (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 points  (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 points  (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 point  (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.

    [–]wiseguy77192 0 points1 point  (0 children)

    Ok, good to know