Commit ffe5a4e3 by John Jarvis

backing out the start_services flag

parent 4eac8881
...@@ -20,4 +20,4 @@ ...@@ -20,4 +20,4 @@
supervisorctl_path={{ supervisor_ctl }} supervisorctl_path={{ supervisor_ctl }}
config={{ supervisor_cfg }} config={{ supervisor_cfg }}
state=restarted state=restarted
when: start_services and certs_installed is defined when: certs_installed is defined
...@@ -58,7 +58,6 @@ ...@@ -58,7 +58,6 @@
register: supervisor_update register: supervisor_update
sudo_user: "{{ supervisor_service_user }}" sudo_user: "{{ supervisor_service_user }}"
changed_when: supervisor_update.stdout != "" changed_when: supervisor_update.stdout != ""
when: start_services
- name: ensure certs has started - name: ensure certs has started
supervisorctl_local: > supervisorctl_local: >
...@@ -67,7 +66,6 @@ ...@@ -67,7 +66,6 @@
config={{ supervisor_cfg }} config={{ supervisor_cfg }}
state=started state=started
sudo_user: "{{ supervisor_service_user }}" sudo_user: "{{ supervisor_service_user }}"
when: start_services
- name: create a symlink for venv python - name: create a symlink for venv python
file: > file: >
......
...@@ -49,6 +49,3 @@ common_git_ppa: "ppa:git-core/ppa" ...@@ -49,6 +49,3 @@ common_git_ppa: "ppa:git-core/ppa"
# Skip supervisor tasks # Skip supervisor tasks
# Useful when supervisor is not installed (local dev) # Useful when supervisor is not installed (local dev)
devstack: False devstack: False
# By default start services on ansible runs
start_services: True
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
supervisorctl_path={{ supervisor_ctl }} supervisorctl_path={{ supervisor_ctl }}
config={{ supervisor_cfg }} config={{ supervisor_cfg }}
state=restarted state=restarted
when: start_services and discern_installed is defined when: discern_installed is defined
with_items: with_items:
- discern - discern
- discern_celery - discern_celery
...@@ -103,7 +103,6 @@ ...@@ -103,7 +103,6 @@
shell: "{{ supervisor_ctl }} -c {{ supervisor_cfg }} update" shell: "{{ supervisor_ctl }} -c {{ supervisor_cfg }} update"
register: supervisor_update register: supervisor_update
sudo_user: "{{ supervisor_service_user }}" sudo_user: "{{ supervisor_service_user }}"
when: start_services
changed_when: supervisor_update.stdout != "" changed_when: supervisor_update.stdout != ""
- name: ensure discern, discern_celery has started - name: ensure discern, discern_celery has started
...@@ -112,7 +111,6 @@ ...@@ -112,7 +111,6 @@
supervisorctl_path={{ supervisor_ctl }} supervisorctl_path={{ supervisor_ctl }}
config={{ supervisor_cfg }} config={{ supervisor_cfg }}
state=started state=started
when: start_services
with_items: with_items:
- discern - discern
- discern_celery - discern_celery
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
supervisorctl_path={{ supervisor_ctl }} supervisorctl_path={{ supervisor_ctl }}
config={{ supervisor_cfg }} config={{ supervisor_cfg }}
name="edxapp:{{ item }}" name="edxapp:{{ item }}"
when: start_services and edxapp_installed is defined and celery_worker is not defined and not devstack when: edxapp_installed is defined and celery_worker is not defined and not devstack
sudo_user: "{{ supervisor_service_user }}" sudo_user: "{{ supervisor_service_user }}"
with_items: service_variants_enabled with_items: service_variants_enabled
...@@ -15,6 +15,6 @@ ...@@ -15,6 +15,6 @@
supervisorctl_path={{ supervisor_ctl }} supervisorctl_path={{ supervisor_ctl }}
config={{ supervisor_cfg }} config={{ supervisor_cfg }}
state=restarted state=restarted
when: start_services and edxapp_installed is defined and celery_worker is defined and not devstack when: edxapp_installed is defined and celery_worker is defined and not devstack
with_items: edxapp_workers with_items: edxapp_workers
sudo_user: "{{ common_web_user }}" sudo_user: "{{ common_web_user }}"
...@@ -274,7 +274,7 @@ ...@@ -274,7 +274,7 @@
register: supervisor_update register: supervisor_update
sudo_user: "{{ supervisor_service_user }}" sudo_user: "{{ supervisor_service_user }}"
changed_when: supervisor_update.stdout != "" changed_when: supervisor_update.stdout != ""
when: start_services and not devstack when: not devstack
- name: ensure edxapp has started - name: ensure edxapp has started
supervisorctl_local: > supervisorctl_local: >
...@@ -283,7 +283,7 @@ ...@@ -283,7 +283,7 @@
config={{ supervisor_cfg }} config={{ supervisor_cfg }}
name="edxapp:{{ item }}" name="edxapp:{{ item }}"
sudo_user: "{{ supervisor_service_user }}" sudo_user: "{{ supervisor_service_user }}"
when: start_services and celery_worker is not defined and not devstack when: celery_worker is not defined and not devstack
with_items: service_variants_enabled with_items: service_variants_enabled
- name: ensure edxapp_workers has started - name: ensure edxapp_workers has started
...@@ -292,7 +292,7 @@ ...@@ -292,7 +292,7 @@
supervisorctl_path={{ supervisor_ctl }} supervisorctl_path={{ supervisor_ctl }}
config={{ supervisor_cfg }} config={{ supervisor_cfg }}
state=started state=started
when: start_services and celery_worker is defined and not devstack when: celery_worker is defined and not devstack
with_items: edxapp_workers with_items: edxapp_workers
sudo_user: "{{ supervisor_service_user }}" sudo_user: "{{ supervisor_service_user }}"
......
...@@ -5,4 +5,4 @@ ...@@ -5,4 +5,4 @@
supervisorctl_path={{ supervisor_ctl }} supervisorctl_path={{ supervisor_ctl }}
config={{ supervisor_cfg }} config={{ supervisor_cfg }}
state=restarted state=restarted
when: start_services and forum_installed is defined and not devstack when: forum_installed is defined and not devstack
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
shell: "{{ supervisor_ctl }} -c {{ supervisor_cfg }} update" shell: "{{ supervisor_ctl }} -c {{ supervisor_cfg }} update"
register: supervisor_update register: supervisor_update
changed_when: supervisor_update.stdout != "" changed_when: supervisor_update.stdout != ""
when: start_services and not devstack when: not devstack
- name: ensure forum is started - name: ensure forum is started
supervisorctl_local: > supervisorctl_local: >
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
supervisorctl_path={{ supervisor_ctl }} supervisorctl_path={{ supervisor_ctl }}
config={{ supervisor_cfg }} config={{ supervisor_cfg }}
state=started state=started
when: start_services and not devstack when: not devstack
- include: test.yml tags=deploy - include: test.yml tags=deploy
when: start_services when: start_services
......
...@@ -112,8 +112,3 @@ ...@@ -112,8 +112,3 @@
# any reason, this will ensure that it is started up again. # any reason, this will ensure that it is started up again.
- name: make sure nginx has started - name: make sure nginx has started
service: name=nginx state=started service: name=nginx state=started
when: start_services
- name: make sure nginx has stopped
service: name=nginx state=stopped
when: not start_services
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
supervisorctl_path={{ supervisor_ctl }} supervisorctl_path={{ supervisor_ctl }}
config={{ supervisor_cfg }} config={{ supervisor_cfg }}
state=restarted state=restarted
when: start_services and ora_installed is defined and not devstack when: ora_installed is defined and not devstack
- name: restart ora_celery - name: restart ora_celery
supervisorctl_local: > supervisorctl_local: >
...@@ -13,4 +13,4 @@ ...@@ -13,4 +13,4 @@
supervisorctl_path={{ supervisor_ctl }} supervisorctl_path={{ supervisor_ctl }}
config={{ supervisor_cfg }} config={{ supervisor_cfg }}
state=restarted state=restarted
when: start_services and ora_installed is defined and not devstack when: ora_installed is defined and not devstack
...@@ -86,7 +86,7 @@ ...@@ -86,7 +86,7 @@
- name: update supervisor configuration - name: update supervisor configuration
shell: "{{ supervisor_ctl }} -c {{ supervisor_cfg }} update" shell: "{{ supervisor_ctl }} -c {{ supervisor_cfg }} update"
register: supervisor_update register: supervisor_update
when: start_services and not devstack when: not devstack
changed_when: supervisor_update.stdout != "" changed_when: supervisor_update.stdout != ""
- name: ensure ora is started - name: ensure ora is started
...@@ -95,7 +95,7 @@ ...@@ -95,7 +95,7 @@
supervisorctl_path={{ supervisor_ctl }} supervisorctl_path={{ supervisor_ctl }}
config={{ supervisor_cfg }} config={{ supervisor_cfg }}
state=started state=started
when: start_services and not devstack when: not devstack
- name: ensure ora_celery is started - name: ensure ora_celery is started
supervisorctl_local: > supervisorctl_local: >
...@@ -103,6 +103,6 @@ ...@@ -103,6 +103,6 @@
supervisorctl_path={{ supervisor_ctl }} supervisorctl_path={{ supervisor_ctl }}
config={{ supervisor_cfg }} config={{ supervisor_cfg }}
state=started state=started
when: start_services and not devstack when: not devstack
- set_fact: ora_installed=true - set_fact: ora_installed=true
...@@ -106,4 +106,3 @@ ...@@ -106,4 +106,3 @@
- name: stop rabbit nodes - name: stop rabbit nodes
service: name=rabbitmq-server state=restarted service: name=rabbitmq-server state=restarted
when: not start_services
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
supervisorctl_path={{ supervisor_ctl }} supervisorctl_path={{ supervisor_ctl }}
config={{ supervisor_cfg }} config={{ supervisor_cfg }}
state=restarted state=restarted
when: start_services and xqueue_installed is defined when: xqueue_installed is defined
with_items: with_items:
- xqueue - xqueue
- xqueue_consumer - xqueue_consumer
...@@ -63,7 +63,6 @@ ...@@ -63,7 +63,6 @@
shell: "{{ supervisor_ctl }} -c {{ supervisor_cfg }} update" shell: "{{ supervisor_ctl }} -c {{ supervisor_cfg }} update"
register: supervisor_update register: supervisor_update
changed_when: supervisor_update.stdout != "" changed_when: supervisor_update.stdout != ""
when: start_services
- name: ensure xqueue, consumer is running - name: ensure xqueue, consumer is running
supervisorctl_local: > supervisorctl_local: >
...@@ -71,7 +70,6 @@ ...@@ -71,7 +70,6 @@
supervisorctl_path={{ supervisor_ctl }} supervisorctl_path={{ supervisor_ctl }}
config={{ supervisor_cfg }} config={{ supervisor_cfg }}
state=started state=started
when: start_services
with_items: with_items:
- xqueue - xqueue
- xqueue_consumer - xqueue_consumer
......
...@@ -54,7 +54,6 @@ ...@@ -54,7 +54,6 @@
- name: update supervisor configuration - name: update supervisor configuration
shell: "{{ supervisor_ctl }} -c {{ supervisor_cfg }} update" shell: "{{ supervisor_ctl }} -c {{ supervisor_cfg }} update"
register: supervisor_update register: supervisor_update
when: start_services
changed_when: supervisor_update.stdout != "" changed_when: supervisor_update.stdout != ""
- name: ensure xserver is started - name: ensure xserver is started
...@@ -63,7 +62,6 @@ ...@@ -63,7 +62,6 @@
supervisorctl_path={{ supervisor_ctl }} supervisorctl_path={{ supervisor_ctl }}
config={{ supervisor_cfg }} config={{ supervisor_cfg }}
state=started state=started
when: start_services
- name: create a symlink for venv python - name: create a symlink for venv python
file: > file: >
......
...@@ -92,7 +92,6 @@ cd playbooks/edx-east ...@@ -92,7 +92,6 @@ cd playbooks/edx-east
cat << EOF > $extra_vars cat << EOF > $extra_vars
--- ---
start_services: $start_services
ansible_ssh_private_key_file: /var/lib/jenkins/${keypair}.pem ansible_ssh_private_key_file: /var/lib/jenkins/${keypair}.pem
NGINX_ENABLE_SSL: True NGINX_ENABLE_SSL: True
NGINX_SSL_CERTIFICATE: '/var/lib/jenkins/star.sandbox.edx.org.crt' NGINX_SSL_CERTIFICATE: '/var/lib/jenkins/star.sandbox.edx.org.crt'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment