Giter Club home page Giter Club logo

ansible-role-ssl-certificate's Introduction

ansible-role-ssl-certificate

Manage a SSL certificate on a server

Installation

ansible-galaxy install outsideopen.ssl_certificate

Example

---
- hosts: webserver
  roles:
    - role: outsideopen.ssl_certificate
      # the certs should be located in files/certs/example_com/
      # named as server.crt, ca.crt and server.key
      ssl_certificate_name: example_com

Role Variables

defaults

Variable Choices/Defaults Comments
ssl_certificate_source_path certs path under files to search for certificates
ssl_certificate_path /etc/ssl/private Where to store the certificates
ssl_certificate_path_cert {ssl_certificate_path}/{ssl_certificate_name} Full certificate path
ssl_certificate_path_owner root User to own the path
ssl_certificate_path_group root Group to own the path
ssl_certificate_path_mode 0700 Path mode
ssl_certificate_owner root User to own the cert
ssl_certificate_group root Group to own the cert
ssl_certificate_mode 0440 Cert mode
ssl_certificate_files List of files to copy

ssl_certificate_files

This is an array of dictionaries, that define the local file and the destination file

ssl_certificate_files_default:
  - file: server.crt
    dest: "{{ ssl_certificate_name }}.crt"
  - file: ca.crt
    dest: "{{ ssl_certificate_name }}-ca.crt"
  - file: server.key
    dest: "{{ ssl_certificate_name }}.key"

If you want to copy over a specific file (ie - server.pfx) you would add

ssl_certificate_files_extra:
  - file: server.pfx
    dest: "{{ ssl_certificate_name }}.pfx"

Testing

Testing requires Molecule and Docker

pipenv shell
pip install molecule-docker
ansible-galaxy collection install community.general
molecule test

License

MIT

Author Information

David Lundgren

ansible-role-ssl-certificate's People

Contributors

dlundgren avatar asrusch avatar

Watchers

Greg Lawler avatar James Cloos avatar  avatar  avatar

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.