All Projects → geerlingguy → ansible-role-drupal

geerlingguy / ansible-role-drupal

Licence: MIT license
Ansible Role - Drupal

Projects that are alternatives of or similar to ansible-role-drupal

ansible-role-php-versions
Ansible Role - PHP Versions
Stars: ✭ 78 (-2.5%)
Mutual labels:  drupal, role
Ansible Role Apache
Ansible Role - Apache 2.x.
Stars: ✭ 341 (+326.25%)
Mutual labels:  lamp, role
Docksal
Unified, Docker 🐳 powered web development environment for macOS, Windows, and Linux
Stars: ✭ 505 (+531.25%)
Mutual labels:  drupal, lamp
Ansible Role Php
Ansible Role - PHP
Stars: ✭ 396 (+395%)
Mutual labels:  lamp, role
Drucker
drucker: Drupal + Docker - Spin up Drupal, Lightning or BLT in seconds.
Stars: ✭ 26 (-67.5%)
Mutual labels:  drupal, lamp
standard-edition
Roadiz CMS v1 standard edition (not-headless)
Stars: ✭ 32 (-60%)
Mutual labels:  content-management
fabalicious
is now deprecated and not supported anymore, use https://github.com/factorial-io/phabalicious instead
Stars: ✭ 14 (-82.5%)
Mutual labels:  drupal
dblog-ui
No description or website provided.
Stars: ✭ 22 (-72.5%)
Mutual labels:  drupal
learning-docker
Docker 入门指引及相关资料整理
Stars: ✭ 22 (-72.5%)
Mutual labels:  lamp
expresso-php
Fast and simple Docker setup for all your PHP development. Quick but not dirty.
Stars: ✭ 31 (-61.25%)
Mutual labels:  drupal
ansible-role-phpmyadmin
Ansible Role - phpMyAdmin
Stars: ✭ 40 (-50%)
Mutual labels:  role
WebsiteMixer-App-Base
Python/Flask alternative to Wordpress and Drupal
Stars: ✭ 18 (-77.5%)
Mutual labels:  drupal
f3-cms
PHP7 Fat-Free Framework https://fatfreeframework.com based CMS extending original https://github.com/vijinho/f3-boilerplate project and using UI-kit http://materializecss.com/
Stars: ✭ 30 (-62.5%)
Mutual labels:  lamp
mi-lamp-re
💡 Reverse Engineering Notes for the Yeelight Bedside Lamp (BLE)
Stars: ✭ 35 (-56.25%)
Mutual labels:  lamp
drupal-react-image-gallery
Drupal 8 module that provides a dynamic Image Gallery based on the react-image-gallery component.
Stars: ✭ 13 (-83.75%)
Mutual labels:  drupal
boom-core
BoomCMS core code. BoomCMS is a user friendly, WYSIWYG CMS based on Laravel. Open source and released under the MIT license.
Stars: ✭ 13 (-83.75%)
Mutual labels:  content-management
reaction-light
Easy to use reaction role Discord bot written in Python.
Stars: ✭ 108 (+35%)
Mutual labels:  role
acquia-cloud-vm
VirtualBox/Vagrant-based VM to closely match Acquia Cloud environment.
Stars: ✭ 20 (-75%)
Mutual labels:  drupal
objection-authorize
isomorphic, "magical" authorization integration with Objection.js 🎉
Stars: ✭ 71 (-11.25%)
Mutual labels:  role
drupal-tweme
Ultra lightweight Bootstrap theme for Drupal.
Stars: ✭ 62 (-22.5%)
Mutual labels:  drupal

Ansible Role: Drupal

CI

Builds and installs Drupal, an open source content management platform.

Requirements

Drupal is a PHP-based application that is meant to run behind a typical LAMP/LEMP/LEPP/etc. stack, so you'll need at least the following:

  • Apache or Nginx (Recommended: geerlingguy.apache or geerlingguy.nginx)
  • MySQL or similar Database server (Recommended: geerlingguy.mysql or geerlingguy.postgresql)
  • PHP (Recommended: geerlingguy.php along with other PHP-related roles like php-mysql).

Drush is not an absolute requirement, but it's handy to have, and also required if you use this role to Install a Drupal site (drupal_install_site: true). You can use geerlingguy.drush to install Drush.

Git is not an absolute requirement, but is required if you're deploying from a Git repository (e.g. drupal_deploy: true). You can use geerlingguy.git to install Git.

