lefilament / ansible_role_docker_server

Ansible role for installing docker server packages and proxy
GNU Affero General Public License v3.0
4 stars 4 forks source link
ansible ansible-role docker-compose docker-service proxy proxy-docker traefik

docker_server

The main repo for this role is on Le Filament GitLab This roles deploys Docker and configures daemon, together with Traefik inverseproxy

Requirements

This role requires Ansible collection community.docker Also, this role requires passlib (either python package or python3-passlib apt package) for proper encryption of passwords

Role Variables

Variables defined in defaults/main.yaml:

This role makes use of a few variables which are set in case the target server is part of other groups (but still initialized to false in defaults/main.yml), namely :

Note : all variables defined in defaults/main.yml might be useful in another role, in that case, it would be better to have them overwritten at play or host_vars level in order to make sure the same value is provided to each independant role

Variables from vars directory:

This role also makes use of variables gathered from facts :

This role also configures backup servers where daily docker facts should be pushed :

Eventually, this role configures 2 variables in host_vars (only if docker_userns_remap is true):

Dependencies

This role requires the following Ansible collection :

This role does not have dependencies per-se, while it can be dependant on variables defined in other groups (backup_servers, docker_auth, docker_nextcloud, docker_odoo, docker_owncloud)

Example Playbook

- hosts: docker
  gather_facts: true
  become: true
  roles:
  - { role: docker_server, tags: docker }
  vars:
  - { default_maintenance_email: "maintenance@example.org" }
  - { default_sshd_port: 10022 }
  - { docker_userns_remap: true }
  - { restrict_internet_access: true }
  - { host_user: "testuser" }
  - { srv_proxy_pass: "SuperSecureProxyP4$$" }
  - { cloud_collabora: true }
  - { cloud_collabora_url: "collabora.example.org" }
  - { cloud_url: "cloud.example.org" }
  - { metabase: false }
  - { ldap_url: "ldap.example.org" }
  - { sso_url: "sso.example.org" }

License

AGPL-3

Author Information

Le Filament (https://le-filament.com)