- name: Update to newest Alpine hosts: all tasks: - name: Run APK update apk: update_cache: yes upgrade: true when: ansible_distribution == 'Alpine' - name: Update Alpine versions replace: backup: yes path: "/etc/apk/repositories" regexp: 'v\d+\.\d+' replace: 'v3.20' when: ansible_distribution == 'Alpine'