summaryrefslogtreecommitdiffstats
path: root/src/ansiblelint/rules/deprecated_local_action.md
diff options
context:
space:
mode:
Diffstat (limited to 'src/ansiblelint/rules/deprecated_local_action.md')
-rw-r--r--src/ansiblelint/rules/deprecated_local_action.md21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/ansiblelint/rules/deprecated_local_action.md b/src/ansiblelint/rules/deprecated_local_action.md
new file mode 100644
index 0000000..c52eb9d
--- /dev/null
+++ b/src/ansiblelint/rules/deprecated_local_action.md
@@ -0,0 +1,21 @@
+# deprecated-local-action
+
+This rule recommends using `delegate_to: localhost` instead of the
+`local_action`.
+
+## Problematic Code
+
+```yaml
+---
+- name: Task example
+ local_action: # <-- this is deprecated
+ module: ansible.builtin.debug
+```
+
+## Correct Code
+
+```yaml
+- name: Task example
+ ansible.builtin.debug:
+ delegate_to: localhost # <-- recommended way to run on localhost
+```