---
- hosts: ansiblesrv
remote_user: aftec
become: true
tasks:
- name: Copy file with owner and permissions
ansible.builtin.copy:
dest: /home/aftec/text.txt
owner: aftec
mode: '0644'
content: "Je suis un fichier de test
Je suis déployé sur le serveur {{ inventory_hostname }}"