8000 Filter Nginx includes by sites present on target server by dalepgrant · Pull Request #1573 · roots/trellis · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Filter Nginx includes by sites present on target server #1573

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions roles/wordpress-setup/tasks/nginx-includes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,20 @@
register: nginx_includes_local_directory

- block:
- name: Build list of Nginx includes templates
- name: Loop through site keys to build a list of Nginx includes templates per folder
find:
paths: "{{ nginx_includes_templates_path }}"
pattern: "*.conf.j2"
paths: "{{ nginx_includes_templates_path }}/{{ item }}"
patterns: "*.conf.j2"
recurse: yes
loop: "{{ wordpress_sites.keys() | list + ['all'] }}"
become: no
delegate_to: localhost
register: nginx_includes_templates
register: nginx_includes_folder_results

- name: Flatten include template files into one list
set_fact:
nginx_includes_templates:
files: "{{ nginx_includes_folder_results.results | map(attribute='files') | flatten }}"

- name: Create includes.d directories
file:
Expand Down
0