Changeset 75c62257 in darkpeak-services


Ignore:
Timestamp:
Jul 21, 2018, 2:54:32 PM (18 months ago)
Author:
Caolan McMahon <caolan.mcmahon@…>
Branches:
ansible, keycloak, master, matrix, pleroma
Children:
7381d8ca
Parents:
c318965a
git-author:
Caolan McMahon <caolan.mcmahon@…> (07/21/18 14:54:17)
git-committer:
Caolan McMahon <caolan.mcmahon@…> (07/21/18 14:54:32)
Message:

force apache reload if vhost config changed #7

File:
1 edited

Legend:

Unmodified
Added
Removed
  • roles/apache2/tasks/configure-apache-site.yml

    rc318965a r75c62257  
    2525    group: root
    2626    mode: 0644
    27   notify:
    28     - reload apache2
     27  register: vhost_config
    2928
    3029- name: Enable vhost
     
    3332    dest: "/etc/apache2/sites-enabled/{{ '0-default' if service_name == 'default' else service_name }}.conf"
    3433    state: link
    35   notify:
    36     - reload apache2
    3734
     35# we want to reload apache config _now_ instead of waiting for the notify
     36# task to run so we can request certificates using certbot and have the
     37# appropriate apache config in place for verification
     38- name: Reload apache now if vhost config changed
     39  service:
     40    name: apache2
     41    state: reloaded
     42  when: vhost_config | changed
     43
     44- name: Request letsencrypt certificate via certbot
     45  command:
     46    argv:
     47      - "certbot"
     48      - "certonly"
     49      - "--webroot"
     50      - "-w"
     51      - "/usr/share/certbot"
     52      - "-d"
     53      - "{{ domain }}"
     54  when:
     55    - development_mode != true
     56 
    3857# This file is supplied by the calling role, and included in the apache configuration
    3958# by the above vhost file
     
    4968    - reload apache2
    5069
    51 - name: Request letsencrypt certificate via certbot
    52   command:
    53     argv:
    54       - "certbot"
    55       - "certonly"
    56       - "--webroot"
    57       - "-w"
    58       - "/usr/share/certbot"
    59       - "-d"
    60       - "{{ domain }}"
    61   when:
    62     - development_mode != true
    63 
    64 
Note: See TracChangeset for help on using the changeset viewer.