2019-05-20 18:32:08 +02:00
|
|
|
---
|
2019-11-22 15:52:34 +01:00
|
|
|
- name: "(Install: Alpine) Set Default APK NGINX Repository"
|
|
|
|
set_fact:
|
|
|
|
default_repository: >-
|
|
|
|
https://nginx.org/packages/{{ (nginx_branch == 'mainline')
|
|
|
|
| ternary('mainline/', '') }}alpine/v{{ ansible_distribution_version.split('.')[0] }}.{{ ansible_distribution_version.split('.')[1] }}/main
|
|
|
|
|
|
|
|
- name: "(Install: Alpine) Set APK NGINX Repository"
|
|
|
|
set_fact:
|
|
|
|
repository: "{{ nginx_repository | default(default_repository) }}"
|
|
|
|
|
|
|
|
- name: "(Install: Alpine) Add NGINX Repository"
|
2019-05-20 18:32:08 +02:00
|
|
|
lineinfile:
|
|
|
|
path: /etc/apk/repositories
|
|
|
|
insertafter: EOF
|
2019-11-22 15:52:34 +01:00
|
|
|
line: "{{ repository }}"
|
2019-11-24 02:10:55 +01:00
|
|
|
|
|
|
|
- name: "(Install: Alpine) Install Required Alpine Dependencies"
|
|
|
|
apk:
|
|
|
|
name:
|
|
|
|
- openssl
|
|
|
|
- pcre
|
|
|
|
|
|
|
|
- name: "(Install: Alpine) Install NGINX"
|
|
|
|
apk:
|
|
|
|
name: "nginx{{ nginx_version | default('') }}"
|
|
|
|
repository: "{{ repository }}"
|
2019-12-07 01:48:15 +01:00
|
|
|
state: "{{ nginx_state }}"
|
2019-11-24 02:10:55 +01:00
|
|
|
notify: "(Handler: All OSs) Start NGINX"
|