Skip to content

Instantly share code, notes, and snippets.

@kevit
Created May 29, 2020 10:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kevit/c21bb21e8415d95a95e9ff193604fde3 to your computer and use it in GitHub Desktop.
Save kevit/c21bb21e8415d95a95e9ff193604fde3 to your computer and use it in GitHub Desktop.
ansible ssl check
---
- hosts: all
connection: local
tasks:
- name: Get a cert from an https port
get_certificate:
host: "www.google.com"
port: 443
register: cert
- copy:
content: "{{ cert.cert }}"
dest: "cert.file"
- name: Ensure that the existing certificate has a certain domain in its subjectAltName
openssl_certificate:
path: "cert.file"
provider: assertonly
subject_alt_name:
- www.example.com
- test.example.com
@kevit
Copy link
Author

kevit commented May 29, 2020

currently have an issue with SNI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment