---
# vars file for caddy-ansible
caddy_github_headers: {}

go_arch_map:
  i386: '386'
  x86_64: 'amd64'
  aarch64: 'arm64'
  armv7l: 'arm7'
  armv6l: 'arm6'

go_arch: "{{ go_arch_map[ansible_architecture] | default(ansible_architecture) }}"

caddy_bin: "{{ caddy_bin_dir }}/caddy"

caddy_url: "https://caddyserver.com/api/download?os={{ caddy_os }}&arch={{ go_arch }}\
           {% for pkg in caddy_packages %}\
           {% if loop.first %}&{% endif %}p={{ pkg | urlencode() }}{% if not loop.last %},{% endif %}\
           {% endfor %}"

caddy_use_github: "{{ caddy_packages == [] }}"
