ansible / ansible.builtin / v2.9.27 / module / win_route Add or remove a static route | "added in version" 2.4 of ansible.builtin" Authors: Daniele Lazzari (@dlazz) preview | supported by communityansible.builtin.win_route (v2.9.27) — module
pip
Install with pip install ansible==2.9.27
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. type: str 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). type: str destination: description: - Destination IP address in CIDR format (ip address/prefix length). required: true type: str
output: description: A message describing the task result. returned: always sample: Route added type: str