Skip to content
Snippets Groups Projects
Commit 41805363 authored by jurgenhaas's avatar jurgenhaas
Browse files

Installation, configuration and update

parent 216299b7
No related branches found
No related tags found
No related merge requests found
---
# file: roles/drupalconsole/handlers/main.yml
- name: "Init Drupalconsole"
shell: drupal init --override
become_user: '{{ item }}'
with_flattened:
- [ 'root' ]
- '{{ admins }}'
- '{{ jailusers }}'
- name: "Fish autocomplete for Drupalconsole"
file:
src='~/.console/drupal.fish'
dest='~/.config/fish/completions/drupal.fish'
state='link'
mode='644'
become_user: '{{ item }}'
with_flattened:
- '{{ admins }}'
- '{{ jailusers }}'
---
dependencies:
- { role: common, when: ignore_these_tasks is defined }
---
# file: roles/drupalconsole/tasks/install.yml
# Run this in your terminal to get the latest project version:
curl https://drupalconsole.com/installer -L -o drupal.phar
# Accessing from anywhere on your system:
mv drupal.phar /usr/local/bin/drupal
# Apply executable permissions on the downloaded file:
chmod +x /usr/local/bin/drupal
# Copy configuration files to user home directory:
drupal init --override
# Check and validate system requirements
drupal check
- name: "Download"
get_url:
dest: '/usr/local/bin/drupal'
url: 'https://drupalconsole.com/installer'
force: yes
owner: 'root'
group: 'root'
mode: '0755'
notify:
- "Init Drupalconsole"
- "Fish autocomplete for Drupalconsole"
---
# file: roles/drupalconsole/tasks/main.yml
# Update DrupalConsole to the latest version:
drupal self-update
- name: "Check Installation Requirement"
shell: ls /usr/local/bin/drupal
register: drupalconsole_available
failed_when: false
- include: install.yml
when: drupalconsole_available is defined and drupalconsole_available.stdout != '/usr/local/bin/drupal'
- name: "Update to latest version"
shell: drupal self-update
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment