.. _pem_read_module: pem_read -- Reads a PEM file (that can list many certs) ======================================================= .. contents:: :local: :depth: 1 Synopsis -------- Reads a PEM file (that can list many certs) OU or CN regexes can be provided to filter out the list Parameters ---------- path (True, str, None) The path to the certificate file to be read ou_filter (False, str, None) Regex that, if given, used to filter the list of certs by OU. cn_filter (False, str, None) Regex that, if given, used to filter the list of certs by CN. Examples -------- .. code-block:: yaml+jinja - name: Get pem certs from crt file cifmw.general.pem_read: path: "/etc/ssl/certs/ca-certificates.crt" register: _certs - name: Get pem certs from crt file by OU cifmw.general.pem_read: path: "/etc/ssl/certs/ca-certificates.crt" ou_filter: "Red Hat" register: _certs2 Return Values ------------- certs (returned request, list, ) The list of PEM files Status ------ Authors ~~~~~~~ - Pablo Rodriguez (@pablintino)