-
Notifications
You must be signed in to change notification settings - Fork 705
Labels
newTriage requiredTriage required
Description
Summary
I receive an incorrect warning when using ansible.builtin.command
to set or unset an environment with systemctl
. The warning suggests using ansible.builtin.systemd
instead, which does not natively support it.
Issue Type
- Bug Report
OS / ENVIRONMENT
ansible-lint 25.8.2 using ansible-core:2.19.2 ansible-compat:25.8.1 ruamel-yaml:0.18.15 ruamel-yaml-clib:0.2.12
- ansible installation method: pip
- ansible-lint installation method: pip
STEPS TO REPRODUCE
- name: Set MYSQLD_OPTS environment
ansible.builtin.command:
cmd: systemctl set-environment MYSQLD_OPTS="--skip-grant-tables"
changed_when: true
become: true
Desired Behavior
No linting failures.
Actual Behavior
I receive an error message indicating that I should use the ansible.builtin.systemd
module instead of the ansible.builtin.command
module.
systemctl used in place of systemd moduleansible-lint[command-instead-of-module]
Metadata
Metadata
Assignees
Labels
newTriage requiredTriage required
Type
Projects
Status
No status