# Expected vars
# - website...
# - localpath..
# - remotepath..
# - proxyurl
# - rewrite
# - keephost
# - proxyopts

---
- name: Copy in ProxyPassReverse for {{destname}} ({{website}}{{remotepath}})
  ansible.builtin.template: >
    src={{item}}
    dest=/etc/httpd/conf.d/{{website}}/{{destname}}.conf
    owner=root
    group=root
    mode=0644
  with_first_found:
  - "{{  roles_path  }}/httpd/reverseproxy/templates/reversepassproxy.{{destname}}.conf"
  - "{{  roles_path  }}/httpd/reverseproxy/templates/reversepassproxy.conf"
  notify:
  - Reload proxyhttpd
  tags:
  - httpd
  - httpd/reverseproxy
  - httpd/reversepassproxy
