How to install apps remotely with Ansible

Опубликовано: 05 Октябрь 2024
на канале: How To Make Tech Work from TechRepublic
1,712
6

One very hand trick up Ansible's sleeve is the ability to install applications on remote servers. Jack Wallen shows you how to make this work.

For the full step-by-step guide, head to https://www.techrepublic.com/article/...

List of Commands:

ssh-copy-id USER@SERVER
sudo nano /etc/ansible/hosts
[db_servers]
SERVER ansible_user=USER

hosts: db_servers
tasks:
name: Ansible apt install packages example
become: true
become_user: root
apt:
name: zip
state: present
update_cache: true

apt:
name:
zip
wget
state: present
update_cache: true

ansible-playbook apt.yml --ask-become-pass

Watch more How To videos:    / @howtomaketechwork  
Watch more TechRepublic videos: https://www.techrepublic.com/videos/
Follow TechRepublic on Twitter:   / techrepublic  
Follow TechRepublic on Facebook:   / techrepublic  
Follow TechRepublic on Instagram:   / techrepublic  
Follow TechRepublic on LinkedIn:   / tech.  .

Watch Tech Stories, a series of mini documentaries from TechRepublic: https://www.youtube.com/watch?v=RRPAs...