inline-env-var¶
This rule checks that playbooks do not set environment variables in the ansible.builtin.command
module.
You should set environment variables with the ansible.builtin.shell
module or the environment
keyword.
Problematic Code¶
---
- name: Example playbook
hosts: all
tasks:
- name: Set environment variable
ansible.builtin.command: MY_ENV_VAR=my_value # <- Sets an environment variable in the command module.