In Cisco NX-OS, name-servers are configured per VRF. Additionally, name-servers in one VRF can be configured to query from a different source VRF. The current nxos_system module supports configuring name-servers in any desired VRF, but it does not support configuring the use-vrf NX-OS keyword which sources the query from a different VRF.
ISSUE TYPE
Feature Idea
COMPONENT NAME
nxos_system
ADDITIONAL INFORMATION
Here are some examples of what currently exists:
- name: configure name servers in the default VRF
cisco.nxos.nxos_system:
name_servers:
- 8.8.8.8
will yield this NX-OS config
ip name-server 8.8.8.8
and
- name: configure name servers for a VRF
cisco.nxos.nxos_system:
name_servers:
- {server: 8.8.8.8, vrf: management}
will yield this NX-OS config
vrf context management
ip name-server 8.8.8.8
But there doesn't seem to be any YAML that will yield this
ip name-server 8.8.8.8 use-vrf management
Therefore, i propose that a new dictionary key be created, use_vrf. The config above could be produced in this way
- name: configure name servers with VRF support
cisco.nxos.nxos_system:
name_servers:
- {server: 8.8.8.8, use_vrf: management}
So that you could even do something like this
- name: configure name servers with VRF support
cisco.nxos.nxos_system:
name_servers:
- {server: 8.8.8.8, vrf: red, use_vrf: blue}
which would yield
vrf context red
ip name-server 8.8.8.8 use-vrf blue
SUMMARY
In Cisco NX-OS, name-servers are configured per VRF. Additionally, name-servers in one VRF can be configured to query from a different source VRF. The current
nxos_system
module supports configuring name-servers in any desired VRF, but it does not support configuring theuse-vrf
NX-OS keyword which sources the query from a different VRF.ISSUE TYPE
COMPONENT NAME
nxos_system
ADDITIONAL INFORMATION
Here are some examples of what currently exists:
will yield this NX-OS config
and
will yield this NX-OS config
But there doesn't seem to be any YAML that will yield this
Therefore, i propose that a new dictionary key be created,
use_vrf
. The config above could be produced in this waySo that you could even do something like this
which would yield