How to install specific version of things?

10 views
Skip to first unread message

Cann

unread,
Aug 29, 2016, 9:04:31 PM8/29/16
to Ansible Project
Hello Everyone,

I have a ubuntu 14 server and I simply want to have latest version of php 5 on my machine.
I add a PPA repo and I ran following playbook to install my php extensions but my PHP version is keep getting upgraded.

I don't understand what I need to do to only get PHP 5.6.x
As soon as I ran my playbook, it install 4 different php version: 5.5  5.6  7.0  7.1

Please help.


---
- name: Add ppa Repository to get latest php5.xxx
  become: yes
  apt_repository: 
    repo: ppa:ondrej/php
    update_cache: true

- name: Install required php extensions
  apt: name={{ item }} update_cache=yes state=present
  become: yes
  with_items:
    - php5.6-cli
    - php5.6
    - php5.6-gd
    - php5.6-mcrypt
    - php5.6-curl
    - php5.6-fpm
    - php5.6-mbstring
    - php5.6-mysql
    - php5.6-imagick
    - mcrypt
    - curl
    - unzip
    - zip
    - git
    - python-software-properties


Reply all
Reply to author
Forward
0 new messages