Class: Ansible::Ruby::Modules::Openssl_certificate

Inherits:
Base show all
Defined in:
lib/ansible/ruby/modules/generated/crypto/openssl_certificate.rb

Overview

This module allows one to (re)generate OpenSSL certificates. It implements a notion of provider (ie. C(selfsigned), C(ownca), C(acme), C(assertonly)) for your certificate. The ‘assertonly’ provider is intended for use cases where one is only interested in checking properties of a supplied certificate. The ‘ownca’ provider is intended for generate OpenSSL certificate signed with your own CA (Certificate Authority) certificate (self-signed certificate). Many properties that can be specified in this module are for validation of an existing or newly generated certificate. The proper place to specify them, if you want to receive a certificate with these properties is a CSR (Certificate Signing Request). It uses the pyOpenSSL python library to interact with OpenSSL.

Instance Method Summary collapse

Methods inherited from Base

#ansible_name, #to_h

Methods inherited from Ansible::Ruby::Models::Base

attr_option, attr_options, attribute, fix_inclusion, #initialize, remove_existing_validations, #to_h, validates

Constructor Details

This class inherits a constructor from Ansible::Ruby::Models::Base

Instance Method Details

#acme_accountkey_pathString?

Returns Path to the accountkey for the C(acme) provider.

Returns:

  • (String, nil)

    Path to the accountkey for the C(acme) provider



78
# File 'lib/ansible/ruby/modules/generated/crypto/openssl_certificate.rb', line 78

attribute :acme_accountkey_path

#acme_chainBoolean?

Returns Include the intermediate certificate to the generated certificate.

Returns:

  • (Boolean, nil)

    Include the intermediate certificate to the generated certificate



86
# File 'lib/ansible/ruby/modules/generated/crypto/openssl_certificate.rb', line 86

attribute :acme_chain

#acme_challenge_pathString?

