--- - name: apt update cache apt: update_cache: yes cache_valid_time: 86400 - name: Install package for s3 backend apt: name: python3-boto state: present tags: ['backup_duplicity'] - name: Install package for s3 backend ansible.builtin.pip: name: boto tags: ['backup_duplicity'] - name: Install package for azure backend ansible.builtin.pip: name: azure when: duplicity_backend == 'azure' tags: ['backup_duplicity']