123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130 |
- ---
- - name: install apt packages
- apt:
- pkg: "{{ item }}"
- update_cache: yes
- state: installed
- with_items:
- - python
- - python-pip
- - python-dev
- - uwsgi
- - uwsgi-plugin-python
- - libffi-dev
- notify:
- - restart carbon-cache
-
- - name: install django
- pip:
- name: django
- version: 1.8.11
- state: present
- notify:
- - restart uwsgi
- - name: install requirements for graphite-web
- pip:
- name: "{{ item }}"
- state: present
- with_items:
- - python-memcached
- - txAMQP
- - simplejson
- - django-tagging
- - gunicorn
- - pytz
- - sphinx
- - sphinx_rtd_theme
- - cairocffi
- - whitenoise
- notify:
- - restart uwsgi
- - name: install zope.interface
- pip:
- name: zope.interface
- version: 3.6.0
- state: present
- notify:
- - restart carbon-cache
- - name: install whisper
- pip:
- name: whisper
- version: 0.9.15
- state: present
- extra_args: '--install-option="--prefix=/var/lib/graphite" --install-option="--install-lib=/var/lib/graphite/lib" '
- notify:
- - restart carbon-cache
-
- - name: install carbon
- pip:
- name: carbon
- version: 0.9.15
- state: present
- extra_args: '--install-option="--prefix=/var/lib/graphite" --install-option="--install-lib=/var/lib/graphite/lib" '
- notify:
- - restart carbon-cache
- - name: install graphite-web
- pip:
- name: graphite-web
- version: 0.9.15
- state: present
- extra_args: '--install-option="--prefix=/var/lib/graphite" --install-option="--install-lib=/var/lib/graphite/lib" '
- notify:
- - restart carbon-cache
- - name: create log directory
- file: path=/var/log/carbon state=directory mode=0755 owner=www-data
- - name: create log directory
- file: path=/var/log/graphite state=directory mode=0755 owner=www-data
- - name: create storage directory
- file: path=/var/lib/graphite/storage state=directory mode=0755 owner=www-data
- - name: create run directory
- file: path=/var/run/carbon-cache state=directory mode=0755
- - name: copy file carbon.conf
- copy: src=carbon.conf dest=/var/lib/graphite/conf/
- notify:
- - restart carbon-cache
- - name: copy file storage-schemas.conf
- copy: src=storage-schemas.conf dest=/var/lib/graphite/conf/
- notify:
- - restart carbon-cache
- - name: copy file graphite.ini
- copy: src=graphite.ini dest=/etc/uwsgi/apps-enabled/
- notify:
- - restart uwsgi
- - name: copy file graphite.wsgi
- copy: src=graphite.wsgi dest=/var/lib/graphite/conf/
- notify:
- - restart carbon-cache
- - name: copy file local_settings.py
- copy: src=local_settings.py dest=/var/lib/graphite/lib/graphite/
- notify:
- - restart carbon-cache
- - name: copy file carbon-cache.service
- copy: src=carbon-cache.service dest=/lib/systemd/system/
- notify:
- - reload systemd
- - restart carbon-cache
- - name: enable carbon-cache
- service: name=carbon-cache enabled=yes
- notify:
- - restart carbon-cache
- - name: enable uwsgi
- service: name=uwsgi enabled=yes
- notify:
- - restart uwsgi
|