Add sites-available support

We can use this to sync nginx configuration to hosts.

Change-Id: Ib7894547392220da72c37c2be407fd235c6df72f
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
Paul Belanger 2019-03-30 23:32:11 -04:00
parent 65afd10447
commit f2e9101744
2 changed files with 13 additions and 0 deletions

View File

@ -27,6 +27,9 @@ nginx_file_include_dir_src: ""
nginx_file_nginx_conf_dest: /etc/nginx/nginx.conf
nginx_file_nginx_conf_src: ""
nginx_file_sites_available_dest: /etc/nginx/sites-available
nginx_file_sites_available_src:
nginx_package_name: nginx
nginx_service_nginx_daemon_reload: true

View File

@ -32,3 +32,13 @@
when: nginx_file_include_dir_src
notify:
- Restart nginx
- name: Install sites-available files
become: true
synchronize:
delete: true
dest: "{{ nginx_file_sites_available_dest }}"
perms: true
recursive: true
src: "{{ nginx_file_sites_available_src }}"
when: nginx_file_sites_available_src | length > 0