Ansible Playbook: Copying Multiple Files
1. Copying a Single File to the Target Server [root@Jenkins copymodule]# cat copy.yml—– hosts: allremote_user: rootgather_facts: falsetasks:– name: “Copy file from host to target server”copy:src: “/root/ansible/luyan/copymodule/copytest1.txt”dest: “/opt/copymodule”owner: rootgroup: rootmode: 755 2. Copying Multiple Files to the Target Server [root@Jenkins copymodule]# cat copyduogewenjian.yml—– hosts: allremote_user: rootgather_facts: falsetasks:– name: “Copy files from host to target server”copy:src: “{{ … Read more