Merge "Don't nest installation variables under a params key"
This commit is contained in:
commit
0c9eed02a3
|
@ -17,7 +17,6 @@
|
||||||
# along with ARA. If not, see <http://www.gnu.org/licenses/>.
|
# along with ARA. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
ara:
|
ara:
|
||||||
params:
|
|
||||||
install:
|
install:
|
||||||
# The method used to install ARA ('pip' or 'distribution')
|
# The method used to install ARA ('pip' or 'distribution')
|
||||||
method: pip
|
method: pip
|
||||||
|
|
|
@ -36,26 +36,26 @@
|
||||||
pip:
|
pip:
|
||||||
name: setuptools
|
name: setuptools
|
||||||
state: latest
|
state: latest
|
||||||
virtualenv: "{{ ara.params.install.pip.virtualenv_path }}"
|
virtualenv: "{{ ara.install.pip.virtualenv_path }}"
|
||||||
when: ara.params.install.pip.virtualenv | bool
|
when: ara.install.pip.virtualenv | bool
|
||||||
|
|
||||||
- name: Install ARA with pip
|
- name: Install ARA with pip
|
||||||
become: true
|
become: true
|
||||||
vars:
|
vars:
|
||||||
# Manage that the 'version' argument doesn't work when installing from source
|
# Manage that the 'version' argument doesn't work when installing from source
|
||||||
pkg_name: |
|
pkg_name: |
|
||||||
{%- if ara.params.install.pip.method == 'source' and ara.params.install.pip.version -%}
|
{%- if ara.install.pip.method == 'source' and ara.install.pip.version -%}
|
||||||
{{- ara.params.install.pip.source }}@{{ ara.params.install.pip.version | default('master') -}}
|
{{- ara.install.pip.source }}@{{ ara.install.pip.version | default('master') -}}
|
||||||
{%- else -%}
|
{%- else -%}
|
||||||
ara
|
ara
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
pip:
|
pip:
|
||||||
name: "{{ pkg_name }}"
|
name: "{{ pkg_name }}"
|
||||||
version: "{{ ara.params.install.pip.version | default(omit, True) }}"
|
version: "{{ ara.install.pip.version | default(omit, True) }}"
|
||||||
state: present
|
state: present
|
||||||
virtualenv: "{{ ara.params.install.pip.virtualenv | bool | ternary(ara.params.install.pip.virtualenv_path, omit) }}"
|
virtualenv: "{{ ara.install.pip.virtualenv | bool | ternary(ara.install.pip.virtualenv_path, omit) }}"
|
||||||
|
|
||||||
- name: Suffix the virtualenv bin directory to PATH
|
- name: Suffix the virtualenv bin directory to PATH
|
||||||
set_fact:
|
set_fact:
|
||||||
path_with_virtualenv: "{{ ara.params.install.pip.virtualenv_path }}/bin:{{ ansible_env.PATH }}"
|
path_with_virtualenv: "{{ ara.install.pip.virtualenv_path }}/bin:{{ ansible_env.PATH }}"
|
||||||
when: ara.params.install.pip.virtualenv | bool
|
when: ara.install.pip.virtualenv | bool
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
- ara_override is mapping
|
- ara_override is mapping
|
||||||
|
|
||||||
- name: Include ARA installation
|
- name: Include ARA installation
|
||||||
include_tasks: "install/{{ ara.params.install.method }}.yml"
|
include_tasks: "install/{{ ara.install.method }}.yml"
|
||||||
|
|
||||||
- name: Create user for ARA
|
- name: Create user for ARA
|
||||||
become: true
|
become: true
|
||||||
|
|
|
@ -6,11 +6,11 @@
|
||||||
CustomLog {{ apache_log_path }}/ara-access.log combined
|
CustomLog {{ apache_log_path }}/ara-access.log combined
|
||||||
|
|
||||||
SetEnv ANSIBLE_CONFIG /etc/ara/ara.cfg
|
SetEnv ANSIBLE_CONFIG /etc/ara/ara.cfg
|
||||||
{% if ara.params.install.pip.virtualenv -%}
|
{% if ara.install.pip.virtualenv -%}
|
||||||
SetEnv ARA_WSGI_USE_VIRTUALENV 1
|
SetEnv ARA_WSGI_USE_VIRTUALENV 1
|
||||||
SetEnv ARA_WSGI_VIRTUALENV_PATH {{ ara.params.install.pip.virtualenv_path }}
|
SetEnv ARA_WSGI_VIRTUALENV_PATH {{ ara.install.pip.virtualenv_path }}
|
||||||
|
|
||||||
WSGIDaemonProcess ara user=ara group=ara processes=1 threads=4 python-home={{ ara.params.install.pip.virtualenv_path }}
|
WSGIDaemonProcess ara user=ara group=ara processes=1 threads=4 python-home={{ ara.install.pip.virtualenv_path }}
|
||||||
{% else -%}
|
{% else -%}
|
||||||
WSGIDaemonProcess ara user=ara group=ara processes=1 threads=4
|
WSGIDaemonProcess ara user=ara group=ara processes=1 threads=4
|
||||||
{% endif -%}
|
{% endif -%}
|
||||||
|
|
Loading…
Reference in New Issue