From the course: Ansible: From Basics to Guru by Pearson

Unlock this course with a free trial

Join today to access over 25,200 courses taught by industry experts.

Efficiently copying files

Efficiently copying files

In this video, we'll talk about efficiently copying files. So what is there to know about copying files? Well, depending on the number of files that you are copying, the copy module can take a long time when dealing with those. And to make it faster, you should consider using the synchronize module. The synchronize module, however, uses rsync in the background. And our sync is more efficient, but it needs to be installed. Let's have a look at the demo. So here we have synchronize and using host all and become true and get effects false. And then we use synchronize to update the web document route. So synchronize source web files to destination var www.html. That means that we need to source web files, right? So mkdir webfiles and dirch webfiles 1, 2, 3. Let's do a quick ls on webfiles and we have 1, 2, 3. So Ansible playbook on Synchronize is going to do that for us. And what do we get? we get a message, a connection standard in object is deprecated called display prompt. I don't…

Contents