mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
20 lines
621 B
YAML
20 lines
621 B
YAML
|
- hosts: all;!localhost
|
||
|
gather_facts: false
|
||
|
|
||
|
pre_tasks:
|
||
|
- name: check that the consul agent is running locally
|
||
|
local_action: wait_for port=8500 timeout=5
|
||
|
ignore_errors: true
|
||
|
register: consul_running
|
||
|
|
||
|
roles:
|
||
|
|
||
|
- {role: test_consul_inventory,
|
||
|
when: not consul_running.failed is defined}
|
||
|
|
||
|
tasks:
|
||
|
|
||
|
- name: warn that tests are ignored if consul agent is not running
|
||
|
debug: msg="A consul agent needs to be running inorder to run the tests. To setup a vagrant cluster for use in testing see http://github.com/sgargan/consul-vagrant"
|
||
|
when: consul_running.failed is defined
|