How do I add and delete routes in my route table with Ansible?

I can't seem to find any network or system modules for this.

2 Answers 2


AFAIK, you're stuck using the command module to make your change using a shell command.


net_static_route is available since ansible 2.4.

Depending on your requirements it might provide what you need.

  • 16
    Just in case: this module is for network appliances and not for linux boxes. Feb 9, 2018 at 12:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.