Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP role usage on Debian Buster in Chapter 6 may need update #187

Closed
geerlingguy opened this issue Dec 2, 2019 · 3 comments
Closed

PHP role usage on Debian Buster in Chapter 6 may need update #187

geerlingguy opened this issue Dec 2, 2019 · 3 comments

Comments

@geerlingguy
Copy link
Owner

From this issue: geerlingguy/ansible-role-php#281

@luisnabais said:

Maybe it should be updated/corrected on the Ansible for Devops book, on page "142", Chapter 6 - Playbook Organization - Roles, Includes, and Imports.

Regarding the example in a debian10 Vagrant Box, he got the error:

TASK [geerlingguy.php : Ensure PHP packages are installed.] ************************************************************************************************************************************************
fatal: [debian]: FAILED! => {"changed": false, "msg": "No package matching 'php7.0-common' is available"}
@geerlingguy
Copy link
Owner Author

I'm assuming the example is related to:

---
- hosts: all
  become: yes

  roles:
    - geerlingguy.mysql
    - geerlingguy.apache
    - geerlingguy.php
    - geerlingguy.php-mysql

@geerlingguy
Copy link
Owner Author

I just tried that example with the following Vagrantfile:

# -*- mode: ruby -*-
# vi: set ft=ruby :

VAGRANTFILE_API_VERSION = "2"

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
  config.vm.box = "geerlingguy/ubuntu2004"
  config.vm.network :private_network, ip: "192.168.18.8"
  config.vm.hostname = "lampy.test"
  config.ssh.insert_key = false

  config.vm.provider :virtualbox do |v|
    v.memory = 1024
  end

  # Ansible provisioning.
  config.vm.provision "ansible" do |ansible|
    ansible.playbook = "playbook.yml"
  end
end

And I ran into the same error:

TASK [geerlingguy.php : Ensure PHP packages are installed.] ********************
fatal: [default]: FAILED! => {"changed": false, "msg": "No package matching 'php7.0-common' is available"}

So yeah, it would be good to get the PHP role updated to work with the latest versions of Ubuntu and Debian!

@geerlingguy
Copy link
Owner Author

I'm going to wrap both of those playbooks into the automated tests included with this repository, too, so if there's an issue in the future it will be easier to trace!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant