We are running ansible playbook on every boot and it does bunch of checks and configuration tasks on the host. We also have few systemd services that needs to run on that host. How do I make those services dependent on the ansible playbook completion? I want those services to run only after my ansible playbook execution is complete. Is there any direct way in systemd to establish that dependency or should I write some file on path after ansible completion and use that as a check in my systemd service file? Please let me know if you have a better way of doing this.
ram's questions
I am trying to test the kernel dump using echo 1 > /proc/sys/kernel/sysrq ; echo c > /proc/sysrq-trigger
command. On some servers, I can get the dump and on some servers I don't see anything. The kdump config is the same across the fleet and it is writing to the local /var/crash directory. When I trigger the crash manually and check the console, the server straight away goes to reboot without saving the dump. Is there any memory issue that is preventing the kdump from saving the core?
I am trying to add 2 default gateways on my Centos8 server with different interface names and metrics. I have a route file for each interface with the route "default via metric ". This is not working as I don't see the routes when I specify "ip route show all". Looks like NetworkManager is not considering the route files with default gateway. So I add the default route using "ip route add" command. This becomes a problem since this doesn't persist on reboot. Any idea how to achieve this and make it persistent?