Module undine
In: /vagrant/modules/undine/lib/puppet/parser/functions/create_drupal_db_resources_hash.rb
/vagrant/modules/undine/lib/puppet/parser/functions/create_drupal_files_dir_resources_hash.rb
/vagrant/modules/undine/lib/puppet/parser/functions/create_drupal_settings_file_resources_hash.rb
/vagrant/modules/undine/lib/puppet/parser/functions/get_project_basepath.rb
/vagrant/modules/undine/lib/puppet/parser/functions/get_project_name.rb
/vagrant/modules/undine/manifests/drupal_codebase.pp
/vagrant/modules/undine/manifests/drupal_db.pp
/vagrant/modules/undine/manifests/drupal_files_dir.pp
/vagrant/modules/undine/manifests/drupal_settings_file.pp
/vagrant/modules/undine/manifests/drupal_site.pp
/vagrant/modules/undine/manifests/drupal_sites_file.pp
/vagrant/modules/undine/manifests/init.pp
/vagrant/modules/undine/lib/puppet/parser/functions/create_drupal_db_resources_hash.rb
/vagrant/modules/undine/lib/puppet/parser/functions/create_drupal_files_dir_resources_hash.rb
/vagrant/modules/undine/lib/puppet/parser/functions/create_drupal_settings_file_resources_hash.rb
/vagrant/modules/undine/lib/puppet/parser/functions/get_project_basepath.rb
/vagrant/modules/undine/lib/puppet/parser/functions/get_project_name.rb
/vagrant/modules/undine/manifests/drupal_codebase.pp
/vagrant/modules/undine/manifests/drupal_db.pp
/vagrant/modules/undine/manifests/drupal_files_dir.pp
/vagrant/modules/undine/manifests/drupal_settings_file.pp
/vagrant/modules/undine/manifests/drupal_site.pp
/vagrant/modules/undine/manifests/drupal_sites_file.pp
/vagrant/modules/undine/manifests/init.pp

Defines

Plugins

create_drupal_db_resources_hash   create_drupal_files_dir_resources_hash   create_drupal_settings_file_resources_hash   get_project_basepath   get_project_name   create_drupal_db_resources_hash   create_drupal_files_dir_resources_hash   create_drupal_settings_file_resources_hash   get_project_basepath   get_project_name  

Classes and Modules

Class undine::undine

Defines

drupal_codebase( $git_source => 'undef', $core_version => 'undef', $known_host_key => 'undef', $path => 'title', $remotes => 'undef', $hostname => 'undef', $branch => 'undef' )

Define: drupal_codebase

A resource representing a single Drupal codebase in Undine, which may or may not be shared in a multisite configuration.

Because Drupal codebases are home to one or more sites each with their own database, those looking to use Undine to create a fully-functional Drupal site must also declare an undine::drupal_site associated with the codebase. See the usage of undine:drupal_site for more information and examples.

Parameters

path
The destination path in which the site will be created. Defaults to the resource title.
core_version
The version of Drupal core to use when creating the site if it doesn‘t exist. May be a major version (7), a minor version (7.24), or a development branch (7.x). Mutually exclusive with git_source.
git_source
The full URI of the Git repository of the source code to use. Mutually exclusive with core_version.
branch
Optional. The branch to checkout of the Git repository. Defaults to HEAD.
hostname
Optional. The hostname of the repository to whitelist when using Git with SSH. Must be defined along with known_host_key.
known_host_key
Optional. The key of the repository to add to known_hosts for use with Git via SSH. Must be defined along with hostname.
remotes
Optional. A hash of remotes for this repository, keyed by the name of the remote with a hash representing the remote as a value. These hash keys and values are the same as those used in undine_git::remote (with repo_path automatically populated using the value of path).

Examples

Retrieving the lastest stable version of Drupal 7.

  undine::drupal_codebase { '/var/www/example':
    core_version => '7',
  }

Retrieving the lastest development branch of Drupal 7.

  undine::drupal_codebase { '/var/www/example':
    core_version => '7.x',
  }

Retrieving a specific minor release of Drupal core.

  undine::drupal_codebase { '/var/www/example':
    core_version => '7.14',
  }

Retrieving a third-party Drupal distribution via Git.

  undine::drupal_codebase { '/var/www/example':
    git_source => "http://git.example.com/project/example.git"
  }

Retrieving a third-party distribution via SSH, with a defined branch and an associated known_host entry. Also declares an additional remote for the repo.

  undine::drupal_codebase { '/var/www/example':
    git_source => "ssh://maintainer@git.example.com/project/example.git"
    branch => '7.x-1.x',
    hostname => 'git.example.com',
    known_host_key => '|1|nddsvUkIUHNdM31TTSc+sPT57yg=|nQqEyJJthk/DTVaRmJW ...',
    remotes => {
       "example_remote" => {
         remote_uri => 'user@git2.example.com:example.git',
         hostname => 'git2.example.com',
         known_host_key => '|1|nddsvUkIUHNdM31TTSc+sPT57yg=|nQqEyJJthk/DTVaRmJW ...',
      },
    },
  }
