Skip to content

Commit 739b30a

Browse files
committed
Use setfacl (acl package) instead of enabling allow_world_readable_tmpfiles
If the temporary directory on the remote host is mounted with POSIX acls enabled and the setfacl tool is in the remote PATH then Ansible will use POSIX acls to share the module file with the second unprivileged user instead of having to make the file readable by everyone. This also avoids the warning: [WARNING]: Using world-readable permissions for temporary files Ansible needs to create when becoming an unprivileged user. This may be insecure. For information on securing this, see https://docs.ansible.com/ansible/become.html#becoming-an-unprivileged-user
1 parent 31bfef5 commit 739b30a

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

ansible.cfg

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
inventory = ./inventory
33
display_skipped_hosts = false
44
remote_tmp = /tmp/${USER}/ansible
5-
allow_world_readable_tmpfiles = true
5+
allow_world_readable_tmpfiles = false # or "true" if the temporary directory on the remote host is mounted with POSIX acls disabled or the remote machines use ZFS.
66
host_key_checking = false
77
timeout=60
88

vars/Debian.yml

+1
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ system_packages:
4141
- gzip
4242
- jq
4343
- iptables
44+
- acl
4445

4546
postgresql_packages:
4647
- postgresql-{{ postgresql_version }}

vars/RedHat.yml

+1
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ system_packages:
4040
- gzip
4141
- jq
4242
- iptables
43+
- acl
4344

4445
postgresql_packages:
4546
- postgresql{{ postgresql_version_terse }}

0 commit comments

Comments
 (0)