diff --git a/.travis.yml b/.travis.yml index d32f5f72996cea77d0ad2a2585fe8463fc0c3b94..feaf75430fabb63695d72cdfa1c29dd8441ee1c5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,10 +10,8 @@ env: - VBOX_HWVIRTEX=off matrix: - TOXENV=openbsd60 - - TOXENV=trusty - - TOXENV=precise - - &jessie TOXENV=jessie - - TOXENV=wheezy + - TOXENV=xenial + - &stretch TOXENV=stretch cache: - pip @@ -37,6 +35,8 @@ notifications: matrix: fast_finish: True + allow_failures: + - env: *stretch include: - env: TOXENV: pre-commit diff --git a/README.rst b/README.rst index b22dcbcc16e88a633755d284310ba9dc2bb599c9..28d3680887943dfe8503844f26a1478c656264b7 100644 --- a/README.rst +++ b/README.rst @@ -1,10 +1,10 @@ -PHP5 +PHP7 #### -.. image:: https://travis-ci.org/adarnimrod/php5.svg?branch=master - :target: https://travis-ci.org/adarnimrod/php5 +.. image:: https://travis-ci.org/adarnimrod/php7.svg?branch=master + :target: https://travis-ci.org/adarnimrod/php7 -Install PHP5 (cli, not mod-php nor fpm). +Install PHP7 (cli, not mod-php nor fpm). Requirements ------------ diff --git a/defaults/main.yml b/defaults/main.yml index 2ded7bef43d4bbeb0c4195c98df3f109ddd0a670..76770b4512ebdb66e9fc4d6cc4ac7b9b17aecde6 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -1,2 +1,2 @@ --- -# defaults file for php5 +# defaults file for php7 diff --git a/handlers/main.yml b/handlers/main.yml index 21fe5941901e63d260ff9d94cd3ab0091e719459..ee1aa0a8af0fdb8198a2e49abd6164a399632173 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -1,2 +1,2 @@ --- -# handlers file for php5 +# handlers file for php7 diff --git a/meta/main.yml b/meta/main.yml index 73fa8e347cfbcb1314204d79a143b5972afcca4f..e5ca1ddf96c0765e5b5ed3c152c3270bc15c5c84 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -1,20 +1,18 @@ galaxy_info: author: Nimrod Adar - description: Install PHP5 (cli, not mod-php nor fpm) + description: Install PHP7 (cli, not mod-php nor fpm) company: Shore technologies license: MIT min_ansible_version: 2.3 platforms: - name: Debian versions: - - jessie - - wheezy + - stretch - name: OpenBSD versions: - 6.0 - name: Ubuntu versions: - - trusty - - precise + - xenial galaxy_tags: [ php ] dependencies: [] diff --git a/molecule.yml b/molecule.yml index 4e74eae221ebf137d5124a060e90cf24001101d1..fefcff494a2444faf4154b0bb1444857b890ee03 100644 --- a/molecule.yml +++ b/molecule.yml @@ -35,7 +35,7 @@ vagrant: - name: wheezy box: bmorg/debian-wheezy-i386 instances: - - name: php5 + - name: php7 options: append_platform_to_hostname: yes raw_config_args: diff --git a/tasks/main.yml b/tasks/main.yml index 0266348017cdb9ca193be82a9202fbf7c1ef3ce3..35f7b16ec8af4af0f3f581c98d8fc78fdc0e5a9e 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -1,5 +1,5 @@ --- -# tasks file for php5 +# tasks file for php7 - name: Assertions assert: that: @@ -8,7 +8,7 @@ - name: APT install when: ansible_pkg_mgr == 'apt' apt: - name: ['php-pear', 'php5-dev', 'php5-cli', 'cron'] + name: ['php-pear', 'php7.0-dev', 'php7.0-cli', 'cron'] state: present update_cache: yes cache_valid_time: 3600 @@ -19,11 +19,11 @@ name: pear state: present -- name: Create php5 symlink +- name: Create php7 symlink when: ansible_pkg_mgr == 'openbsd_pkg' - with_items: ['php', 'php5'] + with_items: ['php', 'php7'] file: - src: /usr/local/bin/php-5.6 + src: /usr/local/bin/php-7.0 dest: '/usr/local/bin/{{ item }}' owner: root group: 0 @@ -36,7 +36,7 @@ 'allow_url_fopen': 'On' 'suhosin.executor.include.whitelist': 'phar' ini_file: - dest: /etc/php-5.6.ini + dest: /etc/php-7.0.ini section: PHP option: '{{ item.key }}' value: '{{ item.value }}' @@ -47,7 +47,7 @@ dest: /root/composer-install - name: Install Composer - command: php5 -f /root/composer-install -- --install-dir=/usr/local/bin --filename=composer + command: php7 -f /root/composer-install -- --install-dir=/usr/local/bin --filename=composer args: creates: /usr/local/bin/composer diff --git a/tests/playbook.yml b/tests/playbook.yml index 94db4a5fa1df0975dd999c42352b39d8379b277f..fa483a9cbdce9f35ef3e6dfa311882bad89a05a6 100644 --- a/tests/playbook.yml +++ b/tests/playbook.yml @@ -1,5 +1,5 @@ --- -- hosts: php5-openbsd* +- hosts: php7-openbsd* gather_facts: false roles: - openbsd-bootstrap @@ -8,7 +8,7 @@ users_use_sudo: True users_lock_root_ssh: False -- hosts: [php5-xenial, php5-wheezy] +- hosts: [php7-xenial, php7-wheezy] gather_facts: false roles: - debian-bootstrap @@ -19,4 +19,4 @@ - hosts: all roles: - - role: php5 + - role: php7 diff --git a/tests/test_php5.py b/tests/test_php7.py similarity index 74% rename from tests/test_php5.py rename to tests/test_php7.py index 2c82b53a88c009077ed7761951e511ff16c91614..15d3302365fb4470582675c867ddce20c03fe154 100644 --- a/tests/test_php5.py +++ b/tests/test_php7.py @@ -3,8 +3,8 @@ from testinfra.utils.ansible_runner import AnsibleRunner testinfra_hosts = AnsibleRunner('.molecule/ansible_inventory').get_hosts('all') -def test_php5(Command): - assert Command('php5 --version').stdout.startswith('PHP 5') +def test_php7(Command): + assert Command('php7 --version').stdout.startswith('PHP 7') def test_composer(Command): @@ -16,8 +16,8 @@ def test_pear(Command): def test_php_ini(Command): - command = Command('php5 --info') + command = Command('php7 --info') assert command.rc == 0 - assert 'PHP Version => 5' in command.stdout + assert 'PHP Version => 7' in command.stdout assert 'syntax error' not in command.stdout assert 'syntax error' not in command.stderr diff --git a/tox.ini b/tox.ini index 09d79c0d9c01f698cb463205bc878777af955951..8585b01244ec76a15b34aa190877cc7e937334c7 100644 --- a/tox.ini +++ b/tox.ini @@ -1,7 +1,7 @@ [tox] skip_install = True skipsdist = True -envlist = openbsd60,trusty,precise,jessie,wheezy +envlist = openbsd60,xenial,stretch [testenv] envdir = {toxinidir}/.tox/molecule diff --git a/vars/main.yml b/vars/main.yml index 4e74b4e9d0c22cb0f5ead4d96f3d0ead3dfd1fd8..204dcce5c03e1e9af4d22f5718afae723e65972b 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -1,2 +1,2 @@ --- -# vars file for php5 +# vars file for php7