{"id":13753604,"url":"https://github.com/jdauphant/ansible-role-ssl-certs","last_synced_at":"2025-10-05T13:30:36.609Z","repository":{"id":13812420,"uuid":"16508745","full_name":"jdauphant/ansible-role-ssl-certs","owner":"jdauphant","description":"Generate and/or deploy SSL certificate","archived":true,"fork":false,"pushed_at":"2020-04-25T15:59:54.000Z","size":35,"stargazers_count":128,"open_issues_count":2,"forks_count":63,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-09-30T17:23:44.991Z","etag":null,"topics":["ansible","ansible-role","nginx","ssl"],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jdauphant.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-02-04T10:34:37.000Z","updated_at":"2024-09-07T00:51:29.000Z","dependencies_parsed_at":"2022-08-28T10:41:45.614Z","dependency_job_id":null,"html_url":"https://github.com/jdauphant/ansible-role-ssl-certs","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdauphant%2Fansible-role-ssl-certs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdauphant%2Fansible-role-ssl-certs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdauphant%2Fansible-role-ssl-certs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdauphant%2Fansible-role-ssl-certs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jdauphant","download_url":"https://codeload.github.com/jdauphant/ansible-role-ssl-certs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235399012,"owners_count":18983814,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ansible","ansible-role","nginx","ssl"],"created_at":"2024-08-03T09:01:25.575Z","updated_at":"2025-10-05T13:30:31.325Z","avatar_url":"https://github.com/jdauphant.png","language":null,"funding_links":[],"categories":["ssl","Others"],"sub_categories":[],"readme":"ansible-role-ssl-certs\n======================\n\n## @jdauphant : I don't have time to manage anymore this role. Don't hesitate to fork and made your own version.\n\n\nGenerate and/or deploy SSL certificate\n\nAvailable on Ansible Galaxy: [jdauphant.ssl-certs](https://galaxy.ansible.com/jdauphant/ssl-certs/)\n\n# Examples\n\n## Example to generate a self-signed SSL certificate\n\n```YAML\n - hosts: all\n   roles:\n     - jdauphant.ssl-certs\n```\n\nThis will create certificate and private key in:\n\n- `/etc/ssl/myserver.mydomain.com.key`\n- `/etc/ssl/myserver.mydomain.com.pem`\n\n## Example to deploy a SSL certificate\n\n```YAML\n - hosts: all\n   roles:\n    - role: jdauphant.ssl-certs\n      ssl_certs_common_name: \"example.com\"\n```\n\nThe certificate has to be placed in `files/ssl/example.com.key` and `files/ssl/example.com.pem`. If\nthey don't exist, the key and a **self-signed** certificate will be generated at\n`/etc/ssl/example.com/example.com.key` and `/etc/ssl/example.com/example.com.pem` using the provided common name.\n\n\n## Example to deploy a SSL certificate using local key/pem files\n\n```YAML\n - hosts: all\n   roles:\n    - role: jdauphant.ssl-certs\n      ssl_certs_local_privkey_path: '/path/to/example.com.key'\n      ssl_certs_local_cert_path: '/path/to/example.com.pem'\n```\n\n## Example to deploy a SSL certificate stored in variables\n\nAn SSL certificate and key are just text that can be stored as a variable, which is useful when\nusing ansible vault.\n\nExample variable data, note how the text blob is indented. This is needed to correctly insert the\ntext via the template module.\n\n```YAML\nssl_certs_local_privkey_data: |\n  -----BEGIN RSA PRIVATE KEY-----\n  MIIEpQIBAAKCAQEAu2uhv2cjoN4F3arUZ5cDrwuxf3koCwrKSK75as0WZoxYrpyw\n  Lyx9ldyD4nGabVep0R/uAgQ/HqEf2jC7WIvGcEq8bHB9PyEEWzT8IjKQX0YTc//4\n  gkHBkpyU0fVrj5nkc30EIbcbH4RHRDwye4VhP/iCPchDG7OqvCyOdm8=\n  -----END RSA PRIVATE KEY-----\nssl_certs_local_cert_data: |\n  -----BEGIN CERTIFICATE-----\n  MIIDmzCCAoOgAwIBAgIJAKWMlgLwrBzXMA0GCSqGSIb3DQEBCwUAMGQxCzAJBgNV\n  QAL3naEfBSZBl0tBohuxn8Xd3yLPuKGUOk3pSL1IJy0Ca6p+QwjkaZUd9X3gf1V2\n  SEfYSaGPvfIlSuHIshno\n  -----END CERTIFICATE-----\n```\n\nThen simply include the role as in the first example.\n\n## Example to use this role with my Nginx role: [jdauphant.nginx](https://github.com/jdauphant/ansible-role-nginx)\n\n```YAML\n - hosts: all\n   roles:\n     - role: jdauphant.ssl-certs\n       ssl_certs_generate_dh_param: true\n     - role: jdauphant.nginx\n       nginx_configs:\n          ssl:\n               - ssl_certificate_key {{ssl_certs_privkey_path}}\n               - ssl_certificate     {{ssl_certs_cert_path}}\n               - ssl_dhparam         {{ssl_certs_dhparam_path}}\n       nginx_sites:\n          default:\n               - listen 443 ssl\n               - server_name _\n               - root \"/usr/share/nginx/html\"\n               - index index.html\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjdauphant%2Fansible-role-ssl-certs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjdauphant%2Fansible-role-ssl-certs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjdauphant%2Fansible-role-ssl-certs/lists"}