ansible create empty file


copy: content="" dest=/etc/sample force=no

Example:

ansible -i inv server_group -m copy -a "content="" dest=/root/.ssh/authorized_keys2 owner=root group=root mode=0644"

Leave a Reply

Your email address will not be published. Required fields are marked *