debops.docker_gen default variables

Docker_gen installation

docker_gen__repo

Address of the docker-gen GitHub repository.

docker_gen__repo: 'https://github.com/jwilder/docker-gen'
docker_gen__os_arch

Operating System and Architecture of the docker-gen tarball to install.

docker_gen__os_arch: 'linux-amd64'
docker_gen__version

Version of docker-gen to install.

docker_gen__version: '0.7.4'
docker_gen__release

Templated URL of the docker-gen release which will be downloaded from GitHub.

docker_gen__release: '{{ docker_gen__repo }}/releases/download/{{ docker_gen__version }}/docker-gen-{{ docker_gen__os_arch }}-{{ docker_gen__version }}.tar.gz'
docker_gen__src

Location of docker-gen sources on remote host where source tarball will be stored.

docker_gen__src: '{{ (ansible_local.fhs.src | d("/usr/local/src"))
                     + "/docker-gen" }}'
docker_gen__lib

Location where the docker-gen binary will be installed (not in the $PATH since this binary won't be used by the user, but as a service).

docker_gen__lib: '{{ (ansible_local.fhs.lib | d("/usr/local/lib"))
                     + "/docker-gen" }}'
docker_gen__templates

Location where docker-gen templates will be installed.

docker_gen__templates: '{{ docker_gen__lib + "/templates" }}'
docker_gen__config

Custom configuration in the YAML text block format, added at the end of the generated /etc/docker-gen.conf configuration file. Should be in the format:

docker_gen__config: |
  [[config]]
  key = "value"
  option = true
docker_gen__config: ''

Remote Docker support

docker_gen__remote

By default docker-gen expects Docker to be installed and available locally. With this option set to True you can enable support for remote Docker TCP connection over TLS.

docker_gen__remote: False
docker_gen__remote_host

Specify FQDN hostname or IP address of the remote Docker host.

docker_gen__remote_host: ''
docker_gen__remote_port

Specify the TCP port used to connect to Docker using TLS.

docker_gen__remote_port: '2375'
docker_gen__remote_endpoint

This is the -endpoint option passed to the docker-gen binary when the remote support is enabled.

docker_gen__remote_endpoint: 'tcp://{{ docker_gen__remote_host }}:{{ docker_gen__remote_port }}'

nginx upstream support

docker_gen__nginx

Enable support for generating nginx upstream definitions. docker-gen will create entry for each container which has NGINX_UPSTREAM variable set in its environment, for example:

docker run -e NGINX_UPSTREAM=docker_upstream -d ...
docker_gen__nginx: True
docker_gen__nginx_template

Path to the template file used by docker-gen to generate nginx configuration.

docker_gen__nginx_template: '{{ docker_gen__templates + "/nginx-upstreams.conf.tmpl" }}'
docker_gen__nginx_dest

Path where docker-gen saves the generated nginx configuration.

docker_gen__nginx_dest: '/etc/nginx/conf.d/docker-gen-upstreams.conf'
docker_gen__nginx_options

Additional options added to the nginx configuration section in docker-gen config file, in YAML text block format.

docker_gen__nginx_options: |
  onlyexposed = true
  watch = true
docker_gen__nginx_notify

Notify command used by docker-gen to reload nginx, depending on the init system used.

docker_gen__nginx_notify: '{{ docker_gen__nginx_notify_map[ansible_service_mgr] }}'
docker_gen__nginx_notify_map

Dictionary map of commands used to reload nginx by docker-gen.

docker_gen__nginx_notify_map:
  systemd:  'nginx -t && systemctl reload nginx'
  sysvinit: 'nginx -t && service nginx reload'
  upstart:  'nginx -t && service nginx reload'

PKI and certificates

docker_gen__pki

Enable or disable support for PKI certificates managed by debops.pki.

docker_gen__pki: '{{ ansible_local.pki.enabled | d() | bool }}'
docker_gen__pki_path

Directory where PKI files are located on the remote host.

docker_gen__pki_path: '{{ ansible_local.pki.base_path | d("/etc/pki") }}'
docker_gen__pki_realm

Name of the PKI realm used by docker-gen.

docker_gen__pki_realm: '{{ ansible_local.pki.realm | d("system") }}'
docker_gen__pki_ca

Name of the Root CA certificate file used by docker-gen.

docker_gen__pki_ca: 'CA.crt'
docker_gen__pki_crt

Name of the host certificate used by docker.

docker_gen__pki_crt: 'default.crt'
docker_gen__pki_key

Name of the private key file used by docker-gen.

docker_gen__pki_key: 'default.key'