Created
March 3, 2015 17:49
-
-
Save andriyun/a1abdac79b8eaafd307a to your computer and use it in GitHub Desktop.
VDD Reinstall playbook
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- hosts: drupal_dev | |
vars: | |
document_root: d7 | |
admin_user: root | |
admin_pass: root | |
db_name: d7 | |
db_user: root | |
db_pass: root | |
disable_modules: overlay toolbar | |
enable_modules1: admin_menu | |
enable_modules2: admin_menu_toolbar | |
tasks: | |
- name: Changing permission before delete | |
file: path=/var/www/{{ document_root }} state=directory mode=777 recurse=yes | |
sudo: yes | |
- name: Deleting project | |
file: path=/var/www/{{ document_root }} state=absent | |
- name: Downloading drupal | |
shell: "drush dl drupal-7 --drupal-project-rename='{{ document_root }}' --destination='/var/www'" | |
- name: Droping drupal database | |
mysql_db: name={{ db_name }} state=absent login_user={{ db_user }} login_password={{ db_pass }} | |
- name: Creating drupal database | |
mysql_db: name={{ db_name }} state=present login_user={{ db_user }} login_password={{ db_pass }} | |
- name: Installing drupal | |
shell: "drush -y si standard --db-url=mysql://{{ db_user }}:{{ db_pass }}@127.0.0.1:/{{ db_name }} --account-name={{ admin_user }} --account-pass={{ admin_pass }}" | |
args: | |
chdir: /var/www/{{ document_root }} | |
- name: Disabling modules | |
shell: "drush dis {{ disable_modules }} -y" | |
args: | |
chdir: /var/www/{{ document_root }} | |
- name: Enabling modules step 1 | |
shell: "drush en {{ enable_modules1 }} -y" | |
args: | |
chdir: /var/www/{{ document_root }} | |
- name: Enabling modules step 2 | |
shell: "drush en {{ enable_modules2 }} -y" | |
args: | |
chdir: /var/www/{{ document_root }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment