GithubHelp home page GithubHelp logo

ansible-role-certbot-certs's Introduction

certbot_certs

This role creates a Let's Encrypt TLS certificate and its private key using the certbot tool.

The following files are created:

  • /etc/letsencrypt/live/{{ certbot_certname }}/privkey.pem
  • /etc/letsencrypt/live/{{ certbot_certname }}/cert.pem
  • /etc/letsencrypt/live/{{ certbot_certname }}/chain.pem
  • /etc/letsencrypt/live/{{ certbot_certname }}/fullchain.pem

which are symlinks to files in /etc/letsencrypt/archive/{{ certbot_certname }} directory.

The ownership is set to root:ssl-cert for all of them, and permissions are set to 0750 for directories and 0640 for files, so that PostgresSQL database server can use the files.

Role Variables

  • certbot_hostname - the host name for the certificate, default is {{ inventory_hostname }}, i.e. the hostname used for accessing the machine by Ansible
  • certbot_alt_hostnames - list of alternative DNS names to be included in the certificate, default is an empty list
  • certbot_certname - name used for the live and archive directories where files are stored, default is {{ certbot_hostname }}
  • certbot_account_options - default is --register-unsafely-without-email, replace with --email <your email> for registering properly
  • certbot_prehook - file with prehook, default is apache_prehook.sh stopping Apache web server
  • certbot_posthook - file with posthook, default is apache_posthook.sh starting Apache web server
  • certbot_install_hooks - whether to install prehook and posthook, default is yes

Simple Example Playbook

    - hosts: all
      roles:
         - cesnet.certbot_certs

Example of More Complex Playbook

    - hosts: 
        - "some-random-name.my-cloud.org"
      vars: 
        certbot_hostname: www.mynicename.net
        certbot_alt_hostnames:
          - www1.mynicename.net
          - www2.mynicename.net
        certbot_certname: mycert
        certbot_account_options: --email [email protected]
        certbot_install_hooks: yes
        certbot_prehook: files/certbot/myprehook.sh
        certbot_posthook: files/certbot/myposthook.sh
      roles:
         - cesnet.certbot_certs

License

Apache

Author Information

Martin Kuba [email protected], CESNET

ansible-role-certbot-certs's People

Contributors

martin-kuba avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  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.