Buenas

Soy nuevo en el grupo y en el mundo de ansible, necesito chequear el consumo de memoria de cualquier proceso para determinar si este esta por encima de un umbral, y de ser asi, reiniciarlo.

I am new to the group and in the ansible world, I need to check the memory consumption of any process to determine if it is above a threshold, and if so, restart it

I’d use MemoryMax= Systemd directive (https://www.freedesktop.org/software/systemd/man/systemd.resource-control.html) or, if not, LimitAS= one (https://www.freedesktop.org/software/systemd/man/systemd.exec.html). You should establish them in your desired .service/.slice file with a regular Ansible module to manage text file content