Puppet Class: netops::ripeatlas::cli

Defined in:
modules/netops/manifests/ripeatlas/cli.pp

Overview

SPDX-License-Identifier: Apache-2.0

Parameters:

  • http_proxy (String) (defaults to: undef)


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
# File 'modules/netops/manifests/ripeatlas/cli.pp', line 2

class netops::ripeatlas::cli (
  String $http_proxy = undef,
) {
    ensure_packages('ripe-atlas-tools')

    include ::passwords::netops # lint:ignore:wmf_styleguide
    $api_key = $::passwords::netops::ripeatlas_cli_api_key
    $utils = ['adig', 'ahttp', 'antp', 'aping', 'asslcert', 'atraceroute']

    $home = '/var/lib/atlas'

    systemd::sysuser { 'atlas':
        shell    => '/bin/bash',
        home_dir => $home,
    }

    file { $home:
        ensure => directory,
        owner  => 'atlas',
        group  => 'atlas',
    }

    file { ["${home}/.config", "${home}/.config/ripe-atlas-tools"]:
        ensure => directory,
        owner  => 'atlas',
        group  => 'root',
        mode   => '0500',
    }

    file { "${home}/.config/ripe-atlas-tools/rc":
        ensure  => present,
        content => template('netops/ripeatlas-cli-config.erb'),
        owner   => 'atlas',
        group   => 'root',
        mode    => '0400',
    }

    file { '/etc/ripeatlas.alias':
        ensure  => present,
        content => template('netops/ripeatlas-alias.erb'),
        owner   => 'root',
        group   => 'root',
        mode    => '0444',
    }
}