Code Monkey home page Code Monkey logo

ansible-role-keystore-truststore's Introduction

Ansible Role: Keystore Truststore

Build Status

An Ansible Role for creating a keystore and truststore with self-signed certificates.

Requirements

A Java installation with JAVA_HOME configured is required on the host.

OpenSSL is required on the host.

Pip is required on the host. See the example Playbook.

Role Variables

ca_path: /tmp/testCA
Default: yes
The directory where the Certificate Authority should exist.

trusted_ca_path:
Default: no
Path of trusted certificate authorities (certification files) that should be imported to the truststore.

expiration_days: 365
Default: yes
Expiration time in days of the certificates.

common_name:
Default: no

country:
Default: no

state:
Default: no

locality:
Default: no

organization:
Default: no

organizational_unit:
Default: no

keystore_name: keystore
Default: yes

truststore_name: truststore
Default: yes

clean_up:
Default: yes
If a clean up should be made before running. When a clean up occurrs, all the old certificates and keystores are removed.

Example Playbook

The following playbook creates and signs certificates with our provided configuration. CN, C, ST, L, O & ON should be set to whatever you want. In the services we can configure which services and alternative names that the certificates should work for.

- hosts: localhost
  connection: local
  vars_prompt:
    - name: "keystore_password"
      prompt: "Please provide a password for the keystore"
  pre_tasks:
    - name: ensure pip is installed
      easy_install: { name: pip, state: latest }
      become: yes
  roles:
    - role: snieking.keystore_truststore
      trusted_ca_path: /my/trusted/ca-path/
      clean_up: no
      common_name: thecuriousdev.org
      country: SE
      state: Stockholm Country
      locality: Stockholm
      organization: thecuriousdev
      organizational_unit: blog
      alt_names:
        - "DNS.1  = testservice"
        - "DNS.2  = localhost"
        - "IP.1   = 127.0.0.1"

License

BSD, MIT

Author Information

Viktor Plane https://thecuriousdev.org

ansible-role-keystore-truststore's People

Contributors

snieking avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

ansible-role-keystore-truststore's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.