2017-08-09 05:21:03 +02:00
|
|
|
---
|
|
|
|
- name: Setup test fixture
|
|
|
|
copy:
|
2017-08-25 02:07:58 +02:00
|
|
|
src: fixtures/ansible-xml-beers-unicode.xml
|
2017-08-09 05:21:03 +02:00
|
|
|
dest: /tmp/ansible-xml-beers-unicode.xml
|
|
|
|
|
2017-08-25 02:07:58 +02:00
|
|
|
|
2017-08-09 05:21:03 +02:00
|
|
|
- name: Count child element
|
|
|
|
xml:
|
|
|
|
path: /tmp/ansible-xml-beers-unicode.xml
|
|
|
|
xpath: /business/beers/beer
|
2017-08-25 02:07:58 +02:00
|
|
|
count: yes
|
2017-08-09 05:21:03 +02:00
|
|
|
register: beers
|
2017-08-25 02:07:58 +02:00
|
|
|
|
|
|
|
- name: Test expected result
|
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
- beers.changed == false
|
|
|
|
- beers.count == 2
|