From 101b41e462c0431a454dad627a8cadbd3ef49c0d Mon Sep 17 00:00:00 2001 From: Sergey Bubnov Date: Wed, 5 Jun 2019 11:10:05 +0400 Subject: [PATCH] configure PBR after interfaces has come back --- roles/common/tasks/configure_pbr.yml | 2 +- roles/common/tasks/main.yml | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/roles/common/tasks/configure_pbr.yml b/roles/common/tasks/configure_pbr.yml index 9ebfc9f..7f82548 100644 --- a/roles/common/tasks/configure_pbr.yml +++ b/roles/common/tasks/configure_pbr.yml @@ -1,7 +1,7 @@ --- - name: "enable PBR for {{nic.key}}" block: - - name: Generate sequance + - name: Generate sequence set_fact: tbl_id: nic.key | regex_replace('^eth(d+)', '\\1' diff --git a/roles/common/tasks/main.yml b/roles/common/tasks/main.yml index e4becb3..cf025fc 100644 --- a/roles/common/tasks/main.yml +++ b/roles/common/tasks/main.yml @@ -104,12 +104,6 @@ async: 100 poll: 0 -- name: configure PBR - include_tasks: configure_pbr.yml - with_dict: "{{node.net}}" - loop_control: - loop_var: nic - - name: update .tmp/ssh_config after NICs reconfiguration include_role: name="inventory" @@ -118,6 +112,12 @@ delay: 2 timeout: 300 +- name: configure PBR + include_tasks: configure_pbr.yml + with_dict: "{{node.net}}" + loop_control: + loop_var: nic + # TODO: need to make it idempotent! - name: set hostname shell: '[[ $(hostname) == "{{inventory_hostname_short}}.{{stack.domain}}" ]] || { alterator-cmdline -d /net-eth action write computer_name "{{inventory_hostname_short}}.{{stack.domain}}" commit "#t"; echo changed; }'