mirror of
https://github.com/thegeeklab/ansible-later.git
synced 2024-11-24 22:00:40 +00:00
fix: strip builtin fqc prefix from task action (#759)
This commit is contained in:
parent
da5d3c21c2
commit
74f58c59c9
@ -23,8 +23,8 @@ from ansiblelater.rule import RuleBase
|
|||||||
|
|
||||||
class CheckFilePermissionOctal(RuleBase):
|
class CheckFilePermissionOctal(RuleBase):
|
||||||
rid = "ANS119"
|
rid = "ANS119"
|
||||||
description = "Numeric file permissions without leading zero can behave in unexpected ways"
|
description = "Numeric file permissions without a leading zero can behave unexpectedly"
|
||||||
helptext = '`mode: {mode}` should be strings with a leading zero `mode: "0{mode}"'
|
helptext = '`mode: {mode}` should be strings with a leading zero `mode: "0{mode}"`'
|
||||||
types = ["playbook", "task", "handler"]
|
types = ["playbook", "task", "handler"]
|
||||||
|
|
||||||
def check(self, candidate, settings):
|
def check(self, candidate, settings):
|
||||||
|
@ -411,7 +411,9 @@ def normalize_task(task, filename, custom_modules=None):
|
|||||||
|
|
||||||
normalized[k] = v
|
normalized[k] = v
|
||||||
|
|
||||||
normalized["action"] = {"__ansible_module__": action}
|
# convert builtin fqn calls to short forms because most rules know only
|
||||||
|
# about short calls
|
||||||
|
normalized["action"] = {"__ansible_module__": action.removeprefix("ansible.builtin.")}
|
||||||
|
|
||||||
if "_raw_params" in arguments:
|
if "_raw_params" in arguments:
|
||||||
normalized["action"]["__ansible_arguments__"] = arguments["_raw_params"].strip().split()
|
normalized["action"]["__ansible_arguments__"] = arguments["_raw_params"].strip().split()
|
||||||
|
Loading…
Reference in New Issue
Block a user