Hello everyone,
In preparation for updating a Puppet module to support a custom routing mechanism, I looked for a fact showing the default gateway of a system. However, I could not find one.
On modern Linux systems, the installed routes can be obtained with the following command:
ip --json route | jq
[
{
"dst": "default",
"gateway": "31.47.232.89",
"dev": "eno1",
"protocol": "static",
"flags": []
},
{
"dst": "31.47.232.88/29",
"dev": "eno1",
"protocol": "kernel",
"scope": "link",
"prefsrc": "31.47.232.90",
"flags": []
}
]
Luckily, the JSON format makes working with these routes in Ruby code easy.
Is there any chance of getting this implemented?
Thanks in advance!
Sebastian
cc @rwaffen
Hello everyone,
In preparation for updating a Puppet module to support a custom routing mechanism, I looked for a fact showing the default gateway of a system. However, I could not find one.
On modern Linux systems, the installed routes can be obtained with the following command:
Luckily, the JSON format makes working with these routes in Ruby code easy.
Is there any chance of getting this implemented?
Thanks in advance!
Sebastian
cc @rwaffen