solar/bootstrap/playbooks/solar.yaml

55 lines
1.6 KiB
YAML

---
- hosts: all
sudo: yes
vars:
ssh_ip_mask: "10.0.0.*"
tasks:
# upgrade pbr first, old version throws strange errors
- shell: pip install pbr -U
# Setup development env for solar
- shell: pip install -e . chdir=/vagrant
- shell: pip install git+git://github.com/Mirantis/solar-agent.git
- include: tasks/ssh_conf.yaml
- hosts: all
tasks:
# set default config location
- lineinfile:
dest: /home/vagrant/.bashrc
line: export SOLAR_CONFIG="/vagrant/.config"
state: present
# make riak default on vagrant env
# unset
- lineinfile:
dest: /home/vagrant/.bashrc
line: export SOLAR_CONFIG_OVERRIDE="/home/vagrant/.solar_config_override"
state: present
- lineinfile:
dest: /home/vagrant/.bashrc
line: eval "$(_SOLAR_COMPLETE=source solar)"
state: present
- lineinfile:
dest: /home/vagrant/.bashrc
line: export PYTHONWARNINGS="ignore"
state: present
- hosts: all
tasks:
- lineinfile:
dest: /home/vagrant/.solar_config_override
line: "solar_db: riak://10.0.0.2:8087"
state: present
create: yes
- lineinfile:
dest: /home/vagrant/.solar_config_override
line: "redis: redis://10.0.0.2:6379/1"
state: present
create: yes
- hosts: all
tasks:
- file: path=/var/lib/solar/repositories state=directory
- file: src=/vagrant/resources dest=/var/lib/solar/repositories/resources state=link
- file: src=/vagrant/templates dest=/var/lib/solar/repositories/templates state=link