main.yml 1.28 KB
Newer Older
1
---
Georgios Ouzounis's avatar
Georgios Ouzounis committed
2
  - name: Fix Debian locale error.
3
    command: update-locale LANGUAGE="en_US.UTF-8" LC_ALL="en_US.UTF-8" #"echo 'LANGUAGE="en_US.UTF-8"' > /etc/default/locale && echo 'LC_ALL="en_US.UTF-8"' >> /etc/default/locale # The first redirection intentionally creates the file.
Georgios Ouzounis's avatar
Georgios Ouzounis committed
4

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

8 9 10 11 12 13 14
  - name: Install python-pip, python-dev, sudo and git packages.
    apt: name={{ item.name }} state=latest
    with_items:
      - { name: 'python-pip' }
      - { name: 'python-dev' }
      - { name: 'sudo'       }
      - { name: '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 24
  - name: Include django-install tasks.
    include: django-install.yml

25 26 27 28
  - 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.
    notify:                                                                                                                        # The repository should be changed when the pull request gets merged.
      - django_db_migrate