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.16.1).
You might already have this collection installed if you are using the ansible
package.
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
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 |
---|---|
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 |
---|---|
A list of PEM file contents. Returned: success |