drupal_codebase( $git_source => 'undef', $core_version => 'undef', $known_host_key => 'undef', $path => 'title', $remotes => 'undef', $hostname => 'undef', $branch => 'undef' )

Define: drupal_codebase

A resource representing a single Drupal codebase in Undine, which may or may not be shared in a multisite configuration.

Because Drupal codebases are home to one or more sites each with their own database, those looking to use Undine to create a fully-functional Drupal site must also declare an undine::drupal_site associated with the codebase. See the usage of undine:drupal_site for more information and examples.

Parameters

path
The destination path in which the site will be created. Defaults to the resource title.
core_version
The version of Drupal core to use when creating the site if it doesn‘t exist. May be a major version (7), a minor version (7.24), or a development branch (7.x). Mutually exclusive with git_source.
git_source
The full URI of the Git repository of the source code to use. Mutually exclusive with core_version.
branch
Optional. The branch to checkout of the Git repository. Defaults to HEAD.
hostname
Optional. The hostname of the repository to whitelist when using Git with SSH. Must be defined along with known_host_key.
known_host_key
Optional. The key of the repository to add to known_hosts for use with Git via SSH. Must be defined along with hostname.
remotes
Optional. A hash of remotes for this repository, keyed by the name of the remote with a hash representing the remote as a value. These hash keys and values are the same as those used in undine_git::remote (with repo_path automatically populated using the value of path).

Examples

Retrieving the lastest stable version of Drupal 7.

  undine::drupal_codebase { '/var/www/example':
    core_version => '7',
  }

Retrieving the lastest development branch of Drupal 7.

  undine::drupal_codebase { '/var/www/example':
    core_version => '7.x',
  }

Retrieving a specific minor release of Drupal core.

  undine::drupal_codebase { '/var/www/example':
    core_version => '7.14',
  }

Retrieving a third-party Drupal distribution via Git.

  undine::drupal_codebase { '/var/www/example':
    git_source => "http://git.example.com/project/example.git"
  }

Retrieving a third-party distribution via SSH, with a defined branch and an associated known_host entry. Also declares an additional remote for the repo.

  undine::drupal_codebase { '/var/www/example':
    git_source => "ssh://maintainer@git.example.com/project/example.git"
    branch => '7.x-1.x',
    hostname => 'git.example.com',
    known_host_key => '|1|nddsvUkIUHNdM31TTSc+sPT57yg=|nQqEyJJthk/DTVaRmJW ...',
    remotes => {
       "example_remote" => {
         remote_uri => 'user@git2.example.com:example.git',
         hostname => 'git2.example.com',
         known_host_key => '|1|nddsvUkIUHNdM31TTSc+sPT57yg=|nQqEyJJthk/DTVaRmJW ...',
      },
    },
  }
drupal_db( $driver => 'mysql', $src_hostname => 'undef', $src_ssh_user => 'undef', $su_user => 'root', $src_db_name => 'undef', $src_db_pass => 'undef', $database => 'title', $src_ssh_known_host_key => 'undef', $su_pass => 'undef', $username, $src_db_user => 'undef', $password )
drupal_db( $driver => 'mysql', $src_hostname => 'undef', $src_ssh_user => 'undef', $su_user => 'root', $src_db_name => 'undef', $src_db_pass => 'undef', $database => 'title', $src_ssh_known_host_key => 'undef', $su_pass => 'undef', $username, $src_db_user => 'undef', $password )
drupal_files_dir( $path => 'title', $src_type => 'undef', $src_details => 'undef' )
drupal_files_dir( $path => 'title', $src_type => 'undef', $src_details => 'undef' )
drupal_settings_file( $unset => 'undef', $base_url => 'undef', $update_free_access => 'undef', $path => 'title', $databases, $conf => 'undef', $cookie_domain => 'undef', $hash_salt => 'undef' )

Define: drupal_settings_file

The drupal_settings_file resource represents an individual settings.php file (or potentially, an include for another settings.php file in the same format) for use with Drupal 7.

Parameters

path
The path to the file to manage. Defaults to the resource label.
databases
A hash of database connections. The keys correspond to Drupal connection keys, a unique identifier for a given database connection as defined in drupal.org/node/310071. At least one of these keys must be named "default." Each value corresponds to a hash of one or more targets (alternate databases to be used if available).

Each target is itself a hash, with the key corresponding to the target‘s unique identifier. As with connection keys, there must be at least one target key named "default." The value of each target is a series of key-value pairs defining the connection information, as one would in settings.php.

update_free_access
Optional. A boolean dictating whether update.php should be freely accessible to all visitors. Defaults to FALSE.
hash_salt
Optional. The salt used to hash passwords.
cookie_domain
Optional. The domain to use for session cookies, starting with a leading dot (per RFC 2109).
base_url
Optional. The absolute URL for your Drupal installation, without a trailing slash.
conf
Optional. A hash containing key-value pairs for default values that should exist in the variables table.
unset
Optional. An array of PHP variables to unset before any other configuration is written. Most commonly used in conditionally included files.

Examples

  undine::drupal_settings_file { '/var/www/mysite/sites/default/settings.php':
    unset => [
      "$conf['my_var']",
      "$conf['my_other_var']",
    ],
    databases => {
      'default' => {
        'default' => {
          'driver' => 'mysql',
          'database' => 'my_db',
          'username' => 'db_user',
          'password' => 'correcthorsebatterystaple',
          'host' => 'localhost',
          'prefix' => 'mysite_',
          'collation' => 'utf8_general_ci',
        },
      },
    },
    update_free_access => false,
    hash_salt => 'p3pp3r',
    cookie_domain => '.example.com',
    base_url => 'http://example.com/mysite',
    conf => {
      'some_other_var' => '1',
    }
  }
drupal_settings_file( $unset => 'undef', $base_url => 'undef', $update_free_access => 'undef', $path => 'title', $databases, $conf => 'undef', $cookie_domain => 'undef', $hash_salt => 'undef' )

Define: drupal_settings_file

The drupal_settings_file resource represents an individual settings.php file (or potentially, an include for another settings.php file in the same format) for use with Drupal 7.

Parameters

path
The path to the file to manage. Defaults to the resource label.
databases
A hash of database connections. The keys correspond to Drupal connection keys, a unique identifier for a given database connection as defined in drupal.org/node/310071. At least one of these keys must be named "default." Each value corresponds to a hash of one or more targets (alternate databases to be used if available).

Each target is itself a hash, with the key corresponding to the target‘s unique identifier. As with connection keys, there must be at least one target key named "default." The value of each target is a series of key-value pairs defining the connection information, as one would in settings.php.

update_free_access
Optional. A boolean dictating whether update.php should be freely accessible to all visitors. Defaults to FALSE.
hash_salt
Optional. The salt used to hash passwords.
cookie_domain
Optional. The domain to use for session cookies, starting with a leading dot (per RFC 2109).
base_url
Optional. The absolute URL for your Drupal installation, without a trailing slash.
conf
Optional. A hash containing key-value pairs for default values that should exist in the variables table.
unset
Optional. An array of PHP variables to unset before any other configuration is written. Most commonly used in conditionally included files.

Examples

  undine::drupal_settings_file { '/var/www/mysite/sites/default/settings.php':
    unset => [
      "$conf['my_var']",
      "$conf['my_other_var']",
    ],
    databases => {
      'default' => {
        'default' => {
          'driver' => 'mysql',
          'database' => 'my_db',
          'username' => 'db_user',
          'password' => 'correcthorsebatterystaple',
          'host' => 'localhost',
          'prefix' => 'mysite_',
          'collation' => 'utf8_general_ci',
        },
      },
    },
    update_free_access => false,
    hash_salt => 'p3pp3r',
    cookie_domain => '.example.com',
    base_url => 'http://example.com/mysite',
    conf => {
      'some_other_var' => '1',
    }
  }
drupal_site( $settings => 'undef', $path => 'title', $databases, $files => 'undef' )

Declare default values for drupal_db resources.

drupal_site( $settings => 'undef', $path => 'title', $databases, $files => 'undef' )

Declare default values for drupal_db resources.

drupal_sites_file( $path => 'title', $sites )

Define: drupal_sites_file

The drupal_sites_file resource represents an individual sites.php file (or potentially, an include for another settings.php file in the same format) for use with Drupal 7.

Parameters

path
The path to the file to manage. Defaults to the resource label.
sites
A hash mapping hostnames, ports, and pathnames to configuration directories in the Drupal sites directory. URL mappings (keys in the hash) are in the format ’<port>.<domain>.<path.to.site>’, while the corresponding directory values are relative to the sites directory of the Drupal install.

Examples

Maps localhost:8080/example/foo to the example subdirectory of sites.

  undine::drupal_sites_file { '/var/www/mysite/sites/sites.php':
    sites => {
      '8080.localhost.example' => 'example',
    }
  }
drupal_sites_file( $path => 'title', $sites )

Define: drupal_sites_file

The drupal_sites_file resource represents an individual sites.php file (or potentially, an include for another settings.php file in the same format) for use with Drupal 7.

Parameters

path
The path to the file to manage. Defaults to the resource label.
sites
A hash mapping hostnames, ports, and pathnames to configuration directories in the Drupal sites directory. URL mappings (keys in the hash) are in the format ’<port>.<domain>.<path.to.site>’, while the corresponding directory values are relative to the sites directory of the Drupal install.

Examples

Maps localhost:8080/example/foo to the example subdirectory of sites.

  undine::drupal_sites_file { '/var/www/mysite/sites/sites.php':
    sites => {
      '8080.localhost.example' => 'example',
    }
  }

[Validate]