|
|
|
|
|
|
|
|
{% set from_phusionpassenger = false %} |
|
|
{% set from_phusionpassenger = false %} |
|
|
{%- endif %} |
|
|
{%- endif %} |
|
|
|
|
|
|
|
|
|
|
|
{%- set resource_repo_managed = 'file' if grains.os_family == 'Debian' else 'pkgrepo' %} |
|
|
|
|
|
|
|
|
nginx_install: |
|
|
nginx_install: |
|
|
pkg.installed: |
|
|
pkg.installed: |
|
|
{{ sls_block(nginx.package.opts) }} |
|
|
{{ sls_block(nginx.package.opts) }} |
|
|
|
|
|
|
|
|
) |
|
|
) |
|
|
}} |
|
|
}} |
|
|
- require_in: |
|
|
- require_in: |
|
|
- pkgrepo: nginx_official_repo |
|
|
|
|
|
|
|
|
- {{ resource_repo_managed }}: nginx_official_repo |
|
|
{%- endif %} |
|
|
{%- endif %} |
|
|
|
|
|
|
|
|
nginx_official_repo: |
|
|
nginx_official_repo: |
|
|
pkgrepo: |
|
|
|
|
|
|
|
|
file: |
|
|
{%- if from_official %} |
|
|
{%- if from_official %} |
|
|
- managed |
|
|
- managed |
|
|
{%- else %} |
|
|
{%- else %} |
|
|
- absent |
|
|
- absent |
|
|
{%- endif %} |
|
|
{%- endif %} |
|
|
- humanname: nginx apt repo |
|
|
|
|
|
- name: >- |
|
|
|
|
|
|
|
|
- name: /etc/apt/sources.list.d/nginx-official-{{ grains.oscodename }}.list |
|
|
|
|
|
- contents: > |
|
|
deb [signed-by={{ nginx.lookup.package_repo_keyring }}] |
|
|
deb [signed-by={{ nginx.lookup.package_repo_keyring }}] |
|
|
http://nginx.org/packages/{{ grains.os | lower }}/ {{ grains.oscodename }} nginx |
|
|
http://nginx.org/packages/{{ grains.os | lower }}/ {{ grains.oscodename }} nginx |
|
|
- file: /etc/apt/sources.list.d/nginx-official-{{ grains.oscodename }}.list |
|
|
|
|
|
|
|
|
|
|
|
- require_in: |
|
|
- require_in: |
|
|
- pkg: nginx_install |
|
|
- pkg: nginx_install |
|
|
- watch_in: |
|
|
- watch_in: |
|
|
|
|
|
|
|
|
) |
|
|
) |
|
|
}} |
|
|
}} |
|
|
- require_in: |
|
|
- require_in: |
|
|
- pkgrepo: nginx_phusionpassenger_repo |
|
|
|
|
|
|
|
|
- {{ resource_repo_managed }}: nginx_phusionpassenger_repo |
|
|
|
|
|
|
|
|
# Remove the old repo file |
|
|
# Remove the old repo file |
|
|
nginx_phusionpassenger_repo_remove: |
|
|
nginx_phusionpassenger_repo_remove: |
|
|
|
|
|
|
|
|
- name: deb http://nginx.org/packages/{{ grains.os |lower }}/ {{ grains.oscodename }} nginx |
|
|
- name: deb http://nginx.org/packages/{{ grains.os |lower }}/ {{ grains.oscodename }} nginx |
|
|
- keyid: 561F9B9CAC40B2F7 |
|
|
- keyid: 561F9B9CAC40B2F7 |
|
|
- require_in: |
|
|
- require_in: |
|
|
- pkgrepo: nginx_phusionpassenger_repo |
|
|
|
|
|
|
|
|
- {{ resource_repo_managed }}: nginx_phusionpassenger_repo |
|
|
file.absent: |
|
|
file.absent: |
|
|
- name: /etc/apt/sources.list.d/nginx-phusionpassenger-{{ grains.oscodename }}.list |
|
|
- name: /etc/apt/sources.list.d/nginx-phusionpassenger-{{ grains.oscodename }}.list |
|
|
- require_in: |
|
|
- require_in: |
|
|
- pkgrepo: nginx_phusionpassenger_repo |
|
|
|
|
|
|
|
|
- {{ resource_repo_managed }}: nginx_phusionpassenger_repo |
|
|
{%- endif %} |
|
|
{%- endif %} |
|
|
|
|
|
|
|
|
nginx_phusionpassenger_repo: |
|
|
nginx_phusionpassenger_repo: |
|
|
pkgrepo: |
|
|
|
|
|
|
|
|
file: |
|
|
{%- if from_phusionpassenger %} |
|
|
{%- if from_phusionpassenger %} |
|
|
- managed |
|
|
- managed |
|
|
{%- else %} |
|
|
{%- else %} |
|
|
- absent |
|
|
- absent |
|
|
{%- endif %} |
|
|
{%- endif %} |
|
|
- humanname: nginx phusionpassenger repo |
|
|
|
|
|
- name: >- |
|
|
|
|
|
|
|
|
- name: /etc/apt/sources.list.d/phusionpassenger-official-{{ grains.oscodename }}.list |
|
|
|
|
|
- contents: > |
|
|
deb [signed-by={{ nginx.lookup.passenger_package_repo_keyring }}] |
|
|
deb [signed-by={{ nginx.lookup.passenger_package_repo_keyring }}] |
|
|
https://oss-binaries.phusionpassenger.com/apt/passenger {{ grains.oscodename }} main |
|
|
https://oss-binaries.phusionpassenger.com/apt/passenger {{ grains.oscodename }} main |
|
|
- file: /etc/apt/sources.list.d/phusionpassenger-official-{{ grains.oscodename }}.list |
|
|
|
|
|
|
|
|
|
|
|
- require_in: |
|
|
- require_in: |
|
|
- pkg: nginx_install |
|
|
- pkg: nginx_install |
|
|
- watch_in: |
|
|
- watch_in: |