|
|
@ -26,14 +26,17 @@ options:
|
|
|
|
name:
|
|
|
|
name:
|
|
|
|
description:
|
|
|
|
description:
|
|
|
|
- The name of a node.js library to install
|
|
|
|
- The name of a node.js library to install
|
|
|
|
|
|
|
|
type: str
|
|
|
|
required: false
|
|
|
|
required: false
|
|
|
|
path:
|
|
|
|
path:
|
|
|
|
description:
|
|
|
|
description:
|
|
|
|
- The base path where to install the node.js libraries
|
|
|
|
- The base path where to install the node.js libraries
|
|
|
|
|
|
|
|
type: path
|
|
|
|
required: false
|
|
|
|
required: false
|
|
|
|
version:
|
|
|
|
version:
|
|
|
|
description:
|
|
|
|
description:
|
|
|
|
- The version to be installed
|
|
|
|
- The version to be installed
|
|
|
|
|
|
|
|
type: str
|
|
|
|
required: false
|
|
|
|
required: false
|
|
|
|
global:
|
|
|
|
global:
|
|
|
|
description:
|
|
|
|
description:
|
|
|
@ -45,6 +48,7 @@ options:
|
|
|
|
description:
|
|
|
|
description:
|
|
|
|
- The executable location for npm.
|
|
|
|
- The executable location for npm.
|
|
|
|
- This is useful if you are using a version manager, such as nvm
|
|
|
|
- This is useful if you are using a version manager, such as nvm
|
|
|
|
|
|
|
|
type: path
|
|
|
|
required: false
|
|
|
|
required: false
|
|
|
|
ignore_scripts:
|
|
|
|
ignore_scripts:
|
|
|
|
description:
|
|
|
|
description:
|
|
|
@ -75,11 +79,13 @@ options:
|
|
|
|
description:
|
|
|
|
description:
|
|
|
|
- The registry to install modules from.
|
|
|
|
- The registry to install modules from.
|
|
|
|
required: false
|
|
|
|
required: false
|
|
|
|
|
|
|
|
type: str
|
|
|
|
version_added: "1.6"
|
|
|
|
version_added: "1.6"
|
|
|
|
state:
|
|
|
|
state:
|
|
|
|
description:
|
|
|
|
description:
|
|
|
|
- The state of the node.js library
|
|
|
|
- The state of the node.js library
|
|
|
|
required: false
|
|
|
|
required: false
|
|
|
|
|
|
|
|
type: str
|
|
|
|
default: present
|
|
|
|
default: present
|
|
|
|
choices: [ "present", "absent", "latest" ]
|
|
|
|
choices: [ "present", "absent", "latest" ]
|
|
|
|
requirements:
|
|
|
|
requirements:
|
|
|
@ -241,12 +247,12 @@ class Npm(object):
|
|
|
|
|
|
|
|
|
|
|
|
def main():
|
|
|
|
def main():
|
|
|
|
arg_spec = dict(
|
|
|
|
arg_spec = dict(
|
|
|
|
name=dict(default=None),
|
|
|
|
name=dict(default=None, type='str'),
|
|
|
|
path=dict(default=None, type='path'),
|
|
|
|
path=dict(default=None, type='path'),
|
|
|
|
version=dict(default=None),
|
|
|
|
version=dict(default=None, type='str'),
|
|
|
|
production=dict(default='no', type='bool'),
|
|
|
|
production=dict(default='no', type='bool'),
|
|
|
|
executable=dict(default=None, type='path'),
|
|
|
|
executable=dict(default=None, type='path'),
|
|
|
|
registry=dict(default=None),
|
|
|
|
registry=dict(default=None, type='str'),
|
|
|
|
state=dict(default='present', choices=['present', 'absent', 'latest']),
|
|
|
|
state=dict(default='present', choices=['present', 'absent', 'latest']),
|
|
|
|
ignore_scripts=dict(default=False, type='bool'),
|
|
|
|
ignore_scripts=dict(default=False, type='bool'),
|
|
|
|
unsafe_perm=dict(default=False, type='bool'),
|
|
|
|
unsafe_perm=dict(default=False, type='bool'),
|
|
|
|