mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-26 20:31:27 -07:00
Fix cosmetic problems in YAML source
This change corrects problems reported by the `yamllint` linter.
Since key duplication problems were removed in 4d48711
, this commit
mainly fixes trailing spaces and extra empty lines at beginning/end of
files.
This commit is contained in:
parent
8874c1dc39
commit
0e834fc9e4
251 changed files with 214 additions and 510 deletions
|
@ -5,8 +5,8 @@
|
|||
|
||||
gather_facts: False
|
||||
|
||||
roles:
|
||||
roles:
|
||||
|
||||
# this one has a lot of things that should fail, see makefile for operation w/ tags
|
||||
|
||||
- { role: test_bad_parsing }
|
||||
- { role: test_bad_parsing }
|
||||
|
|
|
@ -5,5 +5,5 @@
|
|||
|
||||
gather_facts: False
|
||||
|
||||
roles:
|
||||
roles:
|
||||
- { role: test_good_parsing, tags: test_good_parsing }
|
||||
|
|
|
@ -19,9 +19,9 @@
|
|||
# the following tests all raise errors, to use them in a Makefile, we run them with different flags, as
|
||||
# otherwise ansible stops at the first one and we want to ensure STOP conditions for each
|
||||
|
||||
- set_fact:
|
||||
- set_fact:
|
||||
test_file: "{{ output_dir }}/ansible_test_file" # FIXME, use set tempdir
|
||||
test_input: "owner=test"
|
||||
test_input: "owner=test"
|
||||
bad_var: "{{ output_dir }}' owner=test"
|
||||
chdir: "mom chdir=/tmp"
|
||||
tags: common
|
||||
|
|
|
@ -2,4 +2,3 @@
|
|||
file: path={{ test_file }} {{ test_input }}
|
||||
failed_when: False # ignore the module, just test the parser
|
||||
tags: scenario1
|
||||
|
||||
|
|
|
@ -2,4 +2,3 @@
|
|||
file: path={{ test_file }} owner=test2 {{ test_input }}
|
||||
failed_when: False # ignore the module, just test the parser
|
||||
tags: scenario2
|
||||
|
||||
|
|
|
@ -2,4 +2,3 @@
|
|||
shell: echo hi {{ chdir }}
|
||||
failed_when: False
|
||||
tags: scenario3
|
||||
|
||||
|
|
|
@ -2,4 +2,3 @@
|
|||
file: "name={{ bad_var }}"
|
||||
failed_when: False
|
||||
tags: scenario4
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
# various tests of things that should not cause parsing problems
|
||||
|
||||
- set_fact:
|
||||
- set_fact:
|
||||
test_input: "a=1 a=2 a=3"
|
||||
|
||||
- set_fact:
|
||||
|
@ -26,7 +26,7 @@
|
|||
echo old
|
||||
echo mcdonald
|
||||
echo had
|
||||
echo a
|
||||
echo a
|
||||
echo farm
|
||||
|
||||
- shell: echo "dog"
|
||||
|
@ -46,9 +46,9 @@
|
|||
- name: a quoted argument is not sent to the shell module as anything but a string parameter
|
||||
shell: echo 'dog' 'executable=/usr/bin/python'
|
||||
register: result
|
||||
|
||||
|
||||
- debug: var=result.cmd
|
||||
|
||||
|
||||
- assert:
|
||||
that:
|
||||
result.cmd == "echo 'dog' 'executable=/usr/bin/python'"
|
||||
|
@ -56,7 +56,7 @@
|
|||
- name: it is valid to pass multiple key=value arguments because the shell doesn't check key=value arguments
|
||||
shell: echo quackquack=here quackquack=everywhere
|
||||
register: result
|
||||
|
||||
|
||||
- assert:
|
||||
that:
|
||||
result.cmd == 'echo quackquack=here quackquack=everywhere'
|
||||
|
@ -64,7 +64,7 @@
|
|||
- name: the same is true with quoting
|
||||
shell: echo "quackquack=here quackquack=everywhere"
|
||||
register: result
|
||||
|
||||
|
||||
- assert:
|
||||
that:
|
||||
result.cmd == 'echo "quackquack=here quackquack=everywhere"'
|
||||
|
@ -85,9 +85,9 @@
|
|||
shell: echo {{ test_input }}
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
- assert:
|
||||
that:
|
||||
result.cmd == "echo a=1 a=2 a=3"
|
||||
result.cmd == "echo a=1 a=2 a=3"
|
||||
|
||||
- name: more shell duplicates
|
||||
shell: echo foo=bar foo=bar
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue