Puppet Class: pulsevtm::aptimizer_scopes_any_hostname_or_path

Defined in:
manifests/aptimizer_scopes_any_hostname_or_path.pp

Overview

class: pulsevtm::aptimizer_scopes_any_hostname_or_path

This class is a direct implementation of brocadvtm::aptimizer_scopes

Please refer to the documentation in that module for more information

Parameters:

  • ensure (Any) (defaults to: present)
  • basic__canonical_hostname (Any) (defaults to: undef)
  • basic__hostnames (Any) (defaults to: '[]')
  • basic__root (Any) (defaults to: '/')


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
# File 'manifests/aptimizer_scopes_any_hostname_or_path.pp', line 7

class pulsevtm::aptimizer_scopes_any_hostname_or_path (
  $ensure                    = present,
  $basic__canonical_hostname = undef,
  $basic__hostnames          = '[]',
  $basic__root               = '/',
){
  include pulsevtm
  $ip              = $pulsevtm::rest_ip
  $port            = $pulsevtm::rest_port
  $user            = $pulsevtm::rest_user
  $pass            = $pulsevtm::rest_pass
  $purge           = $pulsevtm::purge
  $purge_state_dir = $pulsevtm::purge_state_dir

  info ("Configuring aptimizer_scopes_any_hostname_or_path ${name}")
  vtmrest { 'aptimizer/scopes/Any%20hostname%20or%20path':
    ensure   => $ensure,
    before   => Class[pulsevtm::purge],
    endpoint => "https://${ip}:${port}/api/tm/6.0/config/active",
    username => $user,
    password => $pass,
    content  => template('pulsevtm/aptimizer_scopes.erb'),
    type     => 'application/json',
    internal => 'aptimizer_scopes_any_hostname_or_path',
    failfast => $pulsevtm::failfast,
    debug    => $pulsevtm::debug,
  }

  if ( $purge ) {
    ensure_resource('file', "${purge_state_dir}/aptimizer_scopes", {ensure => present})
    file_line { 'aptimizer/scopes/Any%20hostname%20or%20path':
      line => 'aptimizer/scopes/Any%20hostname%20or%20path',
      path => "${purge_state_dir}/aptimizer_scopes",
    }
  }
}