summaryrefslogtreecommitdiffstats
path: root/src/ansiblelint/rules/deprecated_local_action.md
blob: c52eb9d5a468f6513b330c73fd780e5030a96b28 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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
```