diff options
author | Michael Adam <obnox@samba.org> | 2020-03-24 15:19:53 +0100 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2020-03-25 22:32:23 +0100 |
commit | cb6ff5d9851987ca18c7c286cb1638cb8d9bb53d (patch) | |
tree | d0a475acb5cf96cce765824cd485e7dc9b949cd3 | |
parent | 3a6be3c935dbac16c24ae63f56f2ab99946bda6a (diff) | |
download | samba-integration-cb6ff5d9851987ca18c7c286cb1638cb8d9bb53d.tar.gz samba-integration-cb6ff5d9851987ca18c7c286cb1638cb8d9bb53d.tar.xz samba-integration-cb6ff5d9851987ca18c7c286cb1638cb8d9bb53d.zip |
Expand node connectivity test on setup machine
Test if the nodes can ping each other
Signed-off-by: Michael Adam <obnox@samba.org>
-rw-r--r-- | vagrant/ansible/roles/node.test/tasks/main.yml | 12 | ||||
-rw-r--r-- | vagrant/setup.test.yml | 8 |
2 files changed, 18 insertions, 2 deletions
diff --git a/vagrant/ansible/roles/node.test/tasks/main.yml b/vagrant/ansible/roles/node.test/tasks/main.yml index 962b368..2381b56 100644 --- a/vagrant/ansible/roles/node.test/tasks/main.yml +++ b/vagrant/ansible/roles/node.test/tasks/main.yml @@ -1,2 +1,10 @@ -- name: Test host reachability - command: hostname +- name: read list of nodes from file cluster_nodes.yml + include_vars: + file: cluster-vars.yml + +- name: Test node reachability + # note: `net_ping` module does not work unless we put + # `ansible_network_os` into the inventory... + command: "ping -c 1 {{ item }}" + loop: + "{{ gluster_cluster_hosts }}" diff --git a/vagrant/setup.test.yml b/vagrant/setup.test.yml new file mode 100644 index 0000000..8926b19 --- /dev/null +++ b/vagrant/setup.test.yml @@ -0,0 +1,8 @@ +# +# run the cluster creation on the setup machine +# +- hosts: setup + become: yes + become_method: sudo + roles: + - setup.test |