mirror of
https://github.com/geerlingguy/ansible-role-php.git
synced 2024-11-24 12:06:02 +01:00
Update molecule configuration to work with 3.0.
This commit is contained in:
parent
458b04c0a9
commit
ca69f2e289
@ -16,7 +16,7 @@ env:
|
||||
|
||||
install:
|
||||
# Install test dependencies.
|
||||
- pip install molecule docker
|
||||
- pip install molecule yamllint ansible-lint docker
|
||||
|
||||
before_script:
|
||||
# Use actual Ansible Galaxy role name for the project directory.
|
||||
|
@ -4,9 +4,8 @@ dependency:
|
||||
driver:
|
||||
name: docker
|
||||
lint:
|
||||
name: yamllint
|
||||
options:
|
||||
config-file: molecule/default/yaml-lint.yml
|
||||
yamllint .
|
||||
ansible-lint
|
||||
platforms:
|
||||
- name: instance
|
||||
image: "geerlingguy/docker-${MOLECULE_DISTRO:-centos7}-ansible:latest"
|
||||
@ -17,13 +16,7 @@ platforms:
|
||||
pre_build_image: true
|
||||
provisioner:
|
||||
name: ansible
|
||||
lint:
|
||||
name: ansible-lint
|
||||
playbooks:
|
||||
converge: ${MOLECULE_PLAYBOOK:-playbook.yml}
|
||||
converge: ${MOLECULE_PLAYBOOK:-converge.yml}
|
||||
scenario:
|
||||
name: default
|
||||
verifier:
|
||||
name: testinfra
|
||||
lint:
|
||||
name: flake8
|
||||
|
@ -1,63 +0,0 @@
|
||||
---
|
||||
- name: Converge
|
||||
hosts: all
|
||||
become: true
|
||||
|
||||
vars:
|
||||
php_enable_webserver: false
|
||||
php_enable_php_fpm: true
|
||||
php_memory_limit: "192M"
|
||||
php_enablerepo: "remi,remi-php70"
|
||||
php_install_recommends: false
|
||||
|
||||
handlers:
|
||||
- name: update apt cache
|
||||
apt: update_cache=true
|
||||
when: ansible_os_family == 'Debian'
|
||||
|
||||
pre_tasks:
|
||||
- name: Update apt cache.
|
||||
apt: update_cache=true cache_valid_time=600
|
||||
when: ansible_os_family == 'Debian'
|
||||
changed_when: false
|
||||
|
||||
# Ubuntu-specific tasks.
|
||||
- name: Add repository for PHP 7.
|
||||
apt_repository: repo='ppa:ondrej/php'
|
||||
when: ansible_distribution == 'Ubuntu'
|
||||
|
||||
# Debian-specific tasks.
|
||||
- name: Add dependencies for PHP versions (Debian).
|
||||
apt:
|
||||
name:
|
||||
- apt-transport-https
|
||||
- ca-certificates
|
||||
state: present
|
||||
when: ansible_distribution == "Debian"
|
||||
|
||||
- name: Add Ondrej Sury's apt key (Debian).
|
||||
apt_key:
|
||||
url: https://packages.sury.org/php/apt.gpg
|
||||
state: present
|
||||
when: ansible_distribution == "Debian"
|
||||
|
||||
- name: Add Ondrej Sury's repo (Debian).
|
||||
apt_repository:
|
||||
repo: "deb https://packages.sury.org/php/ {{ ansible_distribution_release }} main"
|
||||
state: present
|
||||
when: ansible_distribution == "Debian"
|
||||
notify: update apt cache
|
||||
|
||||
- meta: flush_handlers
|
||||
|
||||
roles:
|
||||
- role: geerlingguy.repo-remi
|
||||
when:
|
||||
- ansible_os_family == 'RedHat'
|
||||
- ansible_distribution != 'Fedora'
|
||||
- role: geerlingguy.php
|
||||
|
||||
post_tasks:
|
||||
- name: Confirm PHP configuration is correct.
|
||||
shell: php -i | grep 'memory_limit.*192'
|
||||
changed_when: false
|
@ -1,6 +0,0 @@
|
||||
---
|
||||
extends: default
|
||||
rules:
|
||||
line-length:
|
||||
max: 120
|
||||
level: warning
|
Loading…
Reference in New Issue
Block a user