Make role work on Fedora.

This commit is contained in:
Jeff Geerling 2016-09-17 18:42:47 -05:00
parent 6f140ef07f
commit 5cb6fe72fb
5 changed files with 9 additions and 6 deletions

View File

@ -3,7 +3,7 @@ dependencies: []
galaxy_info: galaxy_info:
author: geerlingguy author: geerlingguy
description: PHP for RedHat/CentOS/Debian/Ubuntu. description: PHP for RedHat/CentOS/Fedora/Debian/Ubuntu.
company: "Midwestern Mac, LLC" company: "Midwestern Mac, LLC"
license: "license (BSD, MIT)" license: "license (BSD, MIT)"
min_ansible_version: 2.0 min_ansible_version: 2.0
@ -12,6 +12,9 @@ galaxy_info:
versions: versions:
- 6 - 6
- 7 - 7
- name: Fedora
versions:
- all
- name: Debian - name: Debian
versions: versions:
- all - all

View File

@ -1,6 +1,6 @@
--- ---
- name: Ensure dependencies for building from source are installed (RedHat). - name: Ensure dependencies for building from source are installed (RedHat).
yum: "pkg={{ item }} state=installed" package: "name={{ item }} state=installed"
with_items: with_items:
- autoconf - autoconf
- automake - automake

View File

@ -1,6 +1,6 @@
--- ---
- name: Ensure PHP packages are installed. - name: Ensure PHP packages are installed.
yum: package:
name: "{{ item }}" name: "{{ item }}"
state: "{{ php_packages_state }}" state: "{{ php_packages_state }}"
enablerepo: "{{ php_enablerepo }}" enablerepo: "{{ php_enablerepo }}"

View File

@ -11,7 +11,7 @@
pre_tasks: pre_tasks:
- name: Ensure build dependencies are installed (RedHat). - name: Ensure build dependencies are installed (RedHat).
yum: name=which state=present package: name=which state=present
when: ansible_os_family == 'RedHat' when: ansible_os_family == 'RedHat'
roles: roles:

View File

@ -11,7 +11,7 @@
when: ansible_distribution == 'Ubuntu' and ansible_distribution_version == '12.04' when: ansible_distribution == 'Ubuntu' and ansible_distribution_version == '12.04'
- name: Ensure build dependencies are installed (RedHat). - name: Ensure build dependencies are installed (RedHat).
yum: name=which state=present package: name=which state=present
when: ansible_os_family == 'RedHat' when: ansible_os_family == 'RedHat'
- name: Add repository for PHP 7. - name: Add repository for PHP 7.
@ -24,5 +24,5 @@
roles: roles:
- role: geerlingguy.repo-remi - role: geerlingguy.repo-remi
when: ansible_os_family == 'RedHat' when: ansible_os_family == 'RedHat' and ansible_distribution != 'Fedora'
- role_under_test - role_under_test