Lets just use the .changed
Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
This commit is contained in:
parent
53f762b281
commit
ed6687d319
1 changed files with 2 additions and 1 deletions
|
@ -163,6 +163,7 @@
|
||||||
copy: src="{{pubkeydir}}/{{inventory_hostname}}{{item}}-cert.pub"
|
copy: src="{{pubkeydir}}/{{inventory_hostname}}{{item}}-cert.pub"
|
||||||
dest="{{item}}-cert.pub"
|
dest="{{item}}-cert.pub"
|
||||||
with_items: "{{certs_to_sign}}"
|
with_items: "{{certs_to_sign}}"
|
||||||
|
register: certcopy
|
||||||
notify:
|
notify:
|
||||||
- restart sshd
|
- restart sshd
|
||||||
tags:
|
tags:
|
||||||
|
@ -185,7 +186,7 @@
|
||||||
|
|
||||||
- name: Restart sshd in case we just signed a new certificate so it gets applied
|
- name: Restart sshd in case we just signed a new certificate so it gets applied
|
||||||
service: name=sshd state=restarted
|
service: name=sshd state=restarted
|
||||||
when: "certs_to_sign != []"
|
when: certcopy.changed
|
||||||
tags:
|
tags:
|
||||||
- basessh
|
- basessh
|
||||||
- sshd_cert
|
- sshd_cert
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue