You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible/test/integration/targets/set_stats/runme.sh

14 lines
368 B
Bash

#!/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