Last active
October 18, 2022 04:47
-
-
Save davidlares/7073289a50f3ce8ae08803addd843e4a to your computer and use it in GitHub Desktop.
A simple Ansible playbook script for copying files to remote machines
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Copy file to target servers | |
hosts: all | |
tasks: | |
- name: Copy file | |
copy: | |
src: /tmp/test-file.txt | |
dest: /etc/foo.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
target1 ansible_host=192.168.1.114 ansible_ssh_pass=osboxes.org | |
target2 ansible_host=192.168.1.115 ansible_ssh_pass=osboxes.org |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment