# serial ~~ tasks/main.yml --- - name: Check pyserial installation command: python3 -m pip install pyserial - name: Ensure python scripts directory exists file: path: /data/python recurse: true state: directory - name: Copy custom serial library copy: src: serial_macro.py dest: /data/python/serial_macro.py