ansible/roles/redirect/tasks/main.yml

17 lines
411 B
YAML
Raw Normal View History

#!/usr/bin/ansible-playbook
# vim:ft=ansible:
---
- name: Set up redirect
block:
2020-02-20 05:27:03 -06:00
- name: Copy over redirect config
template:
src: apache2-redirect.conf
dest: "/etc/apache2/sites-enabled/{{ redirect_from }}.conf"
notify: restart apache
2020-02-20 05:27:03 -06:00
- name: Generate certificate
include_role:
name: https
vars:
website_url: "{{ redirect_from }}"
become: yes