aboutsummaryrefslogtreecommitdiffstats
path: root/roles/apache_vhost/tasks/main.yml
blob: 29d08ab530400b75b4a477022ea5589b842c1104 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
- name: request https certificate
  include_role:
    name: '{{ "certbot" if apache_letsencrypt else "getcert_request" }}'
  vars:
    certificate_sans: '{{ [apache_server_name] + apache_server_aliases }}'
    certificate_path: '{{ apache_certificate_path }}'
    certificate_key_path: '{{ apache_certificate_key_path }}'
    certificate_use_apache: yes
    certificate_hook: systemctl reload httpd
  when: apache_use_ssl

- name: generate vhost configuration
  template:
    src: etc/httpd/conf.d/vhost.conf.j2
    dest: /etc/httpd/conf.d/vhost-{{ '000-default' if apache_default_vhost else apache_config_name }}.conf
    mode: 0640
    lstrip_blocks: yes
  notify: reload apache