GithubHelp home page GithubHelp logo

obvionaoe / ansible-role-caddy Goto Github PK

View Code? Open in Web Editor NEW
4.0 1.0 1.0 21 KB

An Ansible role to set up a Caddy server running in Docker with the Docker Proxy plugin installed.

Home Page: https://galaxy.ansible.com/obvionaoe/caddy

License: MIT License

caddy web-server server web docker ansible ansible-role ansible-galaxy ansible-galaxy-role container caddy-docker-proxy docker-proxy

ansible-role-caddy's Introduction

Ansible Role: Caddy

Project Status Ansible Galaxy

An Ansible role to set up a Caddy server running in Docker with the Docker Proxy plugin installed.

Requirements

Role Variables

Available variables are listed below, along with default values (see defaults/main.yml):

timezone: Etc/UTC

The timezone the container should be in. This variable does not include the caddy prefix so that all roles that support this feature can be configured through a single variable.

caddy_timezone: "{{ timezone }}"

The timezone the container should be in. This variable is by default set to the value passed to the timezone variable and is used only when, for some reason, the timezone to be passed to Caddy's container should not be the one that the timezone variable is set to.

caddy_host_user: caddy
caddy_host_group: caddy

The user and group to use when creating the host directories.

caddy_host_dir: /caddy
caddy_host_data_dir: "{{ caddy_host_dir }}/data"

The root host directory and the data directory that will be mounted onto the container.

caddy_image_tag: '2.8'
caddy_image_name: 'lucaslorentz/caddy-docker-proxy'
caddy_image: "{{ caddy_image_name }}:{{ caddy_image_tag }}"

Variables to control which image will be used when running the container, in case you build your own image.

caddy_container_name: caddy

The name to give to the container.

caddy_container_restart_policy: unless-stopped
caddy_container_restart_retries: 5

Variables to control the state of the container, and the restart policy.

caddy_container_volumes:
  - /var/run/docker.sock:/var/run/docker.sock:ro
  - "{{ caddy_host_data_dir }}:/data"

Variable to specify which host directories should be mounted to the container.

caddy_container_ports:
  - 80:80
  - 443:443

Variable to specify which container ports to publish.

caddy_create_networks: true
caddy_container_networks:
  - name: caddy

Variables to specify what Docker networks to add the container to, and if these networks should be created.

caddy_container_labels: {}

Variable to define labels to give to the container. These labels are used to configure Caddy. A comprehensive guide on how to use the labels can be found here.

caddy_container_env_vars: {}

Variable to define environment variables to pass to the container. A full list of the available options can be found here.

Dependencies

None.

Example Playbook

- hosts: all
  roles:
    - obvionaoe.caddy

License

MIT

Author Information

This role was created in 2022 by Luís Guimarâes.

ansible-role-caddy's People

Contributors

obvionaoe avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

nqwe23

ansible-role-caddy's Issues

Add tests

Add workflow to test the role using Molecule

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.