项目作者: borisskert

项目描述 :
高级语言:
项目地址: git://github.com/borisskert/ansible-openssl-self-signed-certs.git
创建时间: 2020-04-13T09:51:45Z
项目社区:https://github.com/borisskert/ansible-openssl-self-signed-certs

开源协议:MIT License

下载


ansible-openssl-self-signed-certs

Creates self-signed certificates with OpenSSL

Requirements

  • Python
  • Docker (for testing only)

Tasks

  • Create working directory
  • Create certificate authority (CA)
  • Create certificates for sites

Role parameters

Variable Type Mandatory? Default Description
openssl_working_directory text no /srv/openssl Directory to which the CA and CSRs are saved
openssl_certificates_directory text no /srv/openssl/certs Directory to which the certificates and keys are saved
openssl_sites array of texts no [] The sites for which certificates will be created
openssl_ca_name text no my_CA Your certificate name
openssl_download_dir text no ./.tmp Download directory where the created CA cert will be stored locally
openssl_ca_key_size number no 4096 Defines the CA key size
openssl_cert_key_size number no 4096 Defines the certificates key size

Example Playbook

Requirement

  1. - name: create-self-signed-certs
  2. src: https://github.com/borisskert/ansible-openssl-self-signed-certs.git
  3. scm: git

Playbook

Usage (without parameters):

  1. - hosts: test_machine
  2. roles:
  3. - role: create-self-signed-certs

Usage (with parameters):

  1. - hosts: test_machine
  2. roles:
  3. - role: create-self-signed-certs
  4. openssl_ca_name: site.org
  5. openssl_ca_key_size: 8192
  6. openssl_cert_key_size: 2048
  7. openssl_sites:
  8. - my.first.site.org
  9. - my.second.site.org
  10. - my.third.site.org

Testing

Requirements:

Run within docker

shell script molecule test