- name: check patch
  changed_when: false
  failed_when: patch_check_result.rc > 1
  register: patch_check_result
  shell: /tmp/nvidia-patch/{{patch_info.script}} -c {{driver_detail_version}}
- name: patch driver
  become: true
  when: patch_check_result.rc == 0
  shell: /tmp/nvidia-patch/{{patch_info.script}} -d {{driver_detail_version}}
  args:
    creates: /opt/nvidia/{{patch_info.check_file}}.{{driver_detail_version}}
