Ansible ad hoc commands (10+ easy examples) | GoLinuxCloud
https://golinuxcloud.com/ans[ansible@controller ~]$ ssh server1 "ls -l /tmp/demo-2.txt" -rw-rw-r-- 1 ansible ansible 0 Sep 27 10:09 /tmp/demo-2.txt Create or Remove file and directory using ansible ad hoc commands In this section I will share the ansible ad hoc commands examples to create a file or directory on the managed nodes i.e. the source and destination, both will be from the same managed node.