--- - name: Solve problem with libgd3 for php-gd hosts: [ 'debian10' ] tasks: - copy: dest: '/etc/apt/preferences.d/libgd-pin100' content: |- Package: libgd3 Pin-Priority: 100 - shell: |- apt update apt install -t bullseye libgd3 -yy apt-cache policy libgd3 apt install php8.1-gd -yy