Merge branch 'master' of /git/ansible

This commit is contained in:
Peter Robinson 2016-04-01 17:48:32 +00:00
commit fe9537a4e7
2 changed files with 58 additions and 3 deletions

View file

@ -949,7 +949,7 @@ pdc-backend01.stg.phx2.fedoraproject.org
[transient-cloud]
# fedora-hubs-dev
209.132.184.97
209.132.184.98
[persistent-cloud]
# artboard instance

View file

@ -1,5 +1,5 @@
- name: provision instance
hosts: 209.132.184.97 # this is transient.. so may change if we destroy it.
hosts: 209.132.184.98 # this is transient.. so may change if we destroy it.
user: root
gather_facts: True
@ -12,8 +12,63 @@
- include: "{{ tasks }}/yumrepos.yml"
- yum: name={{item}} state=present
with_items:
- htop
- tmux
- vim
- git
- redis
- python-virtualenv
- python-pip
- gcc
- gcc-c++
- sqlite-devel
- libffi-devel
- openssl-devel
- python-datanommer-consumer
- datanommer-commands
- fedmsg-hub
- python-psycopg2
- postgresql-devel
- postgresql-server
- file: dest=/srv/git state=directory
- git: repo=https://pagure.io/fedora-hubs.git
dest=/srv/git/fedora-hubs
version=develop
- name: link in a number of files we want
file: src={{item.src}} dest={{item.dest}} state=link
with_items:
- src: /srv/git/fedora-hubs/fedmsg.d/testconfig.py
dest: /etc/fedmsg.d/testconfig.py
- src: /srv/git/fedora-hubs/fedmsg.d/base.py
dest: /etc/fedmsg.d/base.py
- src: /srv/git/fedora-hubs/fedmsg.d/logging.py
dest: /etc/fedmsg.d/logging.py
- src: /srv/git/fedora-hubs/systemd/hubs-worker@.service
dest: /usr/lib/systemd/system/hubs-worker@.service
- src: /srv/git/fedora-hubs/systemd/hubs-triage@.service
dest: /usr/lib/systemd/system/hubs-triage@.service
- src: /srv/git/fedora-hubs/systemd/hubs-webapp.service
dest: /usr/lib/systemd/system/hubs-webapp.service
- command: pip install -r requirements.txt
chdir=/srv/git/fedora-hubs
creates=/usr/lib/python2.7/site-packages/fedmsg/
# The one in epel7 is too old... :(
- command: pip install --upgrade pygments
- command: pip install futures
creates=/usr/lib/python2.7/site-packages/concurrent/futures/
- command: python setup.py develop
chdir=/srv/git/fedora-hubs
creates=/usr/lib/python2.7/site-packages/fedora-hubs.egg-link
- command: systemctl daemon-reload
- service: name={{item}} state=running enabled=yes
with_items:
- redis
- hubs-webapp
- hubs-worker1
- hubs-triage1
# Set up the db for datanommer
- command: postgresql-setup initdb creates=/var/lib/pgsql/data/pg_hba.conf