ansible-lint : How to prevent 'no-same-owner' for ansible.posix.synchronize ?

41 views
Skip to first unread message

Norbert Klamann

unread,
Jan 11, 2023, 8:36:55 AM1/11/23
to Ansible Project
Hello all,

I have the following task

```
---
- name: Copy static webfiles to document root /var/www/{{ sitename }}
  # become: true
  become_user: www-data
  ansible.posix.synchronize:
    dest: "/var/www/"
    src: var/www/{{ sitename }}
    mode: 0644
```


ansible-lint gives :

```
no-same-owner: Owner should not be kept between different hosts.
roles/static_website/tasks/main.yml:2
```

How can I prevent this ?

ansible-lint 6.2.2 using ansible 2.14.0

Thanks a lot ?

Norbert


 

Norbert Klamann

unread,
Jan 12, 2023, 5:26:26 AM1/12/23
to Ansible Project
Found it : I had to add :

    owner: false
    group: false
Reply all
Reply to author
Forward
0 new messages