Ansible – Ad-hoc commands
The ability to use ad-hoc commands in Ansible without the need for playbooks is a very powerful tool. In the old days of Linux and Unix administration (and even today!), the Admins would use a golden host or jump server with SSH keys and be able to hop around their environments running remote command and colleting data. Ad-hoc commands in Ansible gives us this same ability, but with a much more powerful tool at our fingertips.
Website: https://www.londoniac.co.uk/
Meetup: https://www.meetup.com/londoniac
LinkedIn: / londoniac
YT Channel: / londoniac
Gist of all command: https://gist.github.com/dmccuk/66b709...
In this demo:
• Run basic ad-hoc commands on localhost and remote servers
o Modules: ping, shell, copy, yum, setup, reboot
• Using the inventory to manage different operating systems, users and credentials
• Run ad-hoc commands on multiple hosts
My setup: I’m using a .pem key for authentication between my control node and the remote servers.
Links:
https://docs.ansible.com/ansible/2.8/...
Subscribe and like for more!
If you want me to do a video for you, just comment and I'll get one sorted out for you.
Смотрите видео Ansible: How to use Ad-Hoc commands and the inventory онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь LondonIAC / Dennis McCarthy / Automation Engineer 12 Июль 2021, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 841 раз и оно понравилось 15 людям.