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:
Adrien Vergé 2016-04-18 16:47:38 +02:00 committed by Matt Clay
commit 0e834fc9e4
251 changed files with 214 additions and 510 deletions

View file

@ -1,3 +1,2 @@
dependencies:
dependencies:
- prepare_tests

View file

@ -15,4 +15,3 @@
- name: remove ppa key
apt_key: id={{test_ppa_key}} state=absent
ignore_errors: true

View file

@ -18,4 +18,3 @@
- include: 'apt.yml'
when: ansible_distribution in ('Ubuntu')

View file

@ -1,3 +1,2 @@
---
- { include: cli.yaml, tags: ['cli'] }

View file

@ -13,5 +13,3 @@
with_items: "{{ test_items }}"
loop_control:
loop_var: test_case_to_run

View file

@ -1,3 +1,2 @@
---
- { include: cli.yaml, tags: ['cli'] }

View file

@ -13,5 +13,3 @@
with_items: "{{ test_items }}"
loop_control:
loop_var: test_case_to_run

View file

@ -1,3 +1,2 @@
---
- { include: cli.yaml, tags: ['cli'] }

View file

@ -90,4 +90,3 @@
that:
- "result.state == 'file'"
- "result.checksum == '505359f48c65b3904127cf62b912991d4da7ed6d'"

View file

@ -1,3 +1,2 @@
dependencies:
dependencies:
- prepare_tests

View file

@ -57,7 +57,7 @@
- "'finished' not in async_result or async_result.finished == 0"
- name: test skipped task handling
command: /bin/true
command: /bin/true
async: 15
poll: 0
when: False

View file

@ -1,2 +1,2 @@
dependencies:
dependencies:
- prepare_tests

View file

@ -80,4 +80,3 @@
name: "{{ become_test_user }}"
state: "absent"
remove: "yes"

View file

@ -1,3 +1,2 @@
dependencies:
dependencies:
- prepare_tests

View file

@ -51,4 +51,3 @@
that:
- 'async_hello_ansible.msg == "Hello, Ansible!"'
when: not async_hello_ansible|skipped

View file

@ -3,4 +3,3 @@
- role: test_binary_modules
tags:
- test_binary_modules

View file

@ -1,3 +1,2 @@
dependencies:
dependencies:
- prepare_tests

View file

@ -23,7 +23,7 @@
- debug: var=shell_result
- name: changed should always be true for shell
assert:
assert:
that:
- "shell_result.changed"
@ -35,8 +35,6 @@
- debug: var=shell_result
- name: changed should be false
assert:
assert:
that:
- "not shell_result.changed"

View file

@ -15,4 +15,3 @@
#
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.

View file

@ -1,3 +1,2 @@
dependencies:
dependencies:
- prepare_tests

View file

@ -20,7 +20,7 @@
shell: echo 'testing'
when: 1 == 1
register: result
- name: assert conditional '==' ran
assert:
that:

View file

@ -1,3 +1,2 @@
dependencies:
dependencies:
- prepare_tests

View file

@ -14,5 +14,3 @@
with_items: "{{ test_items }}"
loop_control:
loop_var: test_case_to_run

View file

@ -1,3 +1,2 @@
---
- { include: cli.yaml, tags: ['cli'] }

View file

@ -13,5 +13,3 @@
with_items: "{{ test_items }}"
loop_control:
loop_var: test_case_to_run

View file

@ -1,3 +1,2 @@
---
- { include: cli.yaml, tags: ['cli'] }

View file

@ -14,5 +14,3 @@
with_items: "{{ test_items }}"
loop_control:
loop_var: test_case_to_run

View file

@ -1,3 +1,2 @@
---
- { include: cli.yaml, tags: ['cli'] }

View file

@ -13,5 +13,3 @@
with_items: "{{ test_items }}"
loop_control:
loop_var: test_case_to_run

View file

@ -1,3 +1,2 @@
---
- { include: cli.yaml, tags: ['cli'] }

View file

@ -13,5 +13,3 @@
with_items: "{{ test_items }}"
loop_control:
loop_var: test_case_to_run

View file

@ -1,3 +1,2 @@
---
- { include: cli.yaml, tags: ['cli'] }

View file

@ -14,5 +14,3 @@
with_items: "{{ test_items }}"
loop_control:
loop_var: test_case_to_run

View file

@ -1,3 +1,2 @@
---
- { include: cli.yaml, tags: ['cli'] }

View file

@ -14,5 +14,3 @@
with_items: "{{ test_items }}"
loop_control:
loop_var: test_case_to_run

View file

@ -1,3 +1,2 @@
---
- { include: cli.yaml, tags: ['cli'] }

View file

@ -13,5 +13,3 @@
with_items: "{{ test_items }}"
loop_control:
loop_var: test_case_to_run

View file

@ -1,3 +1,2 @@
---
- { include: cli.yaml, tags: ['cli'] }

View file

@ -14,5 +14,3 @@
with_items: "{{ test_items }}"
loop_control:
loop_var: test_case_to_run

View file

@ -1,3 +1,2 @@
---
- { include: cli.yaml, tags: ['cli'] }

View file

@ -20,4 +20,3 @@
# We want to test that for people who don't want to upgrade their systems.
- include: 'dnf.yml'
when: (ansible_distribution in ['RedHat', 'CentOS', 'ScientificLinux'] and False) or (ansible_distribution in ['Fedora'] and ansible_distribution_major_version >= 23)

View file

@ -3,4 +3,3 @@
state: present
# Note: add docker-registry when available
name: docker.io,python-docker,netcat-openbsd,nginx

View file

@ -20,4 +20,3 @@
#- include: registry-tests.yml
# Add other distributions as the proper packages become available
# when: ansible_distribution in ['Fedora']

View file

@ -103,12 +103,12 @@
- name: Setup nginx with a user/password
copy:
src: docker-registry.htpasswd
dest: /etc/nginx/docker-registry.htpasswd
dest: /etc/nginx/docker-registry.htpasswd
- name: Setup nginx with a config file
copy:
src: nginx-docker-registry.conf
dest: /etc/nginx/conf.d/nginx-docker-registry.conf
dest: /etc/nginx/conf.d/nginx-docker-registry.conf
- name: Setup nginx docker cert
copy:
@ -186,4 +186,3 @@
line: "127.0.0.1 dockertest.ansible.com"
dest: /etc/hosts
state: absent

View file

@ -13,5 +13,3 @@
with_items: "{{ test_items }}"
loop_control:
loop_var: test_case_to_run

View file

@ -13,5 +13,3 @@
with_items: "{{ test_items }}"
loop_control:
loop_var: test_case_to_run

View file

@ -1,4 +1,3 @@
---
- { include: cli.yaml, tags: ['cli'] }
- { include: eapi.yaml, tags: ['eapi'] }

View file

@ -13,5 +13,3 @@
with_items: "{{ test_items }}"
loop_control:
loop_var: test_case_to_run

View file

@ -13,5 +13,3 @@
with_items: "{{ test_items }}"
loop_control:
loop_var: test_case_to_run

View file

@ -1,4 +1,3 @@
---
- { include: cli.yaml, tags: ['cli'] }
- { include: eapi.yaml, tags: ['eapi'] }

View file

@ -1,4 +1,3 @@
---
testcase: "*"
test_items: []

View file

@ -13,5 +13,3 @@
with_items: "{{ test_items }}"
loop_control:
loop_var: test_case_to_run

View file

@ -13,5 +13,3 @@
with_items: "{{ test_items }}"
loop_control:
loop_var: test_case_to_run

View file

@ -13,5 +13,3 @@
with_items: "{{ test_items }}"
loop_control:
loop_var: test_case_to_run

View file

@ -1,4 +1,3 @@
---
- { include: cli.yaml, tags: ['cli'] }
- { include: eapi.yaml, tags: ['eapi'] }

View file

@ -13,5 +13,3 @@
with_items: "{{ test_items }}"
loop_control:
loop_var: test_case_to_run

View file

@ -13,5 +13,3 @@
with_items: "{{ test_items }}"
loop_control:
loop_var: test_case_to_run

View file

@ -1,4 +1,3 @@
---
- { include: cli.yaml, tags: ['cli'] }
- { include: eapi.yaml, tags: ['eapi'] }

View file

@ -1,3 +1,2 @@
dependencies:
dependencies:
- prepare_tests

View file

@ -22,12 +22,12 @@
- shell: echo "[general]" > {{ fact_dir }}/preferences.fact
- shell: echo "bar=loaded" >> {{ fact_dir }}/preferences.fact
- setup:
fact_path: "{{ fact_dir | expanduser }}"
- setup:
fact_path: "{{ fact_dir | expanduser }}"
filter: "*local*"
register: setup_result
- debug: var=setup_result
- debug: var=setup_result
- assert:
that:

