Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: npm module: added "options" argument #42153

Closed
wants to merge 9 commits into from
Closed

Conversation

tmshn
Copy link
Contributor

@tmshn tmshn commented Jun 30, 2018

SUMMARY

npm command provides many options such as save, package-lock and ignore-scripts.
Although some options are supported by the module arguments, still there are many options not supported.

Rather than implementing arguments for each of them, I added options argument to support them all.

Usage example:

- name: install node modules without editing package.json
  npm:
    path: '{{ repo.path }}'
    options:
      save: no
ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

npm module

ANSIBLE VERSION
ansible 2.7.0.dev0 (npm-options ea38792fb2) last updated 2018/06/30 23:38:02 (GMT +900)
  config file = None
  configured module search path = [u'/Users/01014505/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /Users/01014505/Documents/dev/oss/ansible/lib/ansible
  executable location = /usr/local/bin/ansible
  python version = 2.7.15 (default, May  1 2018, 16:44:14) [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)]

@ansibot
Copy link
Contributor

ansibot commented Jun 30, 2018

@ansibot ansibot added affects_2.7 This issue/PR affects Ansible v2.7 feature This issue/PR relates to a feature request. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. needs_triage Needs a first human triage before being processed. support:community This issue/PR relates to code supported by the Ansible community. test This PR relates to tests. module This issue/PR relates to a module. labels Jun 30, 2018
@ansibot
Copy link
Contributor

ansibot commented Jun 30, 2018

The test ansible-test sanity --test pylint [explain] failed with 3 errors:

lib/ansible/modules/packaging/language/npm.py:181:27: undefined-variable Undefined variable 'v'
lib/ansible/modules/packaging/language/npm.py:182:23: undefined-variable Undefined variable 'v'
lib/ansible/modules/packaging/language/npm.py:183:16: ansible-format-automatic-specification Format string contains automatic field numbering specification

The test ansible-test sanity --test pep8 [explain] failed with 2 errors:

lib/ansible/modules/packaging/language/npm.py:149:5: E271 multiple spaces after keyword
lib/ansible/modules/packaging/language/npm.py:179:9: E306 expected 1 blank line before a nested definition, found 0

The test ansible-test sanity --test validate-modules [explain] failed with 2 errors:

lib/ansible/modules/packaging/language/npm.py:0:0: E305 DOCUMENTATION.options.options.type: not a valid value for dictionary value @ data['options']['options']['type']. Got 'dict'
lib/ansible/modules/packaging/language/npm.py:0:0: E309 version_added for new option (options) should be 2.7. Currently 0.0

click here for bot help

@ansibot
Copy link
Contributor

ansibot commented Jun 30, 2018

The test ansible-test sanity --test pep8 [explain] failed with 1 error:

lib/ansible/modules/packaging/language/npm.py:152:1: E302 expected 2 blank lines, found 1

The test ansible-test sanity --test validate-modules [explain] failed with 1 error:

lib/ansible/modules/packaging/language/npm.py:0:0: E305 DOCUMENTATION.options.options.type: not a valid value for dictionary value @ data['options']['options']['type']. Got 'dict'

click here for bot help

@tmshn tmshn changed the title npm module: added "options" argument WIP: npm module: added "options" argument Jun 30, 2018
@ansibot ansibot added the WIP This issue/PR is a work in progress. Nevertheless it was shared for getting input from peers. label Jun 30, 2018
@ansibot
Copy link
Contributor

ansibot commented Jun 30, 2018

The test ansible-test sanity --test no-underscore-variable [explain] failed with 1 error:

lib/ansible/modules/packaging/language/npm.py:229:13: use `dummy` instead of `_` for a variable name

The test ansible-test sanity --test validate-modules [explain] failed with 1 error:

lib/ansible/modules/packaging/language/npm.py:0:0: E305 DOCUMENTATION.options.options.type: not a valid value for dictionary value @ data['options']['options']['type']. Got 'dict'

click here for bot help

@ansibot
Copy link
Contributor

ansibot commented Jun 30, 2018

The test ansible-test sanity --test no-underscore-variable [explain] failed with 1 error:

lib/ansible/modules/packaging/language/npm.py:228:13: use `dummy` instead of `_` for a variable name

click here for bot help

@ansibot ansibot added needs_ci This PR requires CI testing to be performed. Please close and re-open this PR to trigger CI. stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. labels Jun 30, 2018
@ansibot ansibot removed needs_ci This PR requires CI testing to be performed. Please close and re-open this PR to trigger CI. stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. labels Jun 30, 2018
@ryansb ryansb removed the needs_triage Needs a first human triage before being processed. label Jul 3, 2018
@ansibot ansibot added the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label Jul 11, 2018
@ansibot ansibot added the needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html label Oct 24, 2018
@ansibot ansibot added the packaging Packaging category label Feb 17, 2019
@ansibot ansibot added the support:core This issue/PR relates to code supported by the Ansible Engineering Team. label Mar 27, 2020
@ansibot ansibot added collection Related to Ansible Collections work collection:community.general needs_collection_redirect https://github.com/ansible/ansibullbot/blob/master/docs/collection_migration.md and removed support:core This issue/PR relates to code supported by the Ansible Engineering Team. labels Apr 29, 2020
@ansibot
Copy link
Contributor

ansibot commented Aug 16, 2020

Thank you very much for your interest in Ansible. Ansible has migrated much of the content into separate repositories to allow for more rapid, independent development. We are closing this issue/PR because this content has been moved to one or more collection repositories.

For further information, please see:
https://github.com/ansible/ansibullbot/blob/master/docs/collection_migration.md

@ansibot ansibot closed this Aug 16, 2020
@ansible ansible locked and limited conversation to collaborators Sep 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.7 This issue/PR affects Ansible v2.7 bot_closed collection:community.general collection Related to Ansible Collections work feature This issue/PR relates to a feature request. module This issue/PR relates to a module. needs_collection_redirect https://github.com/ansible/ansibullbot/blob/master/docs/collection_migration.md needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. packaging Packaging category stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. support:community This issue/PR relates to code supported by the Ansible community. test This PR relates to tests. WIP This issue/PR is a work in progress. Nevertheless it was shared for getting input from peers.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants