我是 ansible 的新手,一点点谷歌搜索并没有让我很快找到我的问题的正确解决方案。
使用 ansible 将静态网络设置分配给 centos-7 主机的“with the Grain”方式是什么?我觉得这一定是一个非常普遍的需求——而且一定有很多人对在从 rhel-6 到 rhel-7(即, 默认情况下为 network-manager,默认情况下来自内核 systemd 的一致设备命名)。
在 ansible 之前,我一直在卸载网络管理器并通过 /etc/init.d/network-scripts/ifcfg-* 文件手动配置主机——我想我可以使用 ansible_default_ipv4 事实对 ansible 做同样的事情:
"ansible_default_ipv4": {
"address": <snip>,
"alias": "enp3s0",
"gateway": <snip>,
"interface": "enp3s0",
"macaddress": <snip>,
"mtu": 1500,
"netmask": "255.255.255.128",
"network": <snip>,
"type": "ether"
}
Run Code Online (Sandbox Code Playgroud)
Ansible far 非常棒,为此我想确保我不会不必要地反对 ansible 谷物。如果有通过ansible管理网络管理器介导的接口配置的好方法,我愿意不卸载网络管理器...
是否可以让 samba4 的内部 dns 服务器侦听 53 以外的端口?
我需要在这台主机上运行两个 dns 服务器——我希望在客户端的标准端口上使用 dnsmasq 并配置 dnsmasq 以通过非标准端口正确解析 samba 内部 dns 服务器拥有的域。
查看 smb.conf - 有一些选项可以控制许多服务使用的端口绑定 - 但我没有为 dns 服务器找到这样的选项......