This file is indexed.

/usr/share/puppet/modules.available/openstacklib/manifests/db/mysql.pp is in puppet-module-openstacklib 9.4.0-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 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
# == Definition: openstacklib::db::mysql
#
# This resource configures a mysql database for an OpenStack service
#
# == Parameters:
#
#  [*password_hash*]
#    Password hash to use for the database user for this service;
#    string; required
#
#  [*dbname*]
#    The name of the database
#    string; optional; default to the $title of the resource, i.e. 'nova'
#
#  [*user*]
#    The database user to create;
#    string; optional; default to the $title of the resource, i.e. 'nova'
#
#  [*host*]
#    The IP address or hostname of the user in mysql_grant;
#    string; optional; default to '127.0.0.1'
#
#  [*charset*]
#    The charset to use for the database;
#    string; optional; default to 'utf8'
#
#  [*collate*]
#    The collate to use for the database;
#    string; optional; default to 'utf8_general_ci'
#
#  [*allowed_hosts*]
#    Additional hosts that are allowed to access this database;
#    array or string; optional; default to undef
#
#  [*privileges*]
#    Privileges given to the database user;
#    string or array of strings; optional; default to 'ALL'

define openstacklib::db::mysql (
  $password_hash,
  $dbname         = $title,
  $user           = $title,
  $host           = '127.0.0.1',
  $charset        = 'utf8',
  $collate        = 'utf8_general_ci',
  $allowed_hosts  = [],
  $privileges     = 'ALL',
) {

  include ::mysql::server
  include ::mysql::client

  mysql_database { $dbname:
    ensure  => present,
    charset => $charset,
    collate => $collate,
    require => [ Class['mysql::server'], Class['mysql::client'] ],
  }

  $allowed_hosts_list = unique(concat(any2array($allowed_hosts), [$host]))
  $real_allowed_hosts = prefix($allowed_hosts_list, "${dbname}_")

  openstacklib::db::mysql::host_access { $real_allowed_hosts:
    user          => $user,
    password_hash => $password_hash,
    database      => $dbname,
    privileges    => $privileges,
  }
}