.. _dellemc.enterprise_sonic.sonic_pki_module: ********************************** dellemc.enterprise_sonic.sonic_pki ********************************** **Manages PKI attributes of Enterprise Sonic** Version added: 2.3.0 .. contents:: :local: :depth: 1 Synopsis -------- - Manages PKI attributes of Enterprise Sonic Parameters ---------- .. raw:: html
Parameter Choices/Defaults Comments
config
dictionary
The provided configuration
security_profiles
list / elements=dictionary
Application Security Profiles
cdp_list
list / elements=string
Global list of CDP's
certificate_name
string
Host Certificate Name
key_usage_check
boolean
    Choices:
  • no
  • yes
Require key usage is enforced
ocsp_responder_list
list / elements=string
Global list of OCSP responders
peer_name_check
boolean
    Choices:
  • no
  • yes
Require peer name is verified
profile_name
string / required
Profile Name
revocation_check
boolean
    Choices:
  • no
  • yes
Require certificate revocation check succeeds
trust_store
string
Name of associated trust_store
trust_stores
list / elements=dictionary
Store of CA Certificates
ca_name
list / elements=string
List of CA certificates in the trust store.
name
string / required
The name of the Trust Store
state
string
    Choices:
  • merged ←
  • deleted
  • replaced
  • overridden
The state of the configuration after module completion.

Notes ----- .. note:: - Tested against Dell Enterprise SONiC 4.1.0 Examples -------- .. code-block:: yaml # Using "merged" state for initial config # # Before state: # ------------- # # sonic# show running-configuration | grep crypto # sonic# # - name: "Initial Config" dellemc.enterprise_sonic.sonic_pki: config: security_profiles: - profile_name: rest ocsp_responder_list: - http://example.com/ocspa - http://example.com/ocspb certificate_name: host trust_store: default-ts trust_stores: - name: default-ts ca_name: - CA2 state: merged # After state: # ------------ # # sonic# show running-configuration | grep crypto # crypto trust_store default-ts ca-cert CA2 # crypto security-profile rest # crypto security-profile trust_store rest default-ts # crypto security-profile certificate rest host # crypto security-profile ocsp-list rest http://example.com/ocspa,http://example.com/ocspb # Using "deleted" state to remove configuration # # Before state: # ------------ # # sonic# show running-configuration | grep crypto # crypto trust_store default-ts ca-cert CA2 # crypto security-profile rest # crypto security-profile trust_store rest default-ts # crypto security-profile certificate rest host # crypto security-profile ocsp-list rest http://example.com/ocsp # - name: PKI Delete Test hosts: datacenter gather_facts: true connection: httpapi tasks: - name: Remove trust_store from security-profile dellemc.enterprise_sonic.sonic_pki: config: security_profiles: - profile_name: rest trust_store: default-ts state: deleted # After state: # ------------ # # sonic# show running-configuration | grep crypto # crypto trust_store default-ts ca-cert CA2 # crypto security-profile rest # crypto security-profile certificate rest host # crypto security-profile ocsp-list rest http://example.com/ocsp # Using "overridden" state # Before state: # ------------ # # sonic# show running-configuration | grep crypto # crypto trust_store default-ts ca-cert CA2 # crypto security-profile rest # crypto security-profile trust_store rest default-ts # crypto security-profile certificate rest host # crypto security-profile ocsp-list rest http://example.com/ocspa,http://example.com/ocspb # - name: "Overridden Config" dellemc.enterprise_sonic.sonic_pki: config: security_profiles: - profile_name: telemetry ocsp_responder_list: - http://example.com/ocspb revocation_check: true trust_store: telemetry-ts certificate_name: host trust_stores: - name: telemetry-ts ca_name: CA state: overridden # After state: # ----------- # # sonic# show running-configuration | grep crypto # crypto trust_store telemetry-ts ca-cert CA # crypto security-profile telemetry revocation_check true # crypto security-profile trust_store telemetry telemetry-ts # crypto security-profile certificate telemetry host # crypto security-profile ocsp-list telemetry http://example.com/ocspb # Using "replaced" state to update config # Before state: # ------------ # # sonic# show running-configuration | grep crypto # crypto trust_store default-ts ca-cert CA2 # crypto security-profile rest # crypto security-profile trust_store rest default-ts # crypto security-profile certificate rest host # crypto security-profile ocsp-list rest http://example.com/ocspa,http://example.com/ocspb # - name: "Replace Config" dellemc.enterprise_sonic.sonic_pki: config: security_profiles: - profile_name: rest ocsp_responder_list: - http://example.com/ocsp revocation_check: false trust_store: default-ts certificate_name: host state: replaced # After state: # ----------- # # sonic# show running-configuration | grep crypto # crypto trust_store default-ts ca-cert CA2 # crypto security-profile rest # crypto security-profile trust_store rest default-ts # crypto security-profile certificate rest host # crypto security-profile ocsp-list rest http://example.com/ocsp Return Values ------------- Common return values are documented `here `_, the following are the fields unique to this module: .. raw:: html
Key Returned Description
after
dictionary
when changed
The resulting configuration module invocation.

Sample:
The configuration returned will always be in the same format as the parameters above.
before
dictionary
always
The configuration prior to the module invocation.

Sample:
The configuration returned will always be in the same format as the parameters above.
commands
list
always
The set of commands pushed to the remote device.

Sample:
['command 1', 'command 2', 'command 3']


Status ------ Authors ~~~~~~~ - Eric Seifert (@seiferteric)