summaryrefslogtreecommitdiffstats
path: root/src/ansiblelint/rules/package_latest.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/ansiblelint/rules/package_latest.py')
-rw-r--r--src/ansiblelint/rules/package_latest.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/ansiblelint/rules/package_latest.py b/src/ansiblelint/rules/package_latest.py
index a00a540..9c8ce3c 100644
--- a/src/ansiblelint/rules/package_latest.py
+++ b/src/ansiblelint/rules/package_latest.py
@@ -1,4 +1,5 @@
"""Implementations of the package-latest rule."""
+
# Copyright (c) 2016 Will Thames <will@thames.id.au>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -79,5 +80,6 @@ class PackageIsNotLatestRule(AnsibleLintRule):
task["action"]["__ansible_module__"] in self._package_managers
and not task["action"].get("version")
and not task["action"].get("update_only")
+ and not task["action"].get("only_upgrade")
and task["action"].get("state") == "latest"
)