- name: CA and certs | Check if ssl gen dir exist file: name: "{{ cacert_ssl_gen_path }}" state: directory when: - inventory_hostname in groups[cacert_ca_group] - name: CA and certs | Include CA include_tasks: ca.yaml - name: CA and certs | Include CN certs include_tasks: cn_certs.yaml loop: "{{ cacert_cn_certs }}" when: - cacert_cn_certs is defined - name: CA and certs | Include group certs include_tasks: group_certs.yaml loop: "{{ cacert_group_certs }}" when: - cacert_group_certs is defined