Lab 3 - Ansible Commands & Modules¶
Mandatory¶
Try out ansible-doc¶
- print out all available modules
- check the docu of the module
command - check the docu of the modules
yumandapt
Ping all hosts¶
- Run the ansible module “ping” on all hosts in your inventory
- Run the ansible module “ping” only on
web1.<firstname>.lab
Run the command modul¶
- Run
uname -aon all servers viacommandmodule - Run
whoamion all servers viacommandmodule - Run
df -hon all servers viacommandmodule - Run
cat /etc/redhat-releaseonly onweb2.<firstname>.lab - Run
cat /etc/redhat-releaseonly onweb1.<firstname>.lab
Hint
The last task will fail.