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 (Any)
  • directory (Any) (defaults to: '/etc/docker')
  • location (Any) (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(
    $settings,
    $directory='/etc/docker',
    $location='/etc/docker/daemon.json',
) {
    file { $directory:
        ensure => directory,
        owner  => 'root',
        group  => 'root',
        mode   => '0700',
    }
    file { $location:
        ensure  => present,
        content => ordered_json($settings),
        owner   => 'root',
        group   => 'root',
        mode    => '0440',
    }
}