Puppet Class: docker::configuration

Defined in:
modules/docker/manifests/configuration.pp

Overview

Class docker::configuration

sets up the daemon.json file for the docker daemon.

Parameters

settings

The settings of the docker daemon, as a hash

location

The path on the filesystem for the daemon.json file. Defaults to /etc/docker/daemon.json

Parameters:

  • settings (Hash)
  • directory (Stdlib::Unixpath) (defaults to: '/etc/docker')
  • location (Stdlib::Unixpath) (defaults to: '/etc/docker/daemon.json')


12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'modules/docker/manifests/configuration.pp', line 12

class docker::configuration(
    Hash $settings,
    Stdlib::Unixpath $directory = '/etc/docker',
    Stdlib::Unixpath $location = '/etc/docker/daemon.json',
) {
    file { $directory:
        ensure => directory,
        owner  => 'root',
        group  => 'root',
        mode   => '0700',
    }
    file { $location:
        ensure  => present,
        content => to_json_pretty($settings),
        owner   => 'root',
        group   => 'root',
        mode    => '0440',
    }
}