summaryrefslogtreecommitdiff
path: root/services/julien.cf
blob: 6037930129023ed66c064d1ec5a77f7ab3f43291 (plain)
1
2
3
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
bundle agent julien
{
    vars:
        console_julien.(debian|ubuntu)::
            "bash_path" string => "/bin/bash";
            "group_command" string => "$(paths.groupadd)";
            "packages" slist => {
            };
        console_julien.centos::
            "bash_path" string => "/bin/bash";
            "group_command" string => "$(paths.groupadd)";
            "packages" slist => {
            };
        console_julien.(debian|ubuntu).!(andromeda|hero|hurricane|collab_jde)::
            "secondary_groups" slist => { "sudo" };
        collab_jde::
            "secondary_groups" slist => { "docker", "lxd", "sudo" };
        andromeda|hero::
            "secondary_groups" slist => { "adm", "cdrom", "dip", "docker", "libvirt", "lpadmin", "plugdev", "sambashare", "sudo", "wireshark" };
        hurricane::
            "secondary_groups" slist => { "adm", "boinc", "cdrom", "dip", "docker", "libvirt", "lp", "lpadmin", "plugdev", "sambashare", "sudo", "ubridge", "wireshark" };
        console_julien.linux.awh::
            "password" string => "$6$EkJ5N916$CVrBdCOstIrcN33TXSurTY4ot3RiTBJ5E8QQtHnOfOu1cGAjoIAd0Nl3OpR3hkp2jXYmwTJuHQaAuBU69BGNY1";
        console_julien.linux.!awh::
            "password" string => "$6$K/dtcqh4$JiV7j4T6C7vxgOVWcYQXM0DKv0eH6l6qPpdLXxguTmme/ZZDZcBT/uVV3mT2TS4ylRgbNl5uckucYhON1hALn.";
        console_julien.freebsd::
            "bash_path" string => "/usr/local/bin/bash";
            "group_command" string => "/usr/sbin/pw groupadd";
            "packages" slist => {
                "emacs25",
                "git",
                "mosh",
                "password-store",
                "tig",
                "rsync",
                "stunnel",
                "vim-lite",
                "weechat",
            };
            "password" string => "$6$B8xpe/hghS1Q0RiO$yrjcmnLVKOCbCtk6hiW4.hIL3oO4McV/QezKGADUXMel8fwDhe9UfC8XPu58VbhIJTbeYcVSLSc1vrgfjQW/S1";
            "secondary_groups" slist => { "wheel" };
    classes:
        console_julien::
            "group_julien_absent"
                not => groupexists("julien");
            "group_docker_present"
                not => groupexists("docker");
    methods:
        console_julien::
            "console_julien"  usebundle => install_package("$(this.bundle)", "$(julien.packages)");
    commands:
        group_julien_absent::
            "$(group_command)"
                args => "julien",
                classes => if_repaired("julien_group_julien_repaired");
    users:
        console_julien.linux::
            "julien"
                policy => "present",
                unless => "group_julien_absent",
                description => "Julien Dessaux",
                password => hashed_password("$(password)"),
                home_dir => "/home/julien",
                home_bundle => home_skel("julien"),
                group_primary => "julien",
                groups_secondary => { @(secondary_groups) },
                shell => "$(bash_path)",
                classes => if_repaired("julien_user_julien_repaired");
    reports:
        any::
            "$(this.bundle): group julien repaired" ifvarclass => "julien_group_julien_repaired";
            "$(this.bundle): user julien repaired" ifvarclass => "julien_user_julien_repaired";
}