ansible / ansible.builtin / v2.7.10 / module / win_route Add or remove a static route | "added in version" 2.4 of ansible.builtin" Authors: Daniele Lazzari preview | supported by communityansible.builtin.win_route (v2.7.10) — module
pip
Install with pip install ansible==2.7.10
Add or remove a static route.
--- - name: Add a network static route win_route: destination: 192.168.2.10/32 gateway: 192.168.1.1 metric: 1 state: present
- name: Remove a network static route win_route: destination: 192.168.2.10/32 state: absent
state: choices: - absent - present default: present description: - If C(absent), it removes a network static route. - If C(present), it adds a network static route. metric: default: 1 description: - Metric used by the static route. type: int gateway: description: - The gateway used by the static route. - If C(gateway) is not provided it will be set to C(0.0.0.0). destination: description: - Destination IP address in CIDR format (ip address/prefix length) required: true
output: description: A message describing the task result. returned: always sample: Route added type: string