Merge "Don't nest installation variables under a params key"
This commit is contained in:
commit
0c9eed02a3
@ -17,24 +17,23 @@
|
|||||||
# 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
|
pip:
|
||||||
pip:
|
# If ARA should be installed inside a virtualenv
|
||||||
# If ARA should be installed inside a virtualenv
|
virtualenv: true
|
||||||
virtualenv: true
|
# Location where the virtualenv should be installed
|
||||||
# Location where the virtualenv should be installed
|
virtualenv_path: /opt/ara-venv
|
||||||
virtualenv_path: /opt/ara-venv
|
# Method to install ARA with pip ('pypi' or 'source')
|
||||||
# Method to install ARA with pip ('pypi' or 'source')
|
method: pypi
|
||||||
method: pypi
|
# When installing from source, location of the repository
|
||||||
# When installing from source, location of the repository
|
# When installing from a source on the filesystem, only specify the path to the repository
|
||||||
# When installing from a source on the filesystem, only specify the path to the repository
|
source: git+https://git.openstack.org/openstack/ara
|
||||||
source: git+https://git.openstack.org/openstack/ara
|
# When installing from pypi, version to install (ex: '0.15.0')
|
||||||
# When installing from pypi, version to install (ex: '0.15.0')
|
# When installing from source, ref to the commit, tag or branch to install
|
||||||
# When installing from source, ref to the commit, tag or branch to install
|
# Defaults to the latest version on PyPi or the master branch when installing from source
|
||||||
# Defaults to the latest version on PyPi or the master branch when installing from source
|
version:
|
||||||
version:
|
|
||||||
config:
|
config:
|
||||||
database: "sqlite:////var/lib/ara/ansible.sqlite"
|
database: "sqlite:////var/lib/ara/ansible.sqlite"
|
||||||
# Host to listen on for embedded server, apache or nginx
|
# Host to listen on for embedded server, apache or nginx
|
||||||
|
@ -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
Block a user