15 lines
423 B
Bash
15 lines
423 B
Bash
#!/usr/bin/env bats
|
|
#
|
|
|
|
#
|
|
# Idempotence test
|
|
# from https://github.com/neillturner/kitchen-ansible/issues/92
|
|
#
|
|
|
|
@test "Second run should change nothing" {
|
|
skip "failing on service started on first run in kitchen+lxc"
|
|
run bash -c "ansible-playbook -i /tmp/kitchen/hosts /tmp/kitchen/default.yml -c local 2>&1 | tee /tmp/idempotency.test | grep -q 'changed=0.*failed=0' && exit 0 || exit 1"
|
|
[ "$status" -eq 0 ]
|
|
}
|
|
|