geerlingguy / ansible-role-php-versions

Ansible Role - PHP Versions
https://galaxy.ansible.com/geerlingguy/php-versions/
MIT License
98 stars 73 forks source link

[question] problems with ppa #31

Closed adeptofvoltron closed 5 years ago

adeptofvoltron commented 5 years ago

question, what I am doing wrong (Ubuntu on hosts)

playbook:

- hosts: webservers
  roles:
    - geerlingguy.php
    - geerlingguy.php-versions

vars:

php_version: "7.1"
php_default_version_debian: "7.1"
php_versions_install_recommends: true
php_packages_state: "latest"
php_packages_extra:
  - php-mcrypt
  - php{{ php_version }}-mysql
  - php{{ php_version }}-intl
  - php{{ php_version }}-zip
  - php{{ php_version }}-pdo
  - php{{ php_version }}-soap
  - php{{ php_version }}-mbstring
  - php{{ php_version }}-bcmath
  - php{{ php_version }}-gd
php_enable_php_fpm: true

and I got error: image

and when I am checking possible php to install there are only php7.0-xxxxx if I am using xenial php7.2 if using bionic64. (no matter if I use php_packages_state: "latest" or not)

magenbrot commented 5 years ago

My guess is that you should run the php-versions role before the php role. Otherwise the apt repository doesn't exist and ansible-playbook will stop on the failed task as in your case.

adeptofvoltron commented 5 years ago

oh...it was few projects ago...so I do not remember te order of calling roles. but you might be right. In the end I just create box with proper ppa...so Ihad no need to use that role.