Initial commit - playbook ping
This commit is contained in:
15
ping.yml
Normal file
15
ping.yml
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
---
|
||||||
|
- name: Test de connexion
|
||||||
|
hosts: all
|
||||||
|
gather_facts: no
|
||||||
|
tasks:
|
||||||
|
- name: Ping all hosts
|
||||||
|
ansible.builtin.ping:
|
||||||
|
|
||||||
|
- name: Afficher le hostname
|
||||||
|
ansible.builtin.command: hostname
|
||||||
|
register: hostname_output
|
||||||
|
|
||||||
|
- name: Montrer le résultat
|
||||||
|
ansible.builtin.debug:
|
||||||
|
msg: "Machine: {{ hostname_output.stdout }}"
|
||||||
Reference in New Issue
Block a user