View file

@ -66,4 +66,3 @@
that:
- "'failed' in result and not result.failed"
- "'failed_when_result' in result and not result.failed_when_result"

View file

@ -1,3 +1,2 @@
dependencies:
dependencies:
- prepare_tests

View file

@ -94,4 +94,3 @@
assert:
that:
'diff.stdout == ""'

View file

@ -1,3 +1,2 @@
dependencies:
dependencies:
- prepare_tests

View file

@ -108,7 +108,7 @@
- name: touch a hard link
file: src={{output_file}} dest={{output_dir}}/hard.txt state=touch
register: file6_touch_result
register: file6_touch_result
- name: verify that the hard link was touched
assert:

View file

@ -27,4 +27,4 @@
- "file_se_result.secontext == 'unconfined_u:object_r:admin_home_t:s0'"
- name: remove the file used for testing
file: path={{output_dir}}/foo-se.txt state=absent
file: path={{output_dir}}/foo-se.txt state=absent

View file

@ -1,3 +1,2 @@
dependencies:
dependencies:
- prepare_tests

View file

@ -109,4 +109,3 @@
assert:
that:
- "users | json_query('[*].hosts[].host') == ['host_a', 'host_b', 'host_c', 'host_d']"

View file

@ -129,4 +129,3 @@
- 'ansible_interfaces|default("UNDEF_NET") != "UNDEF_NET"'
- 'ansible_mounts|default("UNDEF_HW") == "UNDEF_HW"'
- 'ansible_virtualization_role|default("UNDEF_VIRT") == "UNDEF_VIRT"'

View file

@ -1,3 +1,2 @@
dependencies:
dependencies:
- prepare_tests

View file

@ -23,18 +23,17 @@
shell: gem list | egrep '^gist '
register: uninstall
failed_when: "uninstall.rc != 1"
- name: install a gem
gem: name=gist state=present
register: gem_result
- name: verify module output properties
assert:
that:
assert:
that:
- "'name' in gem_result"
- "'changed' in gem_result"
- "'state' in gem_result"
- "'changed' in gem_result"
- "'state' in gem_result"
- name: verify gist is installed
shell: gem list | egrep '^gist '
shell: gem list | egrep '^gist '

View file

@ -1,4 +1,3 @@
dependencies:
- prepare_tests
- prepare_http_tests

View file

@ -37,15 +37,15 @@
geturl_dstfile: "{{ output_dir | expanduser }}/aurlfile_copy.txt"
- name: Create source file
copy:
dest: "{{ geturl_srcfile }}"
content: "foobar"
copy:
dest: "{{ geturl_srcfile }}"
content: "foobar"
- name: test file fetch
get_url:
url: "{{ 'file://' + geturl_srcfile }}"
dest: "{{ geturl_dstfile }}"
register: result
dest: "{{ geturl_dstfile }}"
register: result
- name: assert success and change
assert:
@ -56,8 +56,8 @@
- name: test nonexisting file fetch
get_url:
url: "{{ 'file://' + geturl_srcfile + 'NOFILE' }}"
dest: "{{ geturl_dstfile + 'NOFILE' }}"
register: result
dest: "{{ geturl_dstfile + 'NOFILE' }}"
register: result
ignore_errors: True
- name: assert success and change

View file

@ -1,3 +1,2 @@
dependencies:
dependencies:
- prepare_tests

View file

@ -1,2 +1,2 @@
- name: echoing handler
command: echo CALLED_HANDLER_{{ inventory_hostname }}
command: echo CALLED_HANDLER_{{ inventory_hostname }}

View file

@ -21,6 +21,6 @@
- name: EXPECTED FAILURE fail task for C
fail: msg="Fail C"
when: inventory_hostname == 'C'
- name: echo after A and C have failed
command: echo CALLED_TASK_{{ inventory_hostname }}
command: echo CALLED_TASK_{{ inventory_hostname }}

View file

@ -1,5 +1,5 @@
- name: set handler fact
set_fact:
set_fact:
handler_called: True
- name: test handler
debug: msg="handler called"

View file

@ -1,2 +1 @@
dependencies: []

View file

@ -24,7 +24,7 @@
- name: notify the handler for host A only
shell: echo
notify:
notify:
- set handler fact
when: inventory_hostname == 'A'
tags: scenario1

View file

@ -1,5 +1,5 @@
- name: set_handler_fact_1
set_fact:
set_fact:
handler1_called: True
- name: set_handler_fact_2

