+ + +
+ +
+

community.crypto.split_pem filter – Split PEM file contents into multiple objects

+
+

Note

+

This filter plugin is part of the community.crypto collection (version 2.10.0).

+

To install it, use: ansible-galaxy collection install community.crypto.

+

To use it in a playbook, specify: community.crypto.split_pem.

+
+

New in community.crypto 2.10.0

+ +
+

Synopsis

+
    +
  • Split PEM file contents into multiple PEM objects. Comments or invalid parts are ignored.

  • +
+
+
+

Input

+

This describes the input of the filter, the value before | community.crypto.split_pem.

+ + + + + + + + + + + +

Parameter

Comments

+

Input

+

string / required

+

The PEM contents to split.

+
+
+
+

Examples

+
- name: Print all CA certificates
+  ansible.builtin.debug:
+    msg: '{{ item }}'
+  loop: >-
+    {{ lookup('ansible.builtin.file', '/path/to/ca-bundle.pem') | community.crypto.split_pem }}
+
+
+
+
+

Return Value

+ + + + + + + + + + + +

Key

Description

+

Return value

+

list / elements=string

+

A list of PEM file contents.

+

Returned: success

+
+
+

Authors

+
    +
  • Felix Fontein (@felixfontein)

  • +
+
+

Hint

+

Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up.

+
+
+ +
+
+ + +
+