Use include_tasks in handlers

The import_tasks lines no longer work in Ansible 2.8.  The tarballs
and logs lines were missed earlier due to in-flight changes.

Change-Id: I0fb2b6fc2260175790617d8fcddb52bc9a6f9ef5
This commit is contained in:
James E. Blair 2020-01-07 13:50:09 -08:00
parent 69f9f64ebc
commit bb0a118441

View File

@ -4,10 +4,12 @@
# listener, every host will need to provide a handler somehow.
#
# NOTE(ianw): as at 04/2019 it seems that something like
#
# listen: letsencrypt updated letsencrypt01-main-service
#
# listen: letsencrypt updated letsencrypt01-main-service
# doesn't actually register the handler.
#
# NOTE: import_tasks or include can not be used in handlers
# ("include_tasks" is okay).
# https://docs.ansible.com/ansible/latest/porting_guides/porting_guide_2.8.html#imports-as-handlers
- name: letsencrypt updated graphite01-main
include_tasks: roles/letsencrypt-create-certs/handlers/touch_file.yaml
@ -15,16 +17,16 @@
touch_file: '/tmp/letsencrypt-graphite01-main.stamp'
- name: letsencrypt updated tarballs-main
import_tasks: restart_apache.yaml
include_tasks: roles/letsencrypt-create-certs/handlers/restart_apache.yaml
- name: letsencrypt updated zuul-ci-main
import_tasks: restart_apache.yaml
include_tasks: roles/letsencrypt-create-certs/handlers/restart_apache.yaml
- name: letsencrypt updated zuulci-main
import_tasks: restart_apache.yaml
include_tasks: roles/letsencrypt-create-certs/handlers/restart_apache.yaml
- name: letsencrypt updated logs-main
import_tasks: restart_apache.yaml
include_tasks: roles/letsencrypt-create-certs/handlers/restart_apache.yaml
# Mirrors