main.yml 1.31 KB
Newer Older
1
---
2 3
  - name: Fix locale problem.
    command: update-locale LANGUAGE="en_US.UTF-8" LC_ALL="en_US.UTF-8"
Georgios Ouzounis's avatar
Georgios Ouzounis committed
4

5 6 7
  - name: Upgrade packages.
    apt: upgrade=dist update_cache=yes

8
  - name: Install python-pip, python-dev, sudo and git packages.
9
    apt: name={{ item }} state=latest
10
    with_items:
11 12 13 14
      - python-pip
      - python-dev
      - sudo
      - git
15

16 17
  - name: Create service user.
    user: name={{ username }} shell=/bin/bash
Georgios Ouzounis's avatar
Georgios Ouzounis committed
18

19 20 21
  - name: Include postgresql-install tasks.
    include: postgresql-install.yml

22 23
  - name: Install Django using Pip.
    pip: name=Django
24

25 26
  - name: Download Django code from Github.
    git: repo=https://github.com/gouzouni625/okeanos-LoD.git dest={{ repository_download_path }}/okeanos-LoD version=LAM-53-Django # version can be used to select a branch. See ansible git module documentation.
27 28 29 30 31 32 33 34 35
                                                                                                                                   # The repository should be changed when the pull request gets merged.

  - name: Change repository permissions.
    file: path={{ repository_download_path }} owner={{ username }} recurse=yes

  - name: Setup Django database configuration.
    template: src=settings.py.j2 dest={{ repository_download_path}}/okeanos-LoD/webapp/webapp/settings.py
    notify:
      - django_dbs_migrate