Defined Type: openstack::util::envscript

Defined in:
modules/openstack/manifests/util/envscript.pp

Overview

yaml config and convenience script to set credentials for openstack access

Parameters:

  • region (String)
  • keystone_api_fqdn (Stdlib::Fqdn)
  • os_user (String)
  • os_password (String)
  • os_project (String)
  • keystone_api_port (Stdlib::Port) (defaults to: 5000)
  • keystone_api_interface (String) (defaults to: 'public')
  • scriptpath (String) (defaults to: undef)
  • os_db_password (String) (defaults to: '')
  • yaml_mode (String) (defaults to: '0440')


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
# File 'modules/openstack/manifests/util/envscript.pp', line 2

define openstack::util::envscript(
    String       $region,
    Stdlib::Fqdn $keystone_api_fqdn,
    String       $os_user,
    String       $os_password,
    String       $os_project,
    Stdlib::Port $keystone_api_port = 5000,
    String       $keystone_api_interface = 'public',
    String       $scriptpath = undef,
    String       $os_db_password = '',
    String       $yaml_mode = '0440',
  ) {

    file { "/etc/${title}.yaml":
        content => template('openstack/util/envscript.yaml.erb'),
        mode    => $yaml_mode,
        owner   => 'root',
        group   => 'root',
    }

    $script = $scriptpath ? {
        undef   => "/usr/local/bin/${title}.sh",
        default => $scriptpath,
    }

    file { $script:
        content => template('openstack/util/envscript.sh.erb'),
        mode    => '0555',
        owner   => 'root',
        group   => 'root',
    }
}