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.
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 ...', }, }, }
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.
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 ...', }, }, }
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.
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.
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', } }
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.
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.
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', } }
Declare default values for drupal_db resources.
Declare default values for drupal_db resources.
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.
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', } }
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.
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', } }