--- - name: Ensure Sury PHP apt key is present apt_key: url: "https://packages.sury.org/php/apt.gpg" state: present - name: Remove older DotDeb repo apt_repository: repo: "{{ item }}" state: absent with_items: - deb http://packages.dotdeb.org jessie all - deb-src http://packages.dotdeb.org jessie all - name: Ensure Sury PHP repository is present apt_repository: repo: "deb https://packages.sury.org/php/ {{ ansible_distribution_release }} main" state: present - name: Remove older php-fpm apt: name: php7.0-fpm state: absent - name: Remove older opcache file file: path: '{{ item }}' state: absent with_items: - /etc/php/7.0/fpm/conf.d/05-opcache.ini - /etc/php/7.0/apache2/conf.d/05-opcache.ini - /etc/php/7.0/cli/conf.d/05-opcache.ini