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

WIP on ansible deployment

Former-commit-id: 80c84bd711c4f3d58ebf37c9cfca4f2977ac7968
parent 68b16145
No related branches found
No related tags found
No related merge requests found
......@@ -7,14 +7,15 @@
- name: pull branch master
git:
repo=git@gitlab.pasteur.fr:odoppelt/iPPIDB.git
dest=iPPIDB
dest=/home/ippidb/iPPIDB
accept_hostkey=yes
- hosts: all
become: yes
gather_facts: no
tasks:
- name: install python requirements
pip: requirements={{ repo_dir }}/requirements.txt extra_args=--upgrade
pip: requirements=/home/ippidb/iPPIDB/ippisite/requirements.txt extra_args=--upgrade executable=pip3
- hosts: all
become: yes
......
......@@ -13,6 +13,36 @@
- name: install git
yum: name=git state=present
become: true
- name: Add repository
become: true
yum_repository:
name: epel
description: EPEL YUM repo
gpgcheck: no
baseurl: https://download.fedoraproject.org/pub/epel/$releasever/$basearch/
- name: install python3
yum: name=python34 state=present update_cache=yes
become: true
- name: install python3 development package
yum: name=python34-devel state=present update_cache=yes
become: true
- name: install setuptools
yum: name=python34-setuptools state=present update_cache=yes
become: true
- name: install pip
shell: "easy_install-3.4 pip"
become: true
- name: install graphviz
yum: name=graphviz state=present update_cache=yes
become: true
- name: install graphviz-devel
yum: name=graphviz-devel state=present update_cache=yes
become: true
- name: install the 'Development tools' package group
yum:
name: "@Development tools"
state: present
become: true
- name: Cat deployer's user public key
shell: "cat /home/{{ deploy_user_name }}/.ssh/id_rsa.pub"
register: key_value
......@@ -24,5 +54,5 @@
shell: "cat /home/{{ deploy_user_name }}/ssh_key.json"
become: true
- name: Upload deploy keys to gitlab
shell: "curl -X POST -H 'Accept: application/json' -H 'Content-type: application/json' -H 'PRIVATE-TOKEN: {{ repo_api_token }}' --data-binary @/home/{{ deploy_user_name }}/ssh_key.json https://gitlab.pasteur.fr/api/v3/projects/odoppelt/iPPIDB/keys"
shell: "curl -X POST -H 'Accept: application/json' -H 'Content-type: application/json' -H 'PRIVATE-TOKEN: {{ repo_api_token }}' --data-binary @/home/{{ deploy_user_name }}/ssh_key.json https://gitlab.pasteur.fr/api/v3/projects/198/keys"
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