Role Variables

Available variables are listed below, along with default values (see defaults/main.yml):

Deploy an existing project with Git

drupal_deploy: false
drupal_deploy_repo: ""
drupal_deploy_version: master
drupal_deploy_update: true
drupal_deploy_dir: "/var/www/drupal"
drupal_deploy_accept_hostkey: false

Set drupal_deploy to true and drupal_build_composer* to false if you would like to deploy Drupal to your server from an existing Git repository. The other options all apply to the Git checkout operation:

  • repo: Git repository address
  • version: can be a branch, tag, or commit hash
  • update: whether the repository should be updated to the latest commit, if version is a branch
  • dir: The directory into which the repository will be checked out
  • accept_hostkey: Whether to automatically accept the Git server's hostkey on the first connection.

You can also control whether a composer install is run after the git clone is finished using the following variable:

drupal_deploy_composer_install: true

Build a project from a Drush Make file

drupal_build_makefile: false
drush_makefile_path: "/path/to/drupal.make.yml"
drush_make_options: "--no-gitinfofile"

Set this to true and drupal_build_composer* to false if you would like to build a Drupal make file with Drush.

Build a project from a Composer file

drupal_build_composer: false
drupal_composer_path: "/path/to/drupal.composer.json"
drupal_composer_install_dir: "/var/www/drupal"
drupal_composer_no_dev: true
drupal_composer_dependencies:
  - "drush/drush:^10.1"

Set drupal_build_makefile to false and this to true if you are using a Composer-based site deployment strategy. The other options should be relatively straightforward.

drupal_composer_bin_dir: "vendor/bin"

If you set the bin-dir in your project's composer.json file to a value other than vendor/bin, override this variable with the same directory path.

Create a new project using composer create-project (Composer)

drupal_build_composer_project: true
drupal_composer_project_package: "drupal/recommended-project:^9@dev"
drupal_composer_project_options: "--prefer-dist --stability dev --no-interaction"

Set this to true and drupal_build_makefile, drupal_build_composer to false if you are using Composer's create-project as a site deployment strategy.

Required Drupal site settings

drupal_core_path: "{{ drupal_deploy_dir }}/web"
drupal_core_owner: "{{ ansible_ssh_user | default(ansible_env.SUDO_USER, true) | default(ansible_env.USER, true) | default(ansible_user_id) }}"
drupal_core_owner_become: false

The path to Drupal's root, along with the ownership properties. If you are not running Ansible as the user that should have ownership over the core path, specify the desired system user in drupal_core_owner and set drupal_core_owner_become: true.

drupal_db_user: drupal
drupal_db_password: drupal
drupal_db_name: drupal
drupal_db_backend: mysql
drupal_db_host: "127.0.0.1"

Required Drupal settings. When used in a production or shared environment, you should update at least the drupal_db_password and use a secure password.

Drupal site installation options

drupal_install_site: true

Set this to false if you don't need to install Drupal (using the drupal_* settings below), but instead copy down a database (e.g. using drush sql-sync).

drupal_domain: "drupaltest.test"
drupal_site_name: "Drupal"
drupal_install_profile: standard
drupal_site_install_extra_args: []
drupal_enable_modules: []
drupal_account_name: admin
drupal_account_pass: admin

Settings for installing a Drupal site if drupal_install_site is true. If you need to pass additional arguments to the drush site-install command, you can pass them in as a list to the drupal_site_install_extra_args variable.

Dependencies

N/A

Example Playbook

See the example playbooks used for Travis CI tests (tests/test.yml and tests/test-deploy.yml) for simple examples. See also: Drupal VM, which uses this role to set up Drupal.

- hosts: webserver
  vars_files:
    - vars/main.yml
  roles:
    - geerlingguy.apache
    - geerlingguy.mysql
    - geerlingguy.php-versions
    - geerlingguy.php
    - geerlingguy.php-mysql
    - geerlingguy.composer
    - geerlingguy.drush
    - geerlingguy.drupal

Inside vars/main.yml:

drupal_install_site: true
drupal_build_composer_project: true
drupal_composer_install_dir: "/var/www/drupal"
drupal_core_path: "{{ drupal_composer_install_dir }}/web"
drupal_domain: "example.com"

License

MIT / BSD

Author Information

This role was created in 2014 by Jeff Geerling, author of Ansible for DevOps.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].