Fix playbooks after recent changes:
- create dir if it doesn't exist - set env for new config paths. Defaults from config.py were removed Change-Id: I580def8813595ffe18160f44894acf458f0d655a
This commit is contained in:
parent
08f2801ea6
commit
d9e17b4468
2
.gitignore
vendored
2
.gitignore
vendored
@ -53,3 +53,5 @@ solar/.cache
|
||||
.config.override
|
||||
|
||||
.testrepository/
|
||||
|
||||
.solar_config_override
|
||||
|
@ -7,7 +7,7 @@ ADD resources /resources
|
||||
ADD templates /templates
|
||||
ADD run.sh /run.sh
|
||||
|
||||
RUN apt-get upgrade && apt-get update
|
||||
RUN apt-get update && apt-get upgrade -y
|
||||
RUN apt-get install -y python python-dev python-distribute python-pip openssh-client rsync libyaml-dev vim libffi-dev libssl-dev git
|
||||
RUN pip install ansible
|
||||
|
||||
|
@ -5,6 +5,8 @@
|
||||
sudo: yes
|
||||
vars:
|
||||
celery_dir: /var/run/celery
|
||||
environment:
|
||||
SOLAR_CONFIG_OVERRIDE: /.solar_config_override
|
||||
tasks:
|
||||
- shell: mkdir -p {{ celery_dir }}
|
||||
tags: [install]
|
||||
|
@ -19,11 +19,25 @@
|
||||
dest: /home/vagrant/.bashrc
|
||||
line: export SOLAR_CONFIG="/vagrant/.config"
|
||||
state: present
|
||||
|
||||
# create custom config file /vagrant/.solar_config_override for vagrant env
|
||||
- file: path=/.solar_config_override state=touch mode=0644
|
||||
- lineinfile:
|
||||
dest: /.solar_config_override
|
||||
line: "solar_db: riak://10.0.0.2:8087"
|
||||
state: present
|
||||
create: yes
|
||||
- lineinfile:
|
||||
dest: /.solar_config_override
|
||||
line: "redis: redis://10.0.0.2:6379/1"
|
||||
state: present
|
||||
create: yes
|
||||
|
||||
# make riak default on vagrant env
|
||||
# unset
|
||||
- lineinfile:
|
||||
dest: /home/vagrant/.bashrc
|
||||
line: export SOLAR_CONFIG_OVERRIDE="/home/vagrant/.solar_config_override"
|
||||
line: export SOLAR_CONFIG_OVERRIDE="/.solar_config_override"
|
||||
state: present
|
||||
- lineinfile:
|
||||
dest: /home/vagrant/.bashrc
|
||||
@ -34,19 +48,6 @@
|
||||
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
|
||||
|
@ -1,3 +1,4 @@
|
||||
---
|
||||
|
||||
- file: path=/root/.ssh state=directory mode=0700
|
||||
- template: src=files/ssh_conf dest=/root/.ssh/config
|
||||
|
@ -10,11 +10,8 @@ solar-celery:
|
||||
- /vagrant/library:/vagrant/library
|
||||
- ~/.ssh:/root/.ssh
|
||||
- ./bootstrap/playbooks/celery.yaml:/celery.yaml
|
||||
environment:
|
||||
- REDIS_HOST=redis
|
||||
- REDIS_PORT=6379
|
||||
- RIAK_HOST=riak
|
||||
- RIAK_PORT=8087
|
||||
- /var/lib/solar/repositories:/var/lib/solar/repositories
|
||||
- /.solar_config_override:/.solar_config_override
|
||||
# links are not used for configuration because we can rely on non-container
|
||||
# based datastores
|
||||
links:
|
||||
|
Loading…
Reference in New Issue
Block a user