Forge Home

drupal

Install and manage Drupal including modules and sites.

18,152 downloads

128 latest version

5.0 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 4.1.0 (latest)
  • 4.0.1
  • 4.0.0
  • 3.3.0
  • 3.2.0
  • 3.1.0
  • 3.0.2
  • 3.0.1
  • 3.0.0
  • 2.0.0
  • 1.2.1
  • 1.2.0
  • 1.1.0
  • 1.0.0
released Apr 20th 2024
This version is compatible with:
  • Puppet Enterprise 2023.8.x, 2023.7.x, 2023.6.x, 2023.5.x, 2023.4.x, 2023.3.x, 2023.2.x, 2023.1.x, 2023.0.x, 2021.7.x, 2021.6.x, 2021.5.x, 2021.4.x, 2021.3.x, 2021.2.x, 2021.1.x, 2021.0.x, 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
  • Puppet >= 5.0.0 < 9.0.0
  • ,

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'tohuwabohu-drupal', '4.1.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add tohuwabohu-drupal
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install tohuwabohu-drupal --version 4.1.0

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download
Tags: drupal, drush

Documentation

tohuwabohu/drupal — version 4.1.0 Apr 20th 2024

drupal

License build-and-test Puppet Forge Puppet Forge - downloads

Overview

Install and manage different versions of Drupal including modules and sites.

Usage

The module uses Drush and the Drush makefiles to manage a Drupal site configuration. So everytime any of the Puppet configuration changes, the whole site will be rebuild from ground. To be able to do this, the site configuration (settings.php) and files have to be kept outside of the actual Drupal site. Furthermore, multi-site configurations are currently not supported.

The structure of the three major properties (modules, themes and libraries) translates directly to the Drush makefile format. See here for an example of the possible configuration.

Install Drupal 7 with a bunch of modules, a theme and a library:

drupal::site { 'example.com':
  core_version => '7.32',
  modules      => {
    'ctools'   => '1.4',
    'token'    => '1.5',
    'pathauto' => '1.2',
    'views'    => '3.8',
  },
  themes       => {
    'omega' => '4.3',
  },
  libraries    => {
    'jquery_ui' => {
      'download' => {
        'type' => 'file',
        'url'  => 'http://jquery-ui.googlecode.com/files/jquery.ui-1.6.zip',
        'md5'  => 'c177d38bc7af59d696b2efd7dda5c605',
      },
    },
  },
}

Install Drupal 6:

drupal::site { 'example.com':
  core_version => '6.33',
}

Install a module from a custom location:

drupal::site { 'example.com':
  modules => {
    'cck'   => {
      'download' => {
        'type' => 'file',
        'url'  => 'http://ftp.drupal.org/files/projects/cck-6.x-2.9.tar.gz',
        'md5'  => '9e30f22592b7ecf08d020e0c626efc5b',
      },
    },
  },
}

Apply a patch:

drupal::site { 'example.com':
  modules => {
    'pathauto' => {
      'version' => '1.2',
      'patch'   => [
        'https://www.drupal.org/files/pathauto_admin.patch'
      ],
    },
  },
}

Install the jquery_ui library into sites/all/modules/jquery_ui/jquery.ui as opposed to sites/all/libraries/jquery_ui.

drupal::site { 'example.com':
  libraries => {
    'jquery_ui' => {
      'download'       => {
        'type' => 'file',
        'url'  => 'https://www.dropbox.com/s/kcg4l39c3bqgee1/jquery.ui-1.6.zip',
        'md5'  => 'c177d38bc7af59d696b2efd7dda5c605',
      },
      'destination'    => 'modules/jquery_ui',
      'directory_name' => 'jquery.ui',
    },
  },
}

Configure the cron job:

drupal::site { 'example.com':
  cron_email_address => 'webmaster',
}

Disable the cron job (e.g. if it is managed separately):

drupal::site { 'example.com':
  cron_file_ensure => absent,
}

Limitations

Drupal-specific

  • No multi-sites support
  • No backup configuration
  • Drupal site configuration (settings.xml) has to be provided

The module has been tested on the following operating systems. Testing and patches for other platforms are welcome.

  • Debian 9.0 (Stretch)
  • Debian 10.0 (Buster)
  • Ubuntu 18.04 (Bionic Beaver)
  • Ubuntu 20.04 (Focal Fossa)

Build Status

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Development

This project uses rspec-puppet and beaker to ensure the module works as expected and to prevent regressions.

gem install bundler
bundle install --path vendor

bundle exec rake spec
bundle exec rake beaker

(note: see Beaker - Supported ENV variables for a list of environment variables to control the default behaviour of Beaker)