-
Notifications
You must be signed in to change notification settings - Fork 660
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add auto-fixing implementation for
no-free-form
rule (#3725)
- Loading branch information
Showing
6 changed files
with
109 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
- name: Example with discouraged free-form syntax | ||
hosts: localhost | ||
tasks: | ||
- name: Create a placefolder file | ||
ansible.builtin.command: # <-- don't use shorthand | ||
chdir: /tmp | ||
cmd: touch foo | ||
changed_when: false | ||
|
||
- name: Use raw to echo | ||
ansible.builtin.raw: echo foo # <-- don't use executable= | ||
args: | ||
executable: /bin/bash | ||
changed_when: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
- name: Example with discouraged free-form syntax | ||
hosts: localhost | ||
tasks: | ||
- name: Create a placefolder file | ||
ansible.builtin.command: chdir=/tmp touch foo # <-- don't use shorthand | ||
changed_when: false | ||
|
||
- name: Use raw to echo | ||
ansible.builtin.raw: executable=/bin/bash echo foo # <-- don't use executable= | ||
changed_when: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters