Skip to content

When using networking_routes with /32 CIDR, route will be removed and re added on every run.

Steps to reproduce:

  • Set networking_routes to:
    networking_routes:
      - device: "eth2"
        network: "10.2.3.4/32"
        via: "172.23.0.1"
  • Run playbok routes action 2 times.

actual result:

TASK [networking : remove not required routes] *********************************************************************************************************************************************
Friday 28 February 2020  12:35:14 +0100 (0:00:00.194)       0:00:26.540 ******* 
changed: [network01] => (item=10.2.3.4 via 172.23.0.1 dev eth2)

TASK [networking : add missing routes] *****************************************************************************************************************************************************
Friday 28 February 2020  12:35:14 +0100 (0:00:00.209)       0:00:26.750 ******* 
changed: [network01] => (item=10.2.3.4/32 via 172.23.0.1 dev eth2)

Possible solutions:

  • Add note to readme about /32 cidr
  • Find way to get ip routes including prefix length for /32 routes
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information