Skip to content

Commit

Permalink
Fix Ansible error "The conditional check '_supervisor_conf_for_{{svd_…
Browse files Browse the repository at this point in the history
…program}} is changed' failed."

Indeed, one cannot template variable names in Ansible/Jinja2
conditionals.

The error happened in the `supervisord` role, which would in turn
affect all JupyterHub installations (and, of course, role which depend
on it).
  • Loading branch information
riccardomurri committed Aug 26, 2019
1 parent d4dbf14 commit 93777f9
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
dest: '{{ supervisor_conf_dir }}/{{ svd_program }}{{ supervisor_conf_suffix }}'
content: '{{ svd_config }}'
mode: 0444
register: '_supervisor_conf_for_{{ svd_program }}'
register: '_supervisor_conf_added'


- name: Ensure supervisord re-reads config
shell: |
supervisorctl reread;
supervisorctl update;
when: '_supervisor_conf_for_{{ svd_program }} is changed'
when: '_supervisor_conf_added is changed'


- name: Ensure program has been started by supervisord
Expand Down

0 comments on commit 93777f9

Please sign in to comment.