Lets just use the .changed

Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
This commit is contained in:
Patrick Uiterwijk 2017-10-09 00:30:32 +00:00
parent 53f762b281
commit ed6687d319

View file

@ -163,6 +163,7 @@
copy: src="{{pubkeydir}}/{{inventory_hostname}}{{item}}-cert.pub"
dest="{{item}}-cert.pub"
with_items: "{{certs_to_sign}}"
register: certcopy
notify:
- restart sshd
tags:
@ -185,7 +186,7 @@
- name: Restart sshd in case we just signed a new certificate so it gets applied
service: name=sshd state=restarted
when: "certs_to_sign != []"
when: certcopy.changed
tags:
- basessh
- sshd_cert