Zack Williams | b313bae | 2020-04-22 22:00:53 -0700 | [diff] [blame^] | 1 | --- |
| 2 | # nginx handlers/main.yml |
| 3 | # |
| 4 | # SPDX-FileCopyrightText: © 2020 Open Networking Foundation <support@opennetworking.org> |
| 5 | # SPDX-License-Identifier: Apache-2.0 |
| 6 | |
| 7 | - name: test-nginx-config |
| 8 | # test that the entire set of config files are correct |
| 9 | # |
| 10 | # NOTE: handlers are run in the order they are listed in this file, so it's |
| 11 | # listed first before starting/reloading/restarting the daemon |
| 12 | command: |
| 13 | cmd: "nginx -t -c {{ nginx_conf_dir }}/nginx.conf" |
| 14 | |
| 15 | - name: start-nginx |
| 16 | service: |
| 17 | name: "{{ nginx_service }}" |
| 18 | state: started |
| 19 | |
| 20 | - name: reload-nginx |
| 21 | service: |
| 22 | name: "{{ nginx_service }}" |
| 23 | state: reloaded |
| 24 | |
| 25 | - name: restart-nginx |
| 26 | service: |
| 27 | name: "{{ nginx_service }}" |
| 28 | state: restarted |