File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change 21
21
22
22
- name : Create /etc/resolv.conf symlink
23
23
ansible.builtin.file :
24
- # Do not apply any group, owner, or mode changes to src.
24
+ # Note that group, owner, and mode can modify src when follow=true
25
+ # and state=link are used:
26
+ # https://docs.ansible.com/ansible/latest/collections/ansible/builtin/file_module.html#parameter-follow
27
+ #
28
+ # In fact, I found this to be exactly the case when testing. In
29
+ # other words, if I set follow=true (or left it as the default)
30
+ # without specifying group, owner, or mode then the group and
31
+ # owner of src (i.e., /run/systemd/resolve/stub-resolv.conf) would
32
+ # both be changed from systemd-resolved to root.
33
+ #
34
+ # In this case we definitely _do not_ want to modify the group,
35
+ # owner, or mode of src, and we do not need to follow any
36
+ # filesystem links to arrive at /etc/resolv.conf, so we simply
37
+ # override the default and set follow equal to false. This will
38
+ # ensure that no group, owner, or mode changes are applied to src.
25
39
follow : false
26
40
# If a file is already present at /etc/resolv.conf then just
27
41
# delete it.
You can’t perform that action at this time.
0 commit comments