我正在寻找一种在 Windows 10 中解析 .local 地址的方法。
Windows 本身也包括 mDNS 支持,但这似乎只适用于现代 API 应用程序。
过去,建议一直是安装 Apple 的 Bonjour,例如How to enable mDNS on Windows (7)。不幸的是,这似乎不再起作用。
据我所知,问题在于 Windows 自己的进程之一 DNSCache 现在正在侦听端口 5353。
如何让 mDNS 为非现代应用程序工作?
在我的 Ansible playbook 中,我需要更改很多文件的权限,但少数子目录需要读写权限,而大多数需要只读权限。根据超级用户的另一个建议,我有这个解决方案:
- name: A few directories need group-write permissions
file:
path: "{{item}}"
mode: "u+rwX,g+rwX,o+rX,o-w"
recurse: True
with_items:
- /opt/myapp/path1/excludeddir1
- /opt/myapp/path1/excludeddir2
- /opt/myapp/path2/excludeddir1
- /opt/myapp/path2/excludeddir2
- name: For performance, set a lot of directories directly
file:
path: "{{item}}"
mode: "u+rwX,go+rX,go-w"
recurse: True
with_items:
- /opt/myapp/path1/readonlydir1
- /opt/myapp/path1/readonlydir2
#############################################
# This step generates a very large list
- name: Find all files in my directory
find:
paths:
- "/opt/myapp/path1"
- "/opt/myapp/path2"
recurse: True
file_type: any
follow: False
register: …
Run Code Online (Sandbox Code Playgroud)