Refactor package support

Remove dead code. Remove epel-release support and force user to enable
it.

Change-Id: Ie9fc5c43f6aa5eb953923eb4bc2d3d481fc6aa2d
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
Paul Belanger 2016-02-17 15:08:36 -05:00
parent a129519944
commit d1fcb5b615
6 changed files with 28 additions and 17 deletions

View File

@ -20,3 +20,5 @@ nginx_file_include_dir_src: ""
nginx_file_nginx_conf_dest: /etc/nginx/nginx.conf nginx_file_nginx_conf_dest: /etc/nginx/nginx.conf
nginx_file_nginx_conf_src: "" nginx_file_nginx_conf_src: ""
nginx_package_name: nginx

View File

@ -12,10 +12,7 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
--- ---
- name: Define nginx_config_include_dir - name: Install nginx package.
set_fact: package:
nginx_config_include_dir: "{{ __nginx_config_include_dir }}" name: "{{ nginx_package_name }}"
when: nginx_config_include_dir is not defined state: installed
- include: install/redhat.yaml
when: ansible_os_family == 'RedHat'

View File

@ -12,13 +12,4 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
--- ---
# NOTE(pabelanger): This needs to be here for now, since we need python-pip.
- name: Ensure EPEL is enabled.
yum:
pkg: epel-release
state: installed
- name: Install nginx using yum.
yum:
pkg: nginx
state: installed

View File

@ -15,5 +15,13 @@
- hosts: localhost - hosts: localhost
vars: vars:
rolename: "{{ lookup('pipe', 'pwd') | dirname | basename }}" rolename: "{{ lookup('pipe', 'pwd') | dirname | basename }}"
pre_tasks:
# Make sure OS does not have a stale package cache.
- name: Update apt cache.
become: yes
apt:
update_cache: yes
when: ansible_os_family == 'Debian'
roles: roles:
- "{{ rolename }}" - "{{ rolename }}"

14
vars/Debian.yaml Normal file
View File

@ -0,0 +1,14 @@
# Copyright 2015 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
---

View File

@ -12,4 +12,3 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
--- ---
__nginx_config_include_dir: /etc/nginx/conf.d