mirror of
https://github.com/BreizhHardware/cours-ISEN-MD.git
synced 2026-01-18 16:47:24 +01:00
560 B
560 B
#CIPA4 #CloudComputing #DP #Ansible #TP
TP 1
ssh root@135.125.246.84
mdp : moutarde42
Installation
Install ansible on localhost
apt install ansible
Ad-hoc ping
Q: What happened behing the scene? It ping the localhost.
Ad-hoc shell
Q: what command can you use to get the IP of your machine?
ansible localhost -m shell -a "ip a"
Ad-hoc setup
Q: using this module, what other command can you use to retrieve the ip of your host?
ansible localhost -m setup -a "filter=ansible_default_ipv4"