Skip to content
This repository was archived by the owner on Mar 30, 2023. It is now read-only.

Commit 0f108ec

Browse files
committed
Try to make gateway add work
1 parent 7e7c846 commit 0f108ec

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

dac-ansible/master.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@
33
become: true
44
tasks:
55
- name: configure default gateway
6-
command: route add default gw 10.43.255.1 || true
6+
command: route add default gw 10.43.255.1
7+
register: command_result
8+
failed_when: "command_result.rc != 0 and ('SIOCADDRT: File exists' not in command_result.stderr)"
9+
changed_when: "command_result.rc == 0"
710
- name: Create entries in /etc/hosts for all nodes
811
lineinfile:
912
path: /etc/hosts

0 commit comments

Comments
 (0)