Skip to content
Snippets Groups Projects
Commit 32b3ec04 authored by Hervé  MENAGER's avatar Hervé MENAGER
Browse files

WIP on ansible

Former-commit-id: 0c0564f2c9c7cb3aee721c8b1200505c3045ffcc
parent f52e3dc0
No related branches found
No related tags found
No related merge requests found
......@@ -16,28 +16,7 @@
tasks:
- name: install python requirements
pip: requirements=/home/ippidb/iPPIDB/ippisite/requirements.txt extra_args=--upgrade executable=pip3
- hosts: all
become: yes
become_user: ippidb
gather_facts: no
#environment:
#DJANGO_SETTINGS_MODULE: "{{ django_project }}.settings.production"
#DATABASE_URL: postgres://{{ dbuser }}:{{ dbpassword }}@localhost/{{ dbname }}
#STATIC_ROOT: "{{ static_dir }}"
tasks:
- name: create static_root dir
file: path={{ static_dir }} state=directory mode=0755
- name: django collectstatic
shell: ./manage.py collectstatic --noinput chdir={{ django_dir }}
- name: django migrate
shell: ./manage.py migrate --noinput chdir={{ django_dir }}
- name: django loaddata
shell: ./manage.py loaddata user chdir={{ django_dir }}
- hosts: all
gather_facts: no
tasks:
- name: uwsgi restart
service: name=uwsgi state=restarted
- name: create mod_wsgi configuration
django_manage:
command: "runmodwsgi --setup-only --port=80 --user ippidb --group wheel --server-root=/etc/ippidb-80"
app_path: "/home/ippidb/iPPIDB/ippisite"
......@@ -5,11 +5,6 @@
- name: Create {{ deploy_user_name }} user
user: name={{ deploy_user_name }} generate_ssh_key=yes ssh_key_bits=2048 ssh_key_file=.ssh/id_rsa
become: true
#- name: Read SSH public key
# slurp: src=/home/ippidb/.ssh/id_rsa.pub
# register: public_key
# become: true
#- debug: msg="{{ public_key['content'] | b64decode }}"
- name: install git
yum: name=git state=present
become: true
......@@ -20,6 +15,16 @@
description: EPEL YUM repo
gpgcheck: no
baseurl: https://download.fedoraproject.org/pub/epel/$releasever/$basearch/
- name: disable SELinux
become: true
selinux:
state: disabled
- name: Open firewall to HTTP traffic
firewalld:
service: http
permanent: true
state: enabled
become: true
- name: install python3
yum: name=python34 state=present update_cache=yes
become: true
......@@ -35,6 +40,15 @@
- name: install graphviz
yum: name=graphviz state=present update_cache=yes
become: true
- name: install httpd
yum: name=httpd state=present update_cache=yes
become: true
- name: install httpd-devel
yum: name=httpd-devel state=present update_cache=yes
become: true
- name: install mod_wsgi
pip: name=mod_wsgi extra_args=--upgrade executable=pip3
become: true
- name: install graphviz-devel
yum: name=graphviz-devel state=present update_cache=yes
become: true
......
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