我试过这个: – command: ./configure chdir=/src/package/ – command: /usr/bin/make chdir=/src/package/ – command: /usr/bin/make install chdir=/src/package/ 这工作,但我想有更多的东西..整洁。 所以我试过这个: 从: https : //stackoverflow.com/questions/24043561/multiple-commands-in-the-same-line-for-bruker-topspin哪给我回“没有这样的文件或目录” – command: ./configure;/usr/bin/make;/usr/bin/make install chdir=/src/package/ 我也试过: https : //u.osu.edu/hasnan.1/2013/12/16/ansible-run-multiple-commands-using-command-module-and-with-items/ 但我找不到正确的语法: – command: "{{ item }}" chdir=/src/package/ with_items: ./configure /usr/bin/make /usr/bin/make install 这不行,说有报价问题。 任何人?