---
- name: create undercloud update script
  template:
    src:  "{{ undercloud_update_template }}"
    dest: "{{ undercloud_update_script }}"
    mode: 0775
    force: true

- name: create scripts with workarounds
  template:
    src: "{{ update_workarounds_template }}"
    dest: "{{ working_dir }}/{{ item.script }}"
    mode: 0755
    force: true
  with_items:
    - '{{ pre_undercloud_update_workarounds|default([]) }}'
    - '{{ post_undercloud_update_workarounds|default([]) }}'
  when: updates_workarounds|bool

