ansible/test/integration/roles/test_bad_parsing/tasks/main.yml

57 lines
1.8 KiB
YAML
Raw Normal View History

2014-07-24 02:35:24 +00:00
# test code for the ping module
# (c) 2014, Michael DeHaan <michael@ansible.com>
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# 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:
test_file: "{{ output_dir }}/ansible_test_file" # FIXME, use set tempdir
2014-07-24 02:35:24 +00:00
test_input: "owner=test"
bad_var: "{{ output_dir }}' owner=test"
2014-07-24 02:35:24 +00:00
chdir: "mom chdir=/tmp"
tags: common
- file: name={{test_file}} state=touch
tags: common
2015-05-13 18:04:12 +00:00
- name: include test that we cannot insert arguments
include: scenario1.yml
2014-07-24 02:35:24 +00:00
tags: scenario1
2015-05-13 18:04:12 +00:00
- name: include test that we cannot duplicate arguments
include: scenario2.yml
2014-07-24 02:35:24 +00:00
tags: scenario2
2015-05-13 18:04:12 +00:00
- name: include test that we can't do this for the shell module
2015-07-28 02:54:57 +00:00
include: scenario3.yml
2014-07-24 02:35:24 +00:00
tags: scenario3
2015-05-13 18:04:12 +00:00
- name: include test that we can't go all Little Bobby Droptables on a quoted var to add more
include: scenario4.yml
tags: scenario4
- name: test that a missing/malformed jinja2 filter fails
debug: msg="{{output_dir|badfiltername}}"
tags: scenario5
2015-07-14 15:44:45 +00:00
register: filter_fail
ignore_errors: yes
2015-07-14 15:44:45 +00:00
- assert:
that:
- filter_fail|failed