beb6b8536f
- added example-bootstrap.py - moved ansible tasks to separate dir
22 lines
642 B
YAML
22 lines
642 B
YAML
---
|
|
|
|
- name: Solar Celery config
|
|
hosts: all
|
|
sudo: yes
|
|
vars:
|
|
celery_dir: /var/run/celery
|
|
tasks:
|
|
- shell: mkdir -p {{ celery_dir }}
|
|
- shell: pip install celery
|
|
- shell: hostname
|
|
register: hostname
|
|
- shell: celery multi kill 2
|
|
chdir={{ celery_dir }}
|
|
tags: [stop]
|
|
- shell: celery multi start 2 -A solar.orchestration.runner -Q:1 scheduler,system_log -Q:2 celery,{{ hostname.stdout }}
|
|
chdir={{ celery_dir }}
|
|
tags: [master]
|
|
- shell: celery multi start 1 -A solar.orchestration.runner -Q:1 {{ hostname.stdout }}
|
|
chdir={{ celery_dir }}
|
|
tags: [slave]
|