Skip to content

Commit

Permalink
md doc for deprecated_module
Browse files Browse the repository at this point in the history
  • Loading branch information
oraNod committed Sep 1, 2022
1 parent 50612ef commit 4550417
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions src/ansiblelint/rules/deprecated_module.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# deprecated-module

This rule identifies deprecated modules in playbooks.
You should avoid using deprecated modules because they are not maintained, which can pose a security risk.
Additionally when a module is deprecated it is available temporarily with a plan for future removal.

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.

## Problematic Code

```yaml
---
- name: Example playbook
hosts: localhost
tasks:
- name: Configure VLAN ID
ansible.netcommon.net_vlan: # <-- This module is deprecated.
vlan_id: 20
```

## Correct Code

```yaml
---
- name: Example playbook
hosts: localhost
tasks:
- name: Configure VLAN ID
dellemc.enterprise_sonic.sonic_vlans: # <-- Use a platform specific module.
config:
- vlan_id: 20
```

0 comments on commit 4550417

Please sign in to comment.