是否有能够安装 gulp 文件的模块,例如npm:
description: Install "coffee-script" node.js package. - npm: name=coffee-script path=/app/location description: Install "coffee-script" node.js package on version 1.6.1. - npm: name=coffee-script version=1.6.1 path=/app/location description: Install "coffee-script" node.js package globally. - npm: name=coffee-script global=yes description: Remove the globally package "coffee-script". - npm: name=coffee-script global=yes state=absent description: Install "coffee-script" node.js package from custom registry. - npm: name=coffee-script registry=http://registry.mysite.com description: Install packages based on package.json. - npm: path=/app/location description: Update packages based on package.json to their latest version. - npm: path=/app/location state=latest description: Install packages based on package.json using the npm installed with nvm v0.10.1. - npm: path=/app/location executable=/opt/nvm/v0.10.1/bin/npm state=present
目前以下代码段:
- command: /usr/local/lib/npm/bin/gulp
args:
chdir: "{{ project_dir }}"
用于安装 gulp 包,但是可以按如下方式进行吗?
description: Install packages based on package.json.
- gulp: path=/app/location
查看文档和 ansible 模块,现在的答案似乎是"no"。您需要使用 Ansible
command
模块。这里提出了一个类似但不相关的问题。在有人为 Ansible 编写 gulp 模块之前,您需要通过命令或 shell 模块与之交互。