Add start molteniron server

This commit is contained in:
Mark Hamzy 2017-02-05 08:12:13 -06:00
parent 1246726c9f
commit 7321e2f2d2
2 changed files with 38 additions and 0 deletions

View File

@ -100,3 +100,34 @@
password: openstack_citest
priv: "*.*:ALL,GRANT"
state: present
- name: grab the contents of {{ moltenirond_pid_file }}
shell: cat {{ moltenirond_pid_file }}
ignore_errors: true
register: moltenirond_pid
- debug:
var: moltenirond_pid
- name: check to see if molteniron is running
shell: test -f {{ moltenirond_pid_file }};
if [ $? -eq 0 ]; then echo RUNNING; else echo STOPPED; fi
register: moltenirond_pid_status
- debug:
var: moltenirond_pid_status
- name: start molteniron server
shell: |
. {{ molteniron_bin }}/activate
moltenirond-helper --conf-dir={{ molteniron_conf_dir }} start
when: moltenirond_pid_status.stdout == "STOPPED"
- name: run the molteniron status command
shell: |
. {{ molteniron_bin }}/activate
molteniron --conf-dir={{ molteniron_conf_dir }} --output=result status --type=human
register: molteniron_result_status
- debug:
var: molteniron_result_status

View File

@ -35,3 +35,10 @@ molteniron_developer_mode_distro_packages:
- python2.7
- python3.5
- mysql-server
moltenirond_pid_file: "/var/run/moltenirond.pid"
molteniron_source_dir: "/home/ubuntu/molteniron"
# molteniron_venv_tag instead?
molteniron_conf_dir: "/openstack/venvs/molteniron-{{ openstack_release }}/etc/molteniron"