Ansible 2 · Ad-hoc commands

Copy a file to hosts

Copy a file with the copy module.

ansible webservers -i inventory.ini -m copy -a "src=app.conf dest=/etc/app.conf" --become

Official Ansible 2 documentation

More ad-hoc commands commands

All ad-hoc commands commands · Ansible 2 cheatsheet

Was this page helpful?