Update update-default-route.yml
This commit is contained in:
@@ -3,15 +3,9 @@
|
||||
hosts: proxmox_nodes
|
||||
become: true
|
||||
vars:
|
||||
new_gateway: "{{ gateway_ip }}"
|
||||
new_gateway: "192.168.1.254"
|
||||
|
||||
tasks:
|
||||
- name: Validate gateway format
|
||||
assert:
|
||||
that:
|
||||
- new_gateway is match("^(?:[0-9]{1,3}\.){3}[0-9]{1,3}$")
|
||||
fail_msg: "Invalid IPv4 address provided."
|
||||
|
||||
- name: Replace gateway line in interfaces file
|
||||
lineinfile:
|
||||
path: /etc/network/interfaces
|
||||
|
||||
Reference in New Issue
Block a user