pyinfra-dev / pyinfra

pyinfra turns Python code into shell commands and runs them on your servers. Execute ad-hoc commands and write declarative operations. Target SSH servers, local machine and Docker containers. Fast and scales from one server to thousands.
https://pyinfra.com
MIT License
3.85k stars 374 forks source link

example code for `ssh.command` is invalid python #933

Closed minusf closed 1 year ago

minusf commented 1 year ago

Describe the bug

example code for ssh.command is invalid python

ssh.command(
    name="Create file by running echo from host one to host two",
    hostname="two.example.com",
    command="echo "one was here" > /tmp/one.txt",
    user="vagrant",
)

To Reproduce

read https://docs.pyinfra.com/en/2.x/operations/ssh.html#ssh-command

Meta

    System: Darwin
      Platform: macOS-13.1-arm64-arm-64bit
      Release: 22.2.0
      Machine: arm64
    pyinfra: v2.5.3
    Executable: ./venv/bin/pyinfra
    Python: 3.10.8 (CPython, Clang 14.0.0 (clang-1400.0.29.102))
Fizzadar commented 1 year ago

Thanks for catching this, fixed via https://github.com/Fizzadar/pyinfra/commit/664d3ba847ba5cfc1166f01c056b79ce17e2073a.

minusf commented 1 year ago

thanks for looking into this. do the commits publish automatically? 😅