Hello,
maybe a stupid question but, we've a state that install sytemd-timesynced, and we also have a timerserver which is running ntpd, so how can I archive that all hosts get the state expect of the ntp-server, at the moment I would create an if condition in the state, does exist a better (salt)way?
Or maybe via pillars? Something like if pillar "ntp-server" is set then don't install?! but how should look this in a state?
Second question is, we are running zabbix and create hosts via salt for this we need the IP address (we get his by: ip: {{ grains['ipv4'][1] }}), but if a host has multiple IP addresses how can I get the correct one? Sometimes we had: ens192, enp2s0f0, docker0, lo, etc, in the old way we should ask eth0, but nowadays we've VMs and hardwareservers and the interface name is very different. Any ideas how to fix that?
thanks in advance!
best regards
Stefan