Bootstrap FreeKB - Ansible - owner parameter
Ansible - owner parameter

Updated:   |  Ansible articles

The owner parameter can be used to define the owner of a file or directory. For example, let's say you are using the copy module to copy a file. In this example, the copied file (foo.txt) would be owned by john.doe.

- name: "copy foo.txt to /tmp"
  copy:
    src: "foo.txt"
    dest: "/tmp"
    owner: "john.doe"

 

Here are the attributes of the copied file (foo.txt).

-rw-r--r--. 3 john.doe root 4096 Jun 26 08:21 foo.txt

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter 48f1d2 in the box below so that we can be sure you are a human.