summaryrefslogtreecommitdiffstats
path: root/test/integration/targets/xml/tasks/test-count.yml
blob: cbc97e323c5a96136dc68908d67a4de63dcf1c2e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
---
  - name: Setup test fixture
    copy:
      src: fixtures/ansible-xml-beers.xml
      dest: /tmp/ansible-xml-beers.xml


  - name: Add child element
    xml:
      path: /tmp/ansible-xml-beers.xml
      xpath: /business/beers/beer
      count: yes
    register: beers

  - name: Test expected result
    assert:
      that:
      - beers.changed == false
      - beers.count == 3