Returns Path to the ACME challenge directory that is served on U(http://<HOST>:80/.well-known/acme-challenge/).

Returns:

  • (String, nil)

    Path to the ACME challenge directory that is served on U(http://<HOST>:80/.well-known/acme-challenge/)



82
# File 'lib/ansible/ruby/modules/generated/crypto/openssl_certificate.rb', line 82

attribute :acme_challenge_path

#csr_pathString?

Returns Path to the Certificate Signing Request (CSR) used to generate this certificate. This is not required in C(assertonly) mode.

Returns:

  • (String, nil)

    Path to the Certificate Signing Request (CSR) used to generate this certificate. This is not required in C(assertonly) mode.



28
# File 'lib/ansible/ruby/modules/generated/crypto/openssl_certificate.rb', line 28

attribute :csr_path

#extended_key_usageArray<String>, ...

Returns The I(extended_key_usage) extension field must contain all these values.

Returns:

  • (Array<String>, String, nil)

    The I(extended_key_usage) extension field must contain all these values.



141
# File 'lib/ansible/ruby/modules/generated/crypto/openssl_certificate.rb', line 141

attribute :extended_key_usage

#extended_key_usage_strictSymbol?

Returns If set to True, the I(extended_key_usage) extension field must contain only these values.

Returns:

  • (Symbol, nil)

    If set to True, the I(extended_key_usage) extension field must contain only these values.



145
# File 'lib/ansible/ruby/modules/generated/crypto/openssl_certificate.rb', line 145

attribute :extended_key_usage_strict

#forceSymbol?

Returns Generate the certificate, even if it already exists.

Returns:

  • (Symbol, nil)

    Generate the certificate, even if it already exists.



24
# File 'lib/ansible/ruby/modules/generated/crypto/openssl_certificate.rb', line 24

attribute :force

#has_expiredSymbol?

Returns Checks if the certificate is expired/not expired at the time the module is executed.

Returns:

  • (Symbol, nil)

    Checks if the certificate is expired/not expired at the time the module is executed.



109
# File 'lib/ansible/ruby/modules/generated/crypto/openssl_certificate.rb', line 109

attribute :has_expired

#invalid_atObject?

Returns The certificate must be invalid at this point in time. The timestamp is formatted as an ASN.1 TIME.

Returns:

  • (Object, nil)

    The certificate must be invalid at this point in time. The timestamp is formatted as an ASN.1 TIME.



120
# File 'lib/ansible/ruby/modules/generated/crypto/openssl_certificate.rb', line 120

attribute :invalid_at

#issuerHash?

Returns Key/value pairs that must be present in the issuer name field of the certificate. If you need to specify more than one value with the same key, use a list as value.

Returns:

  • (Hash, nil)

    Key/value pairs that must be present in the issuer name field of the certificate. If you need to specify more than one value with the same key, use a list as value.



94
# File 'lib/ansible/ruby/modules/generated/crypto/openssl_certificate.rb', line 94

attribute :issuer

#issuer_strictSymbol?

Returns If set to True, the I(issuer) field must contain only these values.

Returns:

  • (Symbol, nil)

    If set to True, the I(issuer) field must contain only these values.



98
# File 'lib/ansible/ruby/modules/generated/crypto/openssl_certificate.rb', line 98

attribute :issuer_strict

#key_usageArray<String>, ...

Returns The I(key_usage) extension field must contain all these values.

Returns:

  • (Array<String>, String, nil)

    The I(key_usage) extension field must contain all these values.



133
# File 'lib/ansible/ruby/modules/generated/crypto/openssl_certificate.rb', line 133

attribute :key_usage

#key_usage_strictSymbol?

Returns If set to True, the I(key_usage) extension field must contain only these values.

Returns:

  • (Symbol, nil)

    If set to True, the I(key_usage) extension field must contain only these values.



137
# File 'lib/ansible/ruby/modules/generated/crypto/openssl_certificate.rb', line 137

attribute :key_usage_strict

#not_afterObject?

Returns The certificate must expire at this point in time. The timestamp is formatted as an ASN.1 TIME.

Returns:

  • (Object, nil)

    The certificate must expire at this point in time. The timestamp is formatted as an ASN.1 TIME.



126
# File 'lib/ansible/ruby/modules/generated/crypto/openssl_certificate.rb', line 126

attribute :not_after

#not_beforeObject?

Returns The certificate must start to become valid at this point in time. The timestamp is formatted as an ASN.1 TIME.

Returns:

  • (Object, nil)

    The certificate must start to become valid at this point in time. The timestamp is formatted as an ASN.1 TIME.



123
# File 'lib/ansible/ruby/modules/generated/crypto/openssl_certificate.rb', line 123

attribute :not_before

#ownca_digestString?

Returns Digest algorithm to be used for the C(ownca) certificate.

Returns:

  • (String, nil)

    Digest algorithm to be used for the C(ownca) certificate.



64
# File 'lib/ansible/ruby/modules/generated/crypto/openssl_certificate.rb', line 64

attribute :ownca_digest

#ownca_not_afterObject?

Returns The timestamp at which the certificate stops being valid. The timestamp is formatted as an ASN.1 TIME. If this value is not specified, certificate will stop being valid 10 years from now.

Returns:

  • (Object, nil)

    The timestamp at which the certificate stops being valid. The timestamp is formatted as an ASN.1 TIME. If this value is not specified, certificate will stop being valid 10 years from now.



75
# File 'lib/ansible/ruby/modules/generated/crypto/openssl_certificate.rb', line 75

attribute :ownca_not_after

#ownca_not_beforeObject?

Returns The timestamp at which the certificate starts being valid. The timestamp is formatted as an ASN.1 TIME. If this value is not specified, certificate will start being valid from now.

Returns:

  • (Object, nil)

    The timestamp at which the certificate starts being valid. The timestamp is formatted as an ASN.1 TIME. If this value is not specified, certificate will start being valid from now.



72
# File 'lib/ansible/ruby/modules/generated/crypto/openssl_certificate.rb', line 72

attribute :ownca_not_before

#ownca_pathString?

Returns Remote absolute path of the CA (Certificate Authority) certificate.

Returns:

  • (String, nil)

    Remote absolute path of the CA (Certificate Authority) certificate.



53
# File 'lib/ansible/ruby/modules/generated/crypto/openssl_certificate.rb', line 53

attribute :ownca_path

#ownca_privatekey_passphraseObject?

Returns The passphrase for the I(ownca_privatekey_path).

Returns:

  • (Object, nil)

    The passphrase for the I(ownca_privatekey_path).



61
# File 'lib/ansible/ruby/modules/generated/crypto/openssl_certificate.rb', line 61

attribute :ownca_privatekey_passphrase

#ownca_privatekey_pathString?

Returns Path to the CA (Certificate Authority) private key to use when signing the certificate.

Returns:

  • (String, nil)

    Path to the CA (Certificate Authority) private key to use when signing the certificate.



57
# File 'lib/ansible/ruby/modules/generated/crypto/openssl_certificate.rb', line 57

attribute :ownca_privatekey_path

#ownca_versionInteger?

Returns Version of the C(ownca) certificate. Nowadays it should almost always be C(3).

Returns:

  • (Integer, nil)

    Version of the C(ownca) certificate. Nowadays it should almost always be C(3).



68
# File 'lib/ansible/ruby/modules/generated/crypto/openssl_certificate.rb', line 68

attribute :ownca_version

#pathString

Returns Remote absolute path where the generated certificate file should be created or is already located.

Returns:

  • (String)

    Remote absolute path where the generated certificate file should be created or is already located.



16
# File 'lib/ansible/ruby/modules/generated/crypto/openssl_certificate.rb', line 16

attribute :path

#privatekey_passphraseObject?

Returns The passphrase for the I(privatekey_path).

Returns:

  • (Object, nil)

    The passphrase for the I(privatekey_path).



36
# File 'lib/ansible/ruby/modules/generated/crypto/openssl_certificate.rb', line 36

attribute :privatekey_passphrase

#privatekey_pathString?

Returns Path to the private key to use when signing the certificate.

Returns:

  • (String, nil)

    Path to the private key to use when signing the certificate.



32
# File 'lib/ansible/ruby/modules/generated/crypto/openssl_certificate.rb', line 32

attribute :privatekey_path

#provider:selfsigned, ...

Returns Name of the provider to use to generate/retrieve the OpenSSL certificate. The C(assertonly) provider will not generate files and fail if the certificate file is missing.

Returns:

  • (:selfsigned, :ownca, :assertonly, :acme)

    Name of the provider to use to generate/retrieve the OpenSSL certificate. The C(assertonly) provider will not generate files and fail if the certificate file is missing.



20
# File 'lib/ansible/ruby/modules/generated/crypto/openssl_certificate.rb', line 20

attribute :provider

#selfsigned_digestString?

Returns Digest algorithm to be used when self-signing the certificate.

Returns:

  • (String, nil)

    Digest algorithm to be used when self-signing the certificate



43
# File 'lib/ansible/ruby/modules/generated/crypto/openssl_certificate.rb', line 43

attribute :selfsigned_digest

#selfsigned_not_afterObject?

Returns The timestamp at which the certificate stops being valid. The timestamp is formatted as an ASN.1 TIME. If this value is not specified, certificate will stop being valid 10 years from now.

Returns:

  • (Object, nil)

    The timestamp at which the certificate stops being valid. The timestamp is formatted as an ASN.1 TIME. If this value is not specified, certificate will stop being valid 10 years from now.



50
# File 'lib/ansible/ruby/modules/generated/crypto/openssl_certificate.rb', line 50

attribute :selfsigned_not_after

#selfsigned_not_beforeObject?

Returns The timestamp at which the certificate starts being valid. The timestamp is formatted as an ASN.1 TIME. If this value is not specified, certificate will start being valid from now.

Returns:

  • (Object, nil)

    The timestamp at which the certificate starts being valid. The timestamp is formatted as an ASN.1 TIME. If this value is not specified, certificate will start being valid from now.



47
# File 'lib/ansible/ruby/modules/generated/crypto/openssl_certificate.rb', line 47

attribute :selfsigned_not_before

#selfsigned_versionInteger?

Returns Version of the C(selfsigned) certificate. Nowadays it should almost always be C(3).

Returns:

  • (Integer, nil)

    Version of the C(selfsigned) certificate. Nowadays it should almost always be C(3).



39
# File 'lib/ansible/ruby/modules/generated/crypto/openssl_certificate.rb', line 39

attribute :selfsigned_version

#signature_algorithmsArray<String>, ...

Returns list of algorithms that you would accept the certificate to be signed with (e.g. [‘sha256WithRSAEncryption’, ‘sha512WithRSAEncryption’]).

Returns:

  • (Array<String>, String, nil)

    list of algorithms that you would accept the certificate to be signed with (e.g. [‘sha256WithRSAEncryption’, ‘sha512WithRSAEncryption’]).



90
# File 'lib/ansible/ruby/modules/generated/crypto/openssl_certificate.rb', line 90

attribute :signature_algorithms

#state:present, ...

Returns Whether the certificate should exist or not, taking action if the state is different from what is stated.

Returns:

  • (:present, :absent, nil)

    Whether the certificate should exist or not, taking action if the state is different from what is stated.



12
# File 'lib/ansible/ruby/modules/generated/crypto/openssl_certificate.rb', line 12

attribute :state

#subjectObject?

Returns Key/value pairs that must be present in the subject name field of the certificate. If you need to specify more than one value with the same key, use a list as value.

Returns:

  • (Object, nil)

    Key/value pairs that must be present in the subject name field of the certificate. If you need to specify more than one value with the same key, use a list as value.



102
# File 'lib/ansible/ruby/modules/generated/crypto/openssl_certificate.rb', line 102

attribute :subject

#subject_alt_nameArray<String>, ...

Returns The I(subject_alt_name) extension field must contain these values.

Returns:

  • (Array<String>, String, nil)

    The I(subject_alt_name) extension field must contain these values.



149
# File 'lib/ansible/ruby/modules/generated/crypto/openssl_certificate.rb', line 149

attribute :subject_alt_name

#subject_alt_name_strictSymbol?

Returns If set to True, the I(subject_alt_name) extension field must contain only these values.

Returns:

  • (Symbol, nil)

    If set to True, the I(subject_alt_name) extension field must contain only these values.



153
# File 'lib/ansible/ruby/modules/generated/crypto/openssl_certificate.rb', line 153

attribute :subject_alt_name_strict

#subject_strictSymbol?

Returns If set to True, the I(subject) field must contain only these values.

Returns:

  • (Symbol, nil)

    If set to True, the I(subject) field must contain only these values.



105
# File 'lib/ansible/ruby/modules/generated/crypto/openssl_certificate.rb', line 105

attribute :subject_strict

#valid_atString?

Returns The certificate must be valid at this point in time. The timestamp is formatted as an ASN.1 TIME.

Returns:

  • (String, nil)

    The certificate must be valid at this point in time. The timestamp is formatted as an ASN.1 TIME.



116
# File 'lib/ansible/ruby/modules/generated/crypto/openssl_certificate.rb', line 116

attribute :valid_at

#valid_inInteger?

Returns The certificate must still be valid in I(valid_in) seconds from now.

Returns:

  • (Integer, nil)

    The certificate must still be valid in I(valid_in) seconds from now.



129
# File 'lib/ansible/ruby/modules/generated/crypto/openssl_certificate.rb', line 129

attribute :valid_in

#versionObject?

Returns Version of the certificate. Nowadays it should almost always be 3.

Returns:

  • (Object, nil)

    Version of the certificate. Nowadays it should almost always be 3.



113
# File 'lib/ansible/ruby/modules/generated/crypto/openssl_certificate.rb', line 113

attribute :version