Skip to content
Snippets Groups Projects
Commit 0efddd15 authored by poulpe's avatar poulpe
Browse files

[Update] Fix test connectivity

parent 3312477c
No related branches found
No related tags found
No related merge requests found
......@@ -136,22 +136,16 @@
ansible.builtin.shell:
cmd: "wg-quick up wg0 2>/dev/null"
- name: Start wireguard for all hosts
hosts: hotes
become: true
tasks:
# - name: Start wg-quick
# ansible.builtin.shell:
# cmd: "wg-quick up wg0 2>/dev/null"
- name: Make curl to web server
ansible.builtin.shell:
cmd: "curl http://10.0.0.1:80/index.html > index.html"
- name: Test connectivity from H1 to H2
hosts: H1
tasks:
- name: Ping form H1 to H2
ansible.builtin.shell: "ping 10.0.0.1 -c 1"
register: result
- name: Print result
debug:
msg: "{{ result.stdout_lines }}"
- name: Check connectivity using curl
shell: "curl 10.0.0.1"
......@@ -160,7 +154,7 @@
- name: Print result
debug:
msg: "Connectivity test {{ 'succeeded' if result.rc == 0 else 'failed' }}."
msg: "{{ result.stdout_lines }}"
...
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment