79775095

Date: 2025-09-25 16:38:21
Score: 1
Natty:
Report link

The yml:

    - name:  RUN PYTHON ON TARGET
      changed_when: false
      shell: python3 /.../try_python.py {{side_a}}
      become: true
      become_user: xxxx
      register: py_output

The script (adapted to AAP and tested locally):

# name = input()
with open("/.../try_txt.txt", "w") as file:
    file.write(f"{{$1}}")

The survey contains only the "side_a" variable, and it is working already for bash cases.

Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: picgon