Commit c3f6338a authored by jaywink's avatar jaywink

Merge branch 'variablize-deps' into 'master'

Variablize system and Postgres dependencies

See merge request !2
parents 3eb9ec2d 068af8b1
......@@ -67,3 +67,30 @@ socialhome_streams_precache_inactive_days: 30
# Django-Silk
socialhome_silky: false
# Dependencies
socialhome_system_dependencies:
- git
- gettext
# Postgresql
- libpq-dev
# Apache
- apache2
# uWSGI
- build-essential
- python-dev
- python3-dev
# Virtualenv
- virtualenv
- python-virtualenv
- python3-setuptools
# Redis
- redis-server
socialhome_postgres_version: 10
socialhome_postgres_dependencies:
- "postgresql-{{ socialhome_postgres_version }}"
- python-psycopg2
# Locales:
socialhome_locales: en_US.UTF-8
\ No newline at end of file
---
- name: Ensure locales are set (LANGUAGE)
lineinfile: line='LANGUAGE="en_US.UTF-8"' dest=/etc/default/locale state=present
lineinfile: line='LANGUAGE="{{ socialhome_locales }}"' dest=/etc/default/locale state=present
- name: Ensure locales are set (LC_ALL)
lineinfile: line='LC_ALL="en_US.UTF-8"' dest=/etc/default/locale state=present
lineinfile: line='LC_ALL="{{ socialhome_locales }}"' dest=/etc/default/locale state=present
- name: System dependencies
apt: name={{ item }} state=present update_cache=yes cache_valid_time=86400
with_items:
- git
- gettext
# Postgresql
- libpq-dev
# Apache
- apache2
# uWSGI
- build-essential
- python-dev
- python3-dev
# Virtualenv
- virtualenv
- python-virtualenv
- python3-setuptools
# Redis
- redis-server
apt:
name: {{ socialhome_system_dependencies }}
state: present
update_cache: yes
cache_valid_time: 86400
- name: Install postgres
apt: name={{ item }} state=present
with_items:
- postgresql-9.3
- python-psycopg2
apt: name={{ socialhome_postgres_dependencies }} state=present
when: socialhome_db_install_postgres
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment