All Projects → jdauphant → Ansible Role Ssl Certs

jdauphant / Ansible Role Ssl Certs

Licence: bsd-2-clause
Generate and/or deploy SSL certificate

Projects that are alternatives of or similar to Ansible Role Ssl Certs

Nginx
A fairly flexible and feature full Ansible role for the NGINX web server.
Stars: ✭ 151 (+23.77%)
Mutual labels:  ansible, ansible-role, nginx
Ansible Role Nginx
Ansible role for NGINX
Stars: ✭ 404 (+231.15%)
Mutual labels:  ansible, ansible-role, nginx
Ansible Role Nginx
Ansible role to install and manage nginx configuration
Stars: ✭ 648 (+431.15%)
Mutual labels:  ansible, ansible-role, nginx
Lobsters Ansible
Ansible playbook for lobste.rs
Stars: ✭ 56 (-54.1%)
Mutual labels:  ansible, nginx
Ansible Phoenix
[Unmaintained] Develop and deploy a Phoenix app using Ansible!
Stars: ✭ 37 (-69.67%)
Mutual labels:  ansible, ansible-role
Ansible Kvm
Stars: ✭ 40 (-67.21%)
Mutual labels:  ansible, ansible-role
Nagios Nrpe Server
Nagios NRPE Server Role for Ansible
Stars: ✭ 27 (-77.87%)
Mutual labels:  ansible, ansible-role
Centos7 Cis
Ansible CentOS 7 - CIS Benchmark Hardening Script
Stars: ✭ 64 (-47.54%)
Mutual labels:  ansible, ansible-role
Ansible Role Visual Studio Code
Ansible role for installing the Visual Studio Code IDE
Stars: ✭ 58 (-52.46%)
Mutual labels:  ansible, ansible-role
Molecule Ansible Docker Aws
Example project showing how to test Ansible roles with Molecule using Testinfra and a multiscenario approach with Docker, Vagrant & AWS EC2 as infrastructure providers
Stars: ✭ 72 (-40.98%)
Mutual labels:  ansible, ansible-role
Docker Cloud Platform
使用Docker构建云平台,Docker云平台系列共三讲,Docker基础、Docker进阶、基于Docker的云平台方案。OpenStack+Docker+RestAPI+OAuth/HMAC+RabbitMQ/ZMQ+OpenResty/HAProxy/Nginx/APIGateway+Bootstrap/AngularJS+Ansible+K8S/Mesos/Marathon构建/探索微服务最佳实践。
Stars: ✭ 86 (-29.51%)
Mutual labels:  ansible, nginx
Magento2 Varnish Redis Ssl Docker Compose
Deploy Magento2 with Varnish Cache and Redis with SSL termination using Docker-compose tool
Stars: ✭ 37 (-69.67%)
Mutual labels:  ssl, nginx
Ansible Role Android Sdk
Install Android SDK tools and packages, headless, with ansible.
Stars: ✭ 34 (-72.13%)
Mutual labels:  ansible, ansible-role
Ansible Config encoder filters
Ansible role used to deliver the Config Encoder Filters.
Stars: ✭ 48 (-60.66%)
Mutual labels:  ansible, nginx
Ansible Restic
Deploy restic backup program
Stars: ✭ 29 (-76.23%)
Mutual labels:  ansible, ansible-role
Ansible In Action
Ansible playbook to deploy your Laravel code base to VPS
Stars: ✭ 61 (-50%)
Mutual labels:  ansible, ansible-role
Ansible Haproxy
Ansible role to set up (the latest version of) HAProxy in Ubuntu systems
Stars: ✭ 83 (-31.97%)
Mutual labels:  ansible, ssl
Ubuntu1604 Cis
Ubuntu CIS Hardening Ansible Role
Stars: ✭ 88 (-27.87%)
Mutual labels:  ansible, ansible-role
Ansible Elasticsearch
Ansible playbook for Elasticsearch
Stars: ✭ 1,316 (+978.69%)
Mutual labels:  ansible, ansible-role
Ansible Style Guide
A style guide for Ansible use in EGI
Stars: ✭ 14 (-88.52%)
Mutual labels:  ansible, ansible-role

ansible-role-ssl-certs

@jdauphant : I don't have time to manage anymore this role. Don't hesitate to fork and made your own version.

Generate and/or deploy SSL certificate

Available on Ansible Galaxy: jdauphant.ssl-certs

Examples

Example to generate a self-signed SSL certificate

 - hosts: all
   roles:
     - jdauphant.ssl-certs

This will create certificate and private key in:

  • /etc/ssl/myserver.mydomain.com.key
  • /etc/ssl/myserver.mydomain.com.pem

Example to deploy a SSL certificate

 - hosts: all
   roles:
    - role: jdauphant.ssl-certs
      ssl_certs_common_name: "example.com"

The certificate has to be placed in files/ssl/example.com.key and files/ssl/example.com.pem. If they don't exist, the key and a self-signed certificate will be generated at /etc/ssl/example.com/example.com.key and /etc/ssl/example.com/example.com.pem using the provided common name.

Example to deploy a SSL certificate using local key/pem files

 - hosts: all
   roles:
    - role: jdauphant.ssl-certs
      ssl_certs_local_privkey_path: '/path/to/example.com.key'
      ssl_certs_local_cert_path: '/path/to/example.com.pem'

Example to deploy a SSL certificate stored in variables

An SSL certificate and key are just text that can be stored as a variable, which is useful when using ansible vault.

Example variable data, note how the text blob is indented. This is needed to correctly insert the text via the template module.

ssl_certs_local_privkey_data: |
  -----BEGIN RSA PRIVATE KEY-----
  MIIEpQIBAAKCAQEAu2uhv2cjoN4F3arUZ5cDrwuxf3koCwrKSK75as0WZoxYrpyw
  Lyx9ldyD4nGabVep0R/uAgQ/HqEf2jC7WIvGcEq8bHB9PyEEWzT8IjKQX0YTc//4
  gkHBkpyU0fVrj5nkc30EIbcbH4RHRDwye4VhP/iCPchDG7OqvCyOdm8=
  -----END RSA PRIVATE KEY-----
ssl_certs_local_cert_data: |
  -----BEGIN CERTIFICATE-----
  MIIDmzCCAoOgAwIBAgIJAKWMlgLwrBzXMA0GCSqGSIb3DQEBCwUAMGQxCzAJBgNV
  QAL3naEfBSZBl0tBohuxn8Xd3yLPuKGUOk3pSL1IJy0Ca6p+QwjkaZUd9X3gf1V2
  SEfYSaGPvfIlSuHIshno
  -----END CERTIFICATE-----

Then simply include the role as in the first example.

Example to use this role with my Nginx role: jdauphant.nginx

 - hosts: all
   roles:
     - role: jdauphant.ssl-certs
       ssl_certs_generate_dh_param: true
     - role: jdauphant.nginx
       nginx_configs:
          ssl:
               - ssl_certificate_key {{ssl_certs_privkey_path}}
               - ssl_certificate     {{ssl_certs_cert_path}}
               - ssl_dhparam         {{ssl_certs_dhparam_path}}
       nginx_sites:
          default:
               - listen 443 ssl
               - server_name _
               - root "/usr/share/nginx/html"
               - index index.html
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].