ansible-collections / community.general

Ansible Community General Collection
https://galaxy.ansible.com/ui/repo/published/community/general/
GNU General Public License v3.0
816 stars 1.49k forks source link

community.general.xattr macOS support #4594

Open tigattack opened 2 years ago

tigattack commented 2 years ago

Summary

Having read the documentation for the xattr module, it states "Requires [...] that the setfattr/getfattr utilities are present".

While these do not exist on macOS, a utility by the name of xattr does, and (to my knowledge) offers the same functionality.

Trying to use the xattr module for anything (whether it's read, write, or delete) on macOS fails with an error:

% ansible localhost -m community.general.xattr -a "path=/Applications/Safari.app state=read"
 _______________________ 
< PLAY [Ansible Ad-Hoc] >
 ----------------------- 

 ________________________________ 
< TASK [community.general.xattr] >
 -------------------------------- 

fatal: [localhost]: FAILED! => changed=false 
  msg: 'Failed to find required executable "getfattr" in paths: /usr/local/sbin:/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin:/opt/local/bin:/opt/local/sbin'

Issue Type

Feature Idea

Component Name

xattr

Additional Information

Code of Conduct

ansibullbot commented 2 years ago

Files identified in the description:

If these files are incorrect, please update the component name section of the description or use the !component bot command.

click here for bot help

ansibullbot commented 2 years ago

cc @bcoca click here for bot help

ansibullbot commented 1 year ago

Files identified in the description:

If these files are incorrect, please update the component name section of the description or use the !component bot command.

click here for bot help