diff --git a/roles/webgateway/tasks/main.yaml b/roles/webgateway/tasks/main.yaml index 1af6144..2b10fa4 100644 --- a/roles/webgateway/tasks/main.yaml +++ b/roles/webgateway/tasks/main.yaml @@ -98,6 +98,15 @@ group: root mode: '0644' +- name: Validate nginx configuration + command: + cmd: nginx -t + +- name: Reload nginx after configuration change + service: + name: nginx + state: reloaded + - name: "Checkout static websites from git" ansible.builtin.git: repo: "{{ item.repo }}" @@ -108,13 +117,4 @@ ansible.builtin.file: path: "{{ item.directory}}/.git" state: absent - with_items: "{{ static }}" - -- name: Validate nginx configuration - command: - cmd: nginx -t - -- name: Reload nginx after configuration change - service: - name: nginx - state: reloaded + with_items: "{{ static }}" \ No newline at end of file