46 lines
1.2 KiB
YAML
46 lines
1.2 KiB
YAML
---
|
|
|
|
- name: install essentials
|
|
yum: name={{ item }} state=present
|
|
with_items:
|
|
- git
|
|
- python-setuptools
|
|
- python-devel
|
|
- mysql-devel
|
|
|
|
- name: install pip
|
|
easy_install: name=pip
|
|
|
|
- name: install virtualenv
|
|
pip: name=virtualenv
|
|
|
|
- name: cloning compass-core
|
|
git: repo=http://git.openstack.org/stackforge/compass-core.git
|
|
dest={{ COMPASS_PATH }}
|
|
version=dev/experimental
|
|
|
|
- name: pip install compass into virtualenv
|
|
pip: name={{ COMPASS_PATH }} virtualenv={{ COMPASS_PATH }}/venv
|
|
|
|
- name: write compass setting file
|
|
copy: src=setting dest=/etc/compass/setting
|
|
|
|
- name: create log dir
|
|
file: path=/var/log/compass state=directory
|
|
|
|
- name: write python home into switch virtualenv
|
|
lineinfile: dest={{ COMPASS_PATH }}/bin/switch_virtualenv.py.template
|
|
regexp="^virtual\_env\ \=\ \'\$PythonHome\'"
|
|
line="virtual_env = '/opt/compass-core/venv'"
|
|
|
|
- name: rename switch_virtualenv template
|
|
command: mv {{ COMPASS_PATH }}/bin/switch_virtualenv.py.template {{ COMPASS_PATH }}/bin/switch_virtualenv.py
|
|
|
|
- name: copy client script
|
|
template: src=client.sh.j2 dest=/opt/client.sh mode=0755
|
|
|
|
- name: initiate deployment
|
|
shell: /opt/client.sh > /var/log/regtest.log
|
|
async: 360
|
|
poll: 60
|