From f108f8ef721c53f52f1d4342762772f6ff635ee0 Mon Sep 17 00:00:00 2001 From: shane-walker Date: Sat, 24 Sep 2016 01:31:40 -0500 Subject: [PATCH] Fixes #1375, will check for new and outdated packages when running. (#3020) --- lib/ansible/modules/extras/packaging/language/npm.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/ansible/modules/extras/packaging/language/npm.py b/lib/ansible/modules/extras/packaging/language/npm.py index 53ce1e77c5..e15bbea903 100644 --- a/lib/ansible/modules/extras/packaging/language/npm.py +++ b/lib/ansible/modules/extras/packaging/language/npm.py @@ -252,7 +252,10 @@ def main(): elif state == 'latest': installed, missing = npm.list() outdated = npm.list_outdated() - if len(missing) or len(outdated): + if len(missing): + changed = True + npm.install() + if len(outdated): changed = True npm.update() else: #absent