author | ymh <ymh.work@gmail.com> |
Tue, 20 Mar 2018 15:02:40 +0100 | |
changeset 573 | 25f3d28f51b2 |
parent 353 | bf1bc6b08c46 |
permissions | -rw-r--r-- |
353
bf1bc6b08c46
correct provisioning to install drush and correct config files + module definition for menu access problem
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
1 |
class drush::config { |
bf1bc6b08c46
correct provisioning to install drush and correct config files + module definition for menu access problem
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
2 |
|
bf1bc6b08c46
correct provisioning to install drush and correct config files + module definition for menu access problem
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
3 |
#private() |
bf1bc6b08c46
correct provisioning to install drush and correct config files + module definition for menu access problem
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
4 |
if $caller_module_name != $module_name { |
bf1bc6b08c46
correct provisioning to install drush and correct config files + module definition for menu access problem
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
5 |
warning("${name} is not part of the public API of the ${module_name} \ |
bf1bc6b08c46
correct provisioning to install drush and correct config files + module definition for menu access problem
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
6 |
module and should not be directly included in the manifest.") |
bf1bc6b08c46
correct provisioning to install drush and correct config files + module definition for menu access problem
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
7 |
} |
bf1bc6b08c46
correct provisioning to install drush and correct config files + module definition for menu access problem
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
8 |
|
bf1bc6b08c46
correct provisioning to install drush and correct config files + module definition for menu access problem
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
9 |
# Bash integration and autocompletion based on the default version. |
bf1bc6b08c46
correct provisioning to install drush and correct config files + module definition for menu access problem
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
10 |
validate_bool($drush::bash_integration, |
bf1bc6b08c46
correct provisioning to install drush and correct config files + module definition for menu access problem
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
11 |
$drush::bash_autocompletion |
bf1bc6b08c46
correct provisioning to install drush and correct config files + module definition for menu access problem
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
12 |
) |
bf1bc6b08c46
correct provisioning to install drush and correct config files + module definition for menu access problem
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
13 |
if $drush::bash_integration { |
bf1bc6b08c46
correct provisioning to install drush and correct config files + module definition for menu access problem
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
14 |
file { '/etc/profile.d/drushrc.sh': |
bf1bc6b08c46
correct provisioning to install drush and correct config files + module definition for menu access problem
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
15 |
ensure => link, |
bf1bc6b08c46
correct provisioning to install drush and correct config files + module definition for menu access problem
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
16 |
target => "${drush::install_base_path}/default/examples/example.bashrc", |
bf1bc6b08c46
correct provisioning to install drush and correct config files + module definition for menu access problem
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
17 |
} |
bf1bc6b08c46
correct provisioning to install drush and correct config files + module definition for menu access problem
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
18 |
} |
bf1bc6b08c46
correct provisioning to install drush and correct config files + module definition for menu access problem
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
19 |
elsif $drush::bash_autocompletion { |
bf1bc6b08c46
correct provisioning to install drush and correct config files + module definition for menu access problem
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
20 |
file { '/etc/bash_completion.d/drush': |
bf1bc6b08c46
correct provisioning to install drush and correct config files + module definition for menu access problem
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
21 |
ensure => link, |
bf1bc6b08c46
correct provisioning to install drush and correct config files + module definition for menu access problem
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
22 |
target => "${drush::install_base_path}/default/drush.complete.sh", |
bf1bc6b08c46
correct provisioning to install drush and correct config files + module definition for menu access problem
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
23 |
} |
bf1bc6b08c46
correct provisioning to install drush and correct config files + module definition for menu access problem
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
24 |
} |
bf1bc6b08c46
correct provisioning to install drush and correct config files + module definition for menu access problem
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
25 |
|
bf1bc6b08c46
correct provisioning to install drush and correct config files + module definition for menu access problem
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
26 |
# Create aliases. |
bf1bc6b08c46
correct provisioning to install drush and correct config files + module definition for menu access problem
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
27 |
validate_hash($drush::aliases) |
bf1bc6b08c46
correct provisioning to install drush and correct config files + module definition for menu access problem
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
28 |
create_resources(drush::alias, $drush::aliases) |
bf1bc6b08c46
correct provisioning to install drush and correct config files + module definition for menu access problem
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
29 |
|
bf1bc6b08c46
correct provisioning to install drush and correct config files + module definition for menu access problem
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
30 |
# Install extensions. |
bf1bc6b08c46
correct provisioning to install drush and correct config files + module definition for menu access problem
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
31 |
validate_array($drush::extensions) |
bf1bc6b08c46
correct provisioning to install drush and correct config files + module definition for menu access problem
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
32 |
drush::extension{ $drush::extensions: } |
bf1bc6b08c46
correct provisioning to install drush and correct config files + module definition for menu access problem
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
33 |
|
bf1bc6b08c46
correct provisioning to install drush and correct config files + module definition for menu access problem
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
34 |
} |
bf1bc6b08c46
correct provisioning to install drush and correct config files + module definition for menu access problem
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
35 |