Skip to content
This repository has been archived by the owner on Feb 13, 2023. It is now read-only.

Commit

Permalink
Merge pull request #1214 from geerlingguy/1212-drush-make
Browse files Browse the repository at this point in the history
1212 drush make
  • Loading branch information
geerlingguy authored Mar 12, 2017
2 parents d96c377 + d69464e commit c9a1704
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 8 deletions.
2 changes: 1 addition & 1 deletion provisioning/requirements.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
- src: geerlingguy.daemonize
version: 1.1.1
- src: geerlingguy.drupal
version: 2.0.1
version: 2.0.4
- src: geerlingguy.drupal-console
version: 1.0.7
- src: geerlingguy.drush
Expand Down
1 change: 1 addition & 0 deletions provisioning/roles/geerlingguy.drupal/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ Set this to `true` and `drupal_build_makefile`, `drupal_build_composer` to `fals
drupal_db_password: drupal
drupal_db_name: drupal
drupal_db_backend: mysql
drupal_db_host: "127.0.0.1"

Required Drupal settings.

Expand Down
1 change: 1 addition & 0 deletions provisioning/roles/geerlingguy.drupal/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ drupal_db_user: drupal
drupal_db_password: drupal
drupal_db_name: drupal
drupal_db_backend: mysql
drupal_db_host: "127.0.0.1"

# Settings for installing a Drupal site if 'drupal_install_site:' is 'true'.
drupal_domain: "drupaltest.dev"
Expand Down
18 changes: 11 additions & 7 deletions provisioning/roles/geerlingguy.drupal/tasks/install-site.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
- name: Check if site is already installed.
command: >
{{ drush_path }} status bootstrap
chdir={{ drupal_core_path }}
command: "{{ drush_path }} --root={{ drupal_core_path }} status bootstrap"
args:
chdir: "{{ drupal_core_path }}"
register: drupal_site_installed
failed_when: "drupal_site_installed.stdout is undefined"
changed_when: false
Expand All @@ -21,19 +21,23 @@
- name: Install Drupal with drush.
command: >
{{ drush_path }} site-install {{ drupal_install_profile | default('standard') }} -y
--root={{ drupal_core_path }}
--site-name="{{ drupal_site_name }}"
--account-name={{ drupal_account_name }}
--account-pass={{ drupal_account_pass }}
--db-url={{ drupal_db_backend }}://{{ drupal_db_user }}:{{ drupal_db_password }}@localhost/{{ drupal_db_name }}
--db-url={{ drupal_db_backend }}://{{ drupal_db_user }}:{{ drupal_db_password }}@{{ drupal_db_host }}/{{ drupal_db_name }}
{{ drupal_site_install_extra_args | default([]) | join(" ") }}
chdir={{ drupal_core_path }}
args:
chdir: "{{ drupal_core_path }}"
notify: restart webserver
when: "'Successful' not in drupal_site_installed.stdout"
become: no

- name: Install configured modules with drush.
command: >
{{ drush_path }} pm-enable -y {{ drupal_enable_modules | join(" ") }}
chdir={{ drupal_core_path }}
when: "'Successful' not in drupal_site_installed.stdout"
--root={{ drupal_core_path }}
args:
chdir: "{{ drupal_core_path }}"
when: ('Successful' not in drupal_site_installed.stdout) and drupal_enable_modules
become: no
4 changes: 4 additions & 0 deletions provisioning/roles/geerlingguy.drupal/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,17 @@
# Build makefile if configured.
- include: tasks/build-makefile.yml
when: drupal_build_makefile
static: no

# Build with composer if configured.
- include: tasks/build-composer.yml
when: drupal_build_composer
static: no

# Build a composer project if configured.
- include: tasks/build-composer-project.yml
when: drupal_build_composer_project
static: no

# Set Drush variables.
- name: Check if a project specific Drush binary exists.
Expand All @@ -38,3 +41,4 @@
# Install site if configured.
- include: tasks/install-site.yml
when: drupal_install_site
static: no
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@
- src: geerlingguy.php
- src: geerlingguy.php-mysql
- src: geerlingguy.php-pgsql
- src: geerlingguy.git
- src: geerlingguy.composer
- src: geerlingguy.drush
1 change: 1 addition & 0 deletions provisioning/roles/geerlingguy.drupal/tests/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
- geerlingguy.mysql
- geerlingguy.php
- geerlingguy.php-mysql
- geerlingguy.git
- geerlingguy.composer
- geerlingguy.drush
- role_under_test

0 comments on commit c9a1704

Please sign in to comment.