You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 11, 2019. It is now read-only.
Testing #239 I noticed that successive runs of the apache and nginx basic and role examples where you are switching the web server port will fail at the smoke test because the restart handler hasn't executed yet for the web server to have switched ports.
One approach would be to restructure the examples. In the "basic playbook" examples you'd do the smoke test in a secondary play in the playbook. In the roles examples you could breakout the smoke test into its own file and use include_role: task_from: tasks.yml in a secondary play in the playbook. It is part of the extra credit assignments in the hands on workshops but is this getting too complicated too soon though?
A more direct approach is to use a meta: flush_handlers before the smoke test should handle that BUT we need to make sure to give hints and links in the docs to introduce students to that function throughout.
- name: Forcing any notified handlers to run now
meta: flush_handlers
Testing #239 I noticed that successive runs of the apache and nginx basic and role examples where you are switching the web server port will fail at the smoke test because the restart handler hasn't executed yet for the web server to have switched ports.
One approach would be to restructure the examples. In the "basic playbook" examples you'd do the smoke test in a secondary play in the playbook. In the roles examples you could breakout the smoke test into its own file and use
include_role: task_from: tasks.yml
in a secondary play in the playbook. It is part of the extra credit assignments in the hands on workshops but is this getting too complicated too soon though?A more direct approach is to use a
meta: flush_handlers
before the smoke test should handle that BUT we need to make sure to give hints and links in the docs to introduce students to that function throughout.http://docs.ansible.com/ansible/latest/meta_module.html
The text was updated successfully, but these errors were encountered: