diff options
author | Thedro Neely <thedroneely@gmail.com> | 2019-12-30 02:51:16 -0500 |
---|---|---|
committer | Thedro Neely <thedroneely@gmail.com> | 2019-12-30 02:51:16 -0500 |
commit | fd8228df2edc46ef3bb507f6346535d3aa8937e8 (patch) | |
tree | 0a032b094761c5edb2da069fbdbef80d093c1c1a /roles/isso/main.yml | |
parent | a53c4aec720e4e9b098662c94602e96f0db8aa98 (diff) | |
download | playbooks-fd8228df2edc46ef3bb507f6346535d3aa8937e8.tar.gz playbooks-fd8228df2edc46ef3bb507f6346535d3aa8937e8.tar.bz2 playbooks-fd8228df2edc46ef3bb507f6346535d3aa8937e8.zip |
roles/isso/main.yml: Wait for services to become active before restarting
Diffstat (limited to 'roles/isso/main.yml')
-rw-r--r-- | roles/isso/main.yml | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/roles/isso/main.yml b/roles/isso/main.yml index 19cefe3..b31a4b3 100644 --- a/roles/isso/main.yml +++ b/roles/isso/main.yml @@ -23,7 +23,7 @@ state: present update_cache: yes name: - - sudo + - sudo - git - gcc - python3-dev @@ -40,19 +40,19 @@ version: "{{ version }}" - name: Setting up python virtual environment shell: python3 -m venv . - args: + args: chdir: "{{ deploy_path }}" creates: bin/activate - name: Setting up build environment shell: | . bin/activate python setup.py develop - args: + args: chdir: "{{ deploy_path }}" creates: isso.egg-info - name: Installing JavaScript dependencies shell: npm install bower requirejs jade - args: + args: chdir: "{{ deploy_path }}" creates: node_modules/.bin - name: Building JavaScript assets @@ -60,7 +60,7 @@ PATH=$PATH:"{{ deploy_path }}"/node_modules/.bin make init make js - args: + args: chdir: "{{ deploy_path }}" creates: isso/js/embed.min.js - name: Copying config file @@ -77,11 +77,14 @@ dest: /etc/supervisord.conf mode: '0644' register: supervisorConfig - - name: Ensuring supervisord has been started + - name: Ensuring supervisord has been started and enabled service: name: supervisord state: started enabled: yes + - name: Waiting for supervisor to become active + wait_for: + port: 9100 - name: Restarting supervisord due to config change service: name: supervisord @@ -91,7 +94,10 @@ supervisorctl: name: isso state: started - - name: Restarting isso due to config change + - name: Waiting for application to become active + wait_for: + port: 8100 + - name: Restarting application due to config change supervisorctl: name: isso state: restarted |