You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This rule identifies deprecated modules in playbooks.
4
+
You should avoid using deprecated modules because they are not maintained, which can pose a security risk.
5
+
Additionally when a module is deprecated it is available temporarily with a plan for future removal.
6
+
7
+
Refer to the [Ansible module index](https://docs.ansible.com/ansible/latest/collections/index_module.html) for information about replacements and removal dates for deprecated modules.
8
+
9
+
## Problematic Code
10
+
11
+
```yaml
12
+
---
13
+
- name: Example playbook
14
+
hosts: localhost
15
+
tasks:
16
+
- name: Configure VLAN ID
17
+
ansible.netcommon.net_vlan: # <-- This module is deprecated.
18
+
vlan_id: 20
19
+
```
20
+
21
+
## Correct Code
22
+
23
+
```yaml
24
+
---
25
+
- name: Example playbook
26
+
hosts: localhost
27
+
tasks:
28
+
- name: Configure VLAN ID
29
+
dellemc.enterprise_sonic.sonic_vlans: # <-- Use a platform specific module.
0 commit comments