Skip to content

Commit

Permalink
Attempting to add supervisor_running to ansible variables, to prevent…
Browse files Browse the repository at this point in the history
… supervisor from being configured during travis runs.
  • Loading branch information
jonpugh committed Jan 30, 2016
1 parent 7cd8626 commit 27147c0
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,12 @@ if [ -n "$MAKEFILE_PATH" ]; then
ANSIBLE_EXTRA_VARS="$ANSIBLE_EXTRA_VARS devshop_makefile=$MAKEFILE_PATH"
fi

# If testing in travis, disable supervisor.
if [ "$TRAVIS" == "true" ]; then
ANSIBLE_EXTRA_VARS="$ANSIBLE_EXTRA_VARS supervisor_running=false"
fi


ansible-playbook -i inventory playbook.yml --connection=local --extra-vars "$ANSIBLE_EXTRA_VARS"

# Run Composer install to enable devshop cli
Expand Down
3 changes: 3 additions & 0 deletions playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,7 @@
creates: /var/aegir/.drush/hostmaster.alias.drushrc.php

- name: Supervisor | Set up queue runner script
when: supervisor_running == true
template:
src=templates/hosting-queue-runner.j2
dest=/usr/bin/hosting-queue-runner
Expand All @@ -251,6 +252,7 @@
group=aegir

- name: Supervisor | Set up supervisor job
when: supervisor_running == true
template:
src=templates/supervisor-hosting-queue-runner.conf.j2
dest={{ supervisor_hosting_queued_conf_path }}
Expand All @@ -259,6 +261,7 @@
- restart supervisor

- name: Service | Ensure Supervisor is restarted
when: supervisor_running == true
service:
name={{ supervisor_daemon }}
state=restarted
Expand Down
1 change: 1 addition & 0 deletions tests/docker-launch-devshop.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ SCRIPT_OPTS='--server-webserver=nginx'
CONTAINER_HOSTNAME=devshop.docker
SUPERVISOR_STOP='service supervisor stop'
HOST_PORT=8000
TRAVIS=true

composer install

Expand Down
2 changes: 2 additions & 0 deletions vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,5 @@ aegir_user_uid: 12345

drush_path: "{{ local_bin_path }}/drush"
devshop_cli_path: "{{ local_bin_path }}/devshop"

supervisor_running: true

0 comments on commit 27147c0

Please sign in to comment.