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

- name: create update workaround scripts for undercloud
  template:
    src: workarounds.sh.j2
    dest: "{{ working_dir }}/{{ item }}.sh"
    mode: 0775
    force: true
  loop:
    - 'pre_undercloud_update_workarounds'
    - 'post_undercloud_update_workarounds'
  when: updates_workarounds|bool
