Merge pull request #43 from saltstack-formulas/revert-42-add_install_from_ppa
Revert "ENH: Add install_from_ppa pillar setting and PPA pkgrepo"
This commit is contained in:
commit
c3c5d9777d
@ -1,11 +1,9 @@
|
|||||||
{%- set nginx=pillar.get('nginx', {}) %}
|
|
||||||
|
|
||||||
include:
|
include:
|
||||||
- nginx.common
|
- nginx.common
|
||||||
{% if nginx.get('user_auth_enabled', true) %}
|
{% if pillar.get('nginx', {}).get('user_auth_enabled', true) %}
|
||||||
- nginx.users
|
- nginx.users
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if nginx.get('install_from_source') %}
|
{% if pillar.get('nginx', {}).get('install_from_source') %}
|
||||||
- nginx.source
|
- nginx.source
|
||||||
{% else %}
|
{% else %}
|
||||||
- nginx.package
|
- nginx.package
|
||||||
|
@ -1,10 +1,8 @@
|
|||||||
{% set nginx = salt['grains.filter_by']({
|
{% set nginx = salt['grains.filter_by']({
|
||||||
'Debian': {
|
'Debian': {
|
||||||
'package': 'nginx',
|
|
||||||
'apache_utils': 'apache2-utils',
|
'apache_utils': 'apache2-utils',
|
||||||
},
|
},
|
||||||
'RedHat': {
|
'RedHat': {
|
||||||
'package': 'nginx',
|
|
||||||
'apache_utils': 'httpd-tools',
|
'apache_utils': 'httpd-tools',
|
||||||
},
|
},
|
||||||
}, merge=salt['pillar.get']('nginx:lookup')) %}
|
}, merge=salt['pillar.get']('nginx:lookup')) %}
|
@ -5,25 +5,10 @@
|
|||||||
{% from 'nginx/ng/map.jinja' import nginx, sls_block with context %}
|
{% from 'nginx/ng/map.jinja' import nginx, sls_block with context %}
|
||||||
|
|
||||||
nginx_install:
|
nginx_install:
|
||||||
{% if nginx.install_from_source %}
|
{% if nginx.from_source %}
|
||||||
## add source compilation here
|
## add source compilation here
|
||||||
{% else %}
|
{% else %}
|
||||||
pkg.installed:
|
pkg.installed:
|
||||||
{{ sls_block(nginx.package.opts) }}
|
{{ sls_block(nginx.package.opts) }}
|
||||||
- name: {{ nginx.lookup.package }}
|
- name: {{ nginx.lookup.package }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if salt['grains.get']('os_family') == 'Debian' %}
|
|
||||||
{% if nginx.install_from_ppa %}
|
|
||||||
nginx_ppa_repo:
|
|
||||||
pkgrepo.managed:
|
|
||||||
- humanname: nginx-ppa-{{ grains['oscodename'] }}
|
|
||||||
- name: deb http://ppa.launchpad.net/nginx/stable/ubuntu {{ grains['oscodename'] }} main
|
|
||||||
- file: /etc/apt/sources.list.d/nginx-stable-{{ grains['oscodename'] }}.list
|
|
||||||
- dist: {{ grains['oscodename'] }}
|
|
||||||
- keyid: C300EE8C
|
|
||||||
- keyserver: keyserver.ubuntu.com
|
|
||||||
- require_in:
|
|
||||||
- pkg: nginx_install
|
|
||||||
{% endif %}
|
|
||||||
{% endif %}
|
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
{% from "nginx/map.jinja" import nginx with context %}
|
|
||||||
{% set use_upstart = pillar.get('nginx', {}).get('use_upstart', true) %}
|
{% set use_upstart = pillar.get('nginx', {}).get('use_upstart', true) %}
|
||||||
{% if use_upstart %}
|
{% if use_upstart %}
|
||||||
nginx-old-init:
|
nginx-old-init:
|
||||||
@ -36,23 +35,9 @@ nginx-old-init-disable:
|
|||||||
- file: nginx-old-init
|
- file: nginx-old-init
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if salt['grains.get']('os_family') == 'Debian' %}
|
|
||||||
nginx-ppa-repo:
|
|
||||||
pkgrepo.managed:
|
|
||||||
- enabled: {{ salt['pillar.get']('nginx:install_from_ppa', False) }}
|
|
||||||
- humanname: nginx-ppa-{{ grains['oscodename'] }}
|
|
||||||
- name: deb http://ppa.launchpad.net/nginx/stable/ubuntu {{ grains['oscodename'] }} main
|
|
||||||
- file: /etc/apt/sources.list.d/nginx-stable-{{ grains['oscodename'] }}.list
|
|
||||||
- dist: {{ grains['oscodename'] }}
|
|
||||||
- keyid: C300EE8C
|
|
||||||
- keyserver: keyserver.ubuntu.com
|
|
||||||
- require_in:
|
|
||||||
- pkg: nginx
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
nginx:
|
nginx:
|
||||||
pkg.installed:
|
pkg.installed:
|
||||||
- name: {{ nginx.package }}
|
- name: nginx
|
||||||
{% if use_upstart %}
|
{% if use_upstart %}
|
||||||
file:
|
file:
|
||||||
- managed
|
- managed
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
nginx:
|
nginx:
|
||||||
install_from_source: True
|
install_from_source: True
|
||||||
install_from_ppa: False
|
|
||||||
use_upstart: True
|
use_upstart: True
|
||||||
user_auth_enabled: True
|
user_auth_enabled: True
|
||||||
with_luajit: False
|
with_luajit: False
|
||||||
@ -14,9 +13,6 @@ nginx:
|
|||||||
source: http://github.com/agentzh/headers-more-nginx-module/tarball/v0.21
|
source: http://github.com/agentzh/headers-more-nginx-module/tarball/v0.21
|
||||||
source_hash: sha1=dbf914cbf3f7b6cb7e033fa7b7c49e2f8879113b
|
source_hash: sha1=dbf914cbf3f7b6cb7e033fa7b7c49e2f8879113b
|
||||||
|
|
||||||
lookup:
|
|
||||||
package: nginx
|
|
||||||
|
|
||||||
# ========
|
# ========
|
||||||
# nginx.ng
|
# nginx.ng
|
||||||
# ========
|
# ========
|
||||||
@ -34,10 +30,7 @@ nginx:
|
|||||||
vhost_use_symlink: True
|
vhost_use_symlink: True
|
||||||
|
|
||||||
# Source compilation is not currently a part of nginx.ng
|
# Source compilation is not currently a part of nginx.ng
|
||||||
install_from_source: False
|
from_source: False
|
||||||
|
|
||||||
# Install nginx.ng.lookup.package from the PPA repository
|
|
||||||
install_from_ppa: True
|
|
||||||
|
|
||||||
package:
|
package:
|
||||||
opts: {} # this partially exposes parameters of pkg.installed
|
opts: {} # this partially exposes parameters of pkg.installed
|
||||||
|
Loading…
Reference in New Issue
Block a user