0
clara
6 years ago 回复了 python怎样执行shell命令
from subprocess import call
call(["ls", "-lh"])
1

用playbook

- shell: (cd /remote; find . -maxdepth 1 -type f) | cut -d'/' -f2
  register: files_to_copy

- fetch: src=/remote/{{ item }} dest=/local/
  with_items: files_to_copy.stdout_lines

Broadcast


JoyK
Better personal homepage
reddit style
GitHub Flavored Markdown syntax
Adaptive layout