---
- name: fix masquerade
  hosts: undercloud
  become: yes
  any_errors_fatal: yes
  gather_facts: no
  tasks:
      - name: "w/a for bz#1460116"
        service:
            name: iptables
            state: restarted

- name: compute related workarounds
  hosts: compute
  become: yes
  any_errors_fatal: yes
  gather_facts: no
  tasks:
      - name: "w/a for 1477720"
        shell: |
           setenforce 0
        tags: skip_ansible_lint

      - name: w/a for https://bugs.launchpad.net/tripleo/+bug/1708279 - retrieve subnet
        shell: |
           docker network inspect bridge|jq ".[].IPAM.Config[].Subnet"
        register: docker_subnet
        tags: skip_ansible_lint

      - name: w/a for https://bugs.launchpad.net/tripleo/+bug/1708279 - add iptables rule
        shell: |
           iptables -t nat -I POSTROUTING -s "{{ docker_subnet.stdout }}" -j MASQUERADE
        tags: skip_ansible_lint

      - name: "w/a for bz 1464182"
        shell: |
          docker exec -u root -i nova_compute bash -c "echo $(hexdump -n 16 -v -e '/1 "%02x"' /dev/urandom) |tee /etc/machine-id"

---
- name: fix masquerade
  hosts: undercloud
  become: yes
  any_errors_fatal: yes
  gather_facts: no
  tasks:
      - name: "w/a for bz#1460116"
        service:
            name: iptables
            state: restarted

- name: compute related workarounds
  hosts: compute
  become: yes
  any_errors_fatal: yes
  gather_facts: no
  tasks:
      - name: "w/a for 1477720"
        shell: |
           setenforce 0
        tags: skip_ansible_lint

      - name: w/a for https://bugs.launchpad.net/tripleo/+bug/1708279 - retrieve subnet
        shell: |
           docker network inspect bridge|jq ".[].IPAM.Config[].Subnet"
        register: docker_subnet
        tags: skip_ansible_lint

      - name: w/a for https://bugs.launchpad.net/tripleo/+bug/1708279 - add iptables rule
        shell: |
           iptables -t nat -I POSTROUTING -s "{{ docker_subnet.stdout }}" -j MASQUERADE
        tags: skip_ansible_lint

Remove the workaround related to 1464182
Remove the workaround related to 1464182

We are not generating uuids in the libvirt container
as a wokraround anymore.

Change-Id: Iaea0fe92a0b7a63a05f79069f381201eaaa2a727
