Puppet Class: docker_pusher

Defined in:
modules/docker_pusher/manifests/init.pp

Overview

Class docker_pusher

Installs small push script used by CI

Parameters:

  • docker_pusher_user (Any)


4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# File 'modules/docker_pusher/manifests/init.pp', line 4

class docker_pusher(
    $docker_pusher_user,
) {
    file { '/etc/docker-pusher':
        ensure => 'directory',
        owner  => 'root',
        group  => 'root',
        mode   => '0400',
    }

    file { '/etc/docker-pusher/config.json':
        ensure    => 'present',
        owner     => 'root',
        group     => 'root',
        mode      => '0400',
        content   => secret('docker-pusher/config.json'),
        show_diff => false,
    }

    file { '/usr/local/bin/docker-pusher':
        ensure => 'present',
        owner  => 'root',
        group  => 'root',
        mode   => '0700',
        source => 'puppet:///modules/docker_pusher/docker_pusher.sh',
    }

    sudo::user { "sudo ${docker_pusher_user} docker-pusher":
        user       => $docker_pusher_user,
        privileges => [
            'ALL=(root) NOPASSWD: /usr/local/bin/docker-pusher *',
        ]
    }
}