cert-formula icon indicating copy to clipboard operation
cert-formula copied to clipboard

Deploy certificates.

.. _readme:

cert-formula

|img_travis| |img_sr|

.. |img_travis| image:: https://travis-ci.com/saltstack-formulas/cert-formula.svg?branch=master :alt: Travis CI Build Status :scale: 100% :target: https://travis-ci.com/saltstack-formulas/cert-formula .. |img_sr| image:: https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg :alt: Semantic Release :scale: 100% :target: https://github.com/semantic-release/semantic-release

A SaltStack formula to deploy certificates.

.. contents:: Table of Contents

General notes

See the full SaltStack Formulas installation and usage instructions <https://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html>_.

If you are interested in writing or contributing to formulas, please pay attention to the Writing Formula Section <https://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html#writing-formulas>_.

If you want to use this formula, please pay attention to the FORMULA file and/or git tag, which contains the currently released version. This formula is versioned according to Semantic Versioning <http://semver.org/>_.

See Formula Versioning Section <https://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html#versioning>_ for more details.

If you need (non-default) configuration, please refer to:

  • how to configure the formula with map.jinja <map.jinja.rst>_
  • the pillar.example file

Contributing to this repo

Commit message formatting is significant!!

Please see How to contribute <https://github.com/saltstack-formulas/.github/blob/master/CONTRIBUTING.rst>_ for more details.

Available states

.. contents:: :local:

cert ^^^^^^^^

Meta-state (This is a state that includes other states).

Deploys or removes given certificates and keys.

cert.package ^^^^^^^^^^^^^^^^

This state will install the required packages to manage certificates.

cert.deployed ^^^^^^^^^^^^^^^^^

This state will write the certificates and there matching keys, if any, are store on disk and integrated in the system.

cert.updated ^^^^^^^^^^^^^^^^

This state will run the certs_update_cmd command to integrate the deployed certificates on supported systems.

Available modules

cert_formula_helper.get_filenames_matching_content ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

A helper function to find certificate files that match certificate contents. Useful if a certificate file gets renamed to something you don't remember and have trouble finding a certificate you wish to remove.

Example

Example that finds all certificate files in /usr/local/share/ca-certificates matching the certificate contents found in the pillar data in cert:certlist:cert.filename:cert

.. code-block::

salt-call cert_formula_helper.get_filenames_matching_content /usr/local/share/ca-certificates  pillar_key="cert:certlist:cert.filename:cert"