Skip to content

Ansible role for creation of SSL keys and certificates signed by local CA

License

Notifications You must be signed in to change notification settings

rh-messaging-qe/ansible-ssl-generation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Role Name

This role creates Certificate Authority certificate and key on 'localhost' and signs per host specific certificate. These signed certificates and private keys (along with Certificate Sign Request) are copied into given node.

See default variables for details like used password, locations, subject/issuer information etc. Some useful information, like locations and passwords, is generated on each host into "{{ amq_ssl_dir_path }}/readme".

Requirements

Ansible 2.7+

Usage

Use this role with a playbook defined like this:

- name: Create CA certificates
  hosts: localhost
  tasks:
    - name: Prepare node dependencies
      when: amq_ssl_certs_self_signed is defined and amq_ssl_certs_self_signed == False
      include_tasks: roles/ansible-ssl-generation/tasks/install_dependencies.yml

    - name: Generate local CA
      when: amq_ssl_certs_self_signed is defined and amq_ssl_certs_self_signed == False
      include_tasks: roles/ansible-ssl-generation/tasks/generate_root_ca.yml

- name: Generate self-signed SSL keys
  hosts: all
  gather_facts: True
  roles:
    - ansible-ssl-generation

This role is to be used with ansible-broker-clusters/playbooks/gen-ssl for start.

Recommended execution via playbook is using following command.

ansible-playbook -i ansible-broker-clusters/dynamic-inventory.py -u root ansible-broker-clusters/playbooks/gen-ssl/provision.yml -e @/Users/mtoth/work/repos/ansible-broker-clusters/playbooks/gen-ssl/defaults/main.yml

About

Ansible role for creation of SSL keys and certificates signed by local CA

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published