This version is compatible with:
- Puppet Enterprise 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x, 2019.0.x, 2018.1.x, 2017.3.x, 2017.2.x, 2016.4.x
- Puppet >= 4.10.0 < 7.0.0
- , ,
This module enables installing several versions of Drush system-wide.
At present the available installation method is via Composer.
Find quick install instructions in the Puppetry for Drupaleros wiki page.
These instructions are intended for people that don't have the time or the need to learn Puppet, but wants to benefit from the facilities provided by this Puppet module in order to install and manage several versions of Drush system-wide.
- Installs dist (tarball) or source code (git clone) of Drush
- Definition of Drush aliases
- Download Drush extensions
- Optionally install command dependencies (wget, git, gzip, rsync, ...)
- Configures bash integration. Only autocompletion or full integration
- Allows to choose the 'default' Drush installation
It doesn't goes crazy to provide a freaking interface to run Drush commands from Puppet. Although it is tempting, and I don't discard that in a future, it doesn't seem suitable in Puppet philosophy.
Each given Drush version is installed to a directory matching its major
/opt/drush/. Also, a symlink to the executable is placed
/usr/local/bin/, suffixed with its major version.
Additionally, for the default version,
/opt/drush/default will be a symlink
to its codebase, and
/usr/local/bin/drush will point to its executable.
For example if you choose to install Drush versions
6 the chosen default version, this is the final result on the filesystem:
d /opt/drush/master d /opt/drush/6 l /opt/drush/default -> /opt/drush/6/vendor/drush/drush d /opt/drush/.composer l /usr/local/bin/drush -> /usr/local/bin/drush6 l /usr/local/bin/drush6 -> /opt/drush/6/vendor/bin/drush l /usr/local/bin/drushmaster -> /opt/drush/master/vendor/bin/drush
With respect to other artifacts,
- Aliases are installed to
- Extensions are downloaded to
/usr/share/drush/commands, the standard Drush site-wide location
- Several shell scripts may be placed in
/etc/profile.d, depending on the provided arguments to Drush class.
Below is an example of the supported Hiera data structure.
See Puppetry for Drupaleros wiki page for an example of Puppet code not based on Hiera.
classes : - 'drush' drush::versions : - '6' - 'master' drush::extensions : - 'drush_extras' - 'registry_rebuild' drush::aliases : base: group : 'example' path_aliases : '%dump-dir' : '/opt/dumps' command_specific : sql-sync : cache: false dev : group : 'example' parent : '@base' root : '/var/www/dev.example.com/htdocs' uri : 'dev.example.com' staging : group : 'example' parent : '@base' root : '/var/www/staging.example.com/htdocs' uri : 'staging.example.com' remote_host : 'staging.example.com' remote_user : 'deploy' ssh_options : '-p 2203'
# Include the declared Hiera classes and let Puppet do the magic. hiera_include('classes')
Jonathan Araña Cruz - SB IT Media, S.L.