blob: 27193dc8e058e4a7c8d48aa7ade024377eadc012 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
#!/usr/bin/env bash
set -eux
export ANSIBLE_SHOW_CUSTOM_STATS=yes
# Simple tests
ansible-playbook test_simple.yml -i "${INVENTORY_PATH}"
# This playbook does two set_stats calls setting my_int to 10 and 15.
# The aggregated output should add to 25.
output=$(ansible-playbook test_aggregate.yml -i "${INVENTORY_PATH}" | grep -c '"my_int": 25')
test "$output" -eq 1
|