-
Notifications
You must be signed in to change notification settings - Fork 709
Open
Labels
Description
Summary
When using --fix, every oneliner that has a variable inside is broken.
For example, if I have this:
- dnf: name=https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-{{ ansible_distribution_version }}.noarch.rpmI get
- ansible.builtin.dnf:
name: https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-{{
cmd: ansible_distribution_version }}.noarch.rpmIssue Type
- Bug Report
OS / ENVIRONMENT
ansible-lint 25 using ansible-core:2.18.11 ansible-compat:25.8.1 ruamel-yaml:0.18.16 ruamel-yaml-clib:0.2.12- ansible installation method: fedora 43 dnf
- ansible-lint installation method: fedora 43 dnf
STEPS TO REPRODUCE
For example this role:
---
- dnf: name=https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-{{ ansible_distribution_version }}.noarch.rpm state=latest
become: true
- dnf: name=https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-{{ ansible_distribution_version }}.noarch.rpm
become: true
- dnf: name=kodi state=latest
become: trueansible-lint --fix this-file.ymlDesired Behavior
---
- ansible.builtin.dnf:
name: https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-{{ ansible_distribution_version }}.noarch.rpm
state: latest
become: true
- ansible.builtin.dnf:
name: https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-{{ ansible_distribution_version }}.noarch.rpm
become: true
- ansible.builtin.dnf:
name: kodi
state: latest
become: true
Actual Behavior
---
- ansible.builtin.dnf:
name: https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-{{
state: latest
cmd: ansible_distribution_version }}.noarch.rpm
become: true
- ansible.builtin.dnf:
name: https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-{{
cmd: ansible_distribution_version }}.noarch.rpm
become: true
- ansible.builtin.dnf:
name: kodi
state: latest
become: truePlease give some details of what is happening. Include a minimum complete
verifiable example with:
- minimized playbook to reproduce the error
- the output of running ansible-lint including the command line used
- if you're getting a stack trace, also the output of
ansible-playbook --syntax-check playbook
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
No status