<!DOCTYPE html><html><head><title></title><style type="text/css">
p.MsoNormal,p.MsoNoSpacing{margin:0}</style></head><body><div>## Step 6 of ?: set up nginx<br></div><div><br></div><div>For the nginx config, let's leverage the handlers so that we'll only<br></div><div>reload nginx if we change the config.<br></div><div><br></div><div>```<br></div><div># in roles/onboard/handlers/main.yml<br></div><div>- name: restart nginx<br></div><div>  service: name=nginx state=restarted<br></div><div>  become: yes<br></div><div>```<br></div><div><br></div><div>and the task file then becomes:<br></div><div><br></div><div>```<br></div><div># in roles/onboard/tasks/setup_nginx.yml<br></div><div><br></div><div>- name: copy config<br></div><div>  copy:<br></div><div>    src: ../files/nginx.conf<br></div><div>    dest: /etc/nginx/sites-enabled/{{sitename}}-nginx.conf<br></div><div>  notify: restart nginx<br></div><div>```<br></div><div><br></div><div><br></div><div><br></div><div>More to come,<br></div><div>`/anick`<br></div><div><br></div></body></html>