diff --git a/ansible/ip-allocation.yml b/ansible/ip-allocation.yml index df81c8ab5..6c8545c74 100644 --- a/ansible/ip-allocation.yml +++ b/ansible/ip-allocation.yml @@ -2,6 +2,8 @@ - name: Ensure IP addresses are allocated hosts: seed-hypervisor:seed:overcloud gather_facts: no + # Use serial=1 to avoid races between allocations for different hosts. + serial: 1 pre_tasks: - name: Initialise the IP allocations fact set_fact: @@ -25,5 +27,3 @@ - role: ip-allocation ip_allocation_filename: "{{ kayobe_config_path }}/network-allocation.yml" ip_allocation_hostname: "{{ inventory_hostname }}" - # Use serial=1 to avoid races between allocations for different hosts. - serial: 1 diff --git a/ansible/roles/ip-allocation/tasks/main.yml b/ansible/roles/ip-allocation/tasks/main.yml index 27fd9a530..7fc9ccab7 100644 --- a/ansible/roles/ip-allocation/tasks/main.yml +++ b/ansible/roles/ip-allocation/tasks/main.yml @@ -11,6 +11,7 @@ with_items: - python-netaddr - PyYAML + run_once: True - name: Ensure IP addresses are allocated local_action: