Created
February 24, 2017 18:44
-
-
Save dale-c-anderson/02912b6c6c1126098c763276d77eaf19 to your computer and use it in GitHub Desktop.
ansible php 5.5 removal from ubuntu 14.04
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- hosts: all | |
gather_facts: true | |
become: yes | |
tasks: | |
- name: Remove php5-fpm | |
apt: name=php5-fpm | |
update_cache=no | |
state=absent | |
purge=yes | |
notify: stop php5-fpm | |
- meta: flush_handlers | |
# Drush and PHP 5.5 are dependent on each other on Ubuntu 14. You'll need to re-install drush after this. | |
- name: Remove drush and php 5.5 modules | |
apt: | |
name={{ item }} | |
update_cache=no | |
state=absent | |
purge=yes | |
with_items: | |
- php5-bcmath | |
- php5-curl | |
- php5-gd | |
- php5-cgi | |
- php5-cli | |
- php5-igbinary | |
- php5-mbstring | |
- php5-mcrypt | |
- php5-mysql | |
- php5-opcache | |
- php5-redis | |
- php5-soap | |
- php5-xml | |
- php5-xmlrpc | |
- php5-zip | |
- php5-dev | |
- php5-json | |
- php5-readline | |
- php5-xdebug | |
- php5-xhprof | |
- php5-common | |
- php5 | |
- drush | |
- name: Manually toast repository file for defunct PHP (5.5) | |
file: path=/etc/apt/sources.list.d/php-5.5.list | |
state=absent | |
- name: Remove repository for defunct PHP (5.5) | |
apt_repository: | |
repo="ppa:ondrej/php5" | |
state=absent | |
update_cache=yes | |
handlers: | |
- name: stop php5-fpm | |
service: name=php5-fpm state=stopped | |
ignore_errors: yes | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment