From 45e6733f422236220f4344e4dcd57ca82492032a Mon Sep 17 00:00:00 2001 From: Sergey Bubnov Date: Wed, 7 Nov 2018 12:56:34 +0400 Subject: [PATCH] add controlled option to the alterator-net --- roles/common/tasks/configure_nics.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/common/tasks/configure_nics.yml b/roles/common/tasks/configure_nics.yml index efbb324..248da44 100644 --- a/roles/common/tasks/configure_nics.yml +++ b/roles/common/tasks/configure_nics.yml @@ -1,6 +1,6 @@ --- - name: "{{nic.key}} | set default route" - shell: egrep -q "^default via {{item|ipaddr('address')}}$" /etc/net/ifaces/"{{nic.key}}"/ipv4route || { alterator-cmdline -d /net-eth action write name "{{nic.key}}" ipv 4 configuration "static" default "{{item|ipaddr('address')}}" ipv_enabled "#t"; echo default_changed; } + shell: egrep -q "^default via {{item|ipaddr('address')}}$" /etc/net/ifaces/"{{nic.key}}"/ipv4route || { alterator-cmdline -d /net-eth action write name "{{nic.key}}" ipv 4 configuration "static" default "{{item|ipaddr('address')}}" ipv_enabled "#t" controlled etcnet onboot '#t'; echo default_changed; } register: result changed_when: '"default_changed" in result.stdout' notify: restart network