Gulp module in Ansible

ansible

Is there a module that is able to install gulp files, like is possible for 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

At the moment the following snippet:

- command: /usr/local/lib/npm/bin/gulp
  args:
    chdir: "{{ project_dir }}"

is used to install gulp packages, but is it possible to do it as follows?

description: Install packages based on package.json.
- gulp: path=/app/location

Best Answer

Looking at the documentation and ansible modules, the answer now seems to be "no". You need to use the Ansible command module.

A similar, but unrelated question was asked here. Until someone writes a gulp module for Ansible, you need to interact with it via the command or shell modules.