View file

@ -18,13 +18,13 @@
- name: notify the first handler
shell: echo
notify:
notify:
- set_handler_fact_1
- name: force handler execution now
meta: "flush_handlers"
- name: assert handler1 ran and not handler2
- name: assert handler1 ran and not handler2
assert:
that:
- "handler1_called is defined"
@ -36,6 +36,5 @@
- name: notify the second handler
shell: echo
notify:
notify:
- set_handler_fact_2

View file

@ -12,7 +12,7 @@
connection: local
tasks:
- name: verify handler2 ran
assert:
assert:
that:
- "not hostvars[inventory_hostname]['handler1_called']"
- "'handler2_called' in hostvars[inventory_hostname]"

View file

@ -15,4 +15,3 @@
#
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.

View file

@ -19,13 +19,13 @@
- name: get the hash behavior env setting
shell: env | grep ^ANSIBLE_HASH_BEHAVIOUR'=' | cut -f2- -d'='
register: hash_behavior
# This only works with the local connection. The way this test is run means the
# This only works with the local connection. The way this test is run means the
connection: local
delegate_to: localhost
- name: debug hash behavior result
debug: var=hash_behavior.stdout
debug: var=hash_behavior.stdout
- name: assert hash behavior is merge or replace
assert:
@ -39,4 +39,3 @@
assert:
that:
- "hash_behavior.stdout == 'merge' and test_hash == merged_hash or hash_behavior.stdout == 'replace' and test_hash == replaced_hash"

View file

@ -1,3 +1,2 @@
dependencies:
dependencies:
- prepare_tests

View file

@ -43,7 +43,7 @@
- "'before' in hg_result"
- "'after' in hg_result"
- "not hg_result.before"
- "hg_result.changed"
- "hg_result.changed"
- name: repeated checkout
hg: repo={{ repo }} dest={{ checkout_dir }}
@ -72,7 +72,3 @@
assert:
that:
- "not hg_result2.changed"

View file

@ -1,3 +1,2 @@
dependencies:
dependencies:
- prepare_tests

View file

@ -20,4 +20,3 @@
shell: /bin/false
register: failed
ignore_errors: True

View file

@ -1,2 +1 @@
- include: more_handlers.yml

View file

@ -10,5 +10,3 @@
- "ca == 4001"
- "cb == 4002"
- "cc == 4003"

View file

@ -1,10 +1,9 @@
- set_fact:
- set_fact:
ca: "{{ a }}"
- debug: var=ca
- set_fact:
- set_fact:
cb: "{{b}}"
- debug: var=cb
- set_fact:
cc: "{{ c }}"
- debug: var=cc

View file

@ -26,7 +26,7 @@
- "cb == '2'"
- "cc == '3'"
- set_fact:
- set_fact:
a: 101
b: 102
c: 103
@ -34,7 +34,7 @@
- include: included_task1.yml a={{a}} b={{b}} c=103
- name: verify variable include params
assert:
assert:
that:
- "ca == 101"
- "cb == 102"
@ -80,5 +80,3 @@
# both these via a handler include
- included_handler
- verify_handler

View file

@ -1,8 +1,7 @@
- name: verify playbook includes can take parameters
hosts: testhost
tasks:
- assert:
- assert:
that:
- "parameter1 == 'asdf'"
- "parameter2 == 'jkl'"
@ -10,7 +9,7 @@
- name: verify task include logic
hosts: testhost
gather_facts: True
roles:
roles:
- { role: test_includes, tags: test_includes }
tasks:
- include: roles/test_includes/tasks/not_a_role_task.yml

View file

@ -13,5 +13,3 @@
with_items: "{{ test_items }}"
loop_control:
loop_var: test_case_to_run

View file

@ -1,3 +1,2 @@
---
- { include: cli.yaml, tags: ['cli'] }

View file

@ -13,5 +13,3 @@
with_items: "{{ test_items }}"
loop_control:
loop_var: test_case_to_run

View file

@ -1,3 +1,2 @@
---
- { include: cli.yaml, tags: ['cli'] }

View file

@ -13,5 +13,3 @@
with_items: "{{ test_items }}"
loop_control:
loop_var: test_case_to_run

View file

@ -1,3 +1,2 @@
---
- { include: cli.yaml, tags: ['cli'] }

View file

@ -13,5 +13,3 @@
with_items: "{{ test_items }}"
loop_control:
loop_var: test_case_to_run

Some files were not shown because too many files have changed in this diff Show more