store local ca certificate hash in variable

This commit is contained in:
Timo Makinen 2019-05-24 12:48:39 +03:00
parent 52c23c914f
commit f1caad541e

View file

@ -13,6 +13,14 @@
owner: root
group: "{{ ansible_wheel }}"
- name: get ca certificate hash
command: "openssl x509 -in /srv/ca/certs/ca.crt -noout -hash"
delegate_to: localhost
register: result
- name: store ca certificate hash
set_fact:
pki_cacert_hash: "{{ result.stdout }}"
- name: copy host certificate
copy:
src: "/srv/ca/certs/{{ inventory_hostname }}.crt"