From 4bec1260625d438c3491128b7c66776a908c6438 Mon Sep 17 00:00:00 2001 From: Jeff Geerling Date: Thu, 20 Aug 2020 12:45:33 -0500 Subject: [PATCH] Fixes #2078: Remove drupal-console. --- README.md | 2 - default.config.yml | 1 - docs/extras/drupal-console.md | 65 ------------------- docs/other/wordpress-other-applications.md | 2 +- mkdocs.yml | 1 - provisioning/playbook.yml | 1 - provisioning/requirements.yml | 2 - .../geerlingguy.drupal-console/.gitignore | 2 - .../geerlingguy.drupal-console/.travis.yml | 28 -------- .../roles/geerlingguy.drupal-console/LICENSE | 20 ------ .../geerlingguy.drupal-console/README.md | 45 ------------- .../defaults/main.yml | 4 -- .../geerlingguy.drupal-console/meta/main.yml | 44 ------------- .../geerlingguy.drupal-console/tasks/main.yml | 45 ------------- .../tests/README.md | 11 ---- .../tests/requirements.yml | 2 - .../tests/test-self-update.yml | 16 ----- .../geerlingguy.drupal-console/tests/test.yml | 19 ------ 18 files changed, 1 insertion(+), 309 deletions(-) delete mode 100644 docs/extras/drupal-console.md delete mode 100644 provisioning/roles/geerlingguy.drupal-console/.gitignore delete mode 100644 provisioning/roles/geerlingguy.drupal-console/.travis.yml delete mode 100644 provisioning/roles/geerlingguy.drupal-console/LICENSE delete mode 100644 provisioning/roles/geerlingguy.drupal-console/README.md delete mode 100644 provisioning/roles/geerlingguy.drupal-console/defaults/main.yml delete mode 100644 provisioning/roles/geerlingguy.drupal-console/meta/main.yml delete mode 100644 provisioning/roles/geerlingguy.drupal-console/tasks/main.yml delete mode 100644 provisioning/roles/geerlingguy.drupal-console/tests/README.md delete mode 100644 provisioning/roles/geerlingguy.drupal-console/tests/requirements.yml delete mode 100644 provisioning/roles/geerlingguy.drupal-console/tests/test-self-update.yml delete mode 100644 provisioning/roles/geerlingguy.drupal-console/tests/test.yml diff --git a/README.md b/README.md index bedf7bd7e..fc89041fd 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,6 @@ Drupal VM installs the following on an Ubuntu 18.04 (by default) linux VM: - MySQL (or MariaDB, or PostgreSQL) - Drupal 7, 8, or 9 - Optional: - - Drupal Console - Drush - Varnish - Apache Solr @@ -108,7 +107,6 @@ By default, this VM includes the extras listed in the `config.yml` option `insta installed_extras: - adminer # - blackfire - # - drupalconsole - drush # - elasticsearch # - java diff --git a/default.config.yml b/default.config.yml index 6e59a7444..52fd23a5f 100644 --- a/default.config.yml +++ b/default.config.yml @@ -211,7 +211,6 @@ postgresql_databases: installed_extras: - adminer # - blackfire - # - drupalconsole - drush # - elasticsearch # - java diff --git a/docs/extras/drupal-console.md b/docs/extras/drupal-console.md deleted file mode 100644 index a671c829f..000000000 --- a/docs/extras/drupal-console.md +++ /dev/null @@ -1,65 +0,0 @@ -[Drupal Console](https://drupalconsole.com/) is a modern CLI for interacting with Drupal and scaffolding a site. It works only with Drupal 8+, and is built on top of the Symfony Console component. - -To have Drupal Console installed globally inside Drupal VM, make sure `drupalconsole` is in the list of `installed_extras` in your `config.yml` file. If you're adding it to an existing Drupal VM, run `vagrant provision` so it gets installed. You also (or instead) might want to add Drupal Console as a dependency of your Drupal project—if you do this, you may not need to add `drupalconsole` to Drupal VM globally. - -To use Drupal Console with a Drupal 8 site (in this case, using the default configuration that ships with Drupal VM): - - 1. Log into the VM with `vagrant ssh`. - 2. Change directory to the Drupal site's document root: `cd /var/www/drupalvm/drupal/web`. - 3. Use Drupal console (e.g. `drupal cache:rebuild all`). - -You should see an output like: - -``` -vagrant@drupalvm:/var/www/drupalvm/drupal/web$ drupal cache:rebuild all - -[+] Rebuilding cache(s), wait a moment please. -[+] Done clearing cache(s). - - The command was executed successfully! -``` - -## Remote command execution using `--target` - -To run commands on your host computer but execute them on the VM, add a new sites file `~/.console/sites/drupalvm.yml` on your host computer: - -```yaml -dev: - root: /var/www/drupalvm/drupal - host: 192.168.88.88 - password: vagrant - type: ssh - extra-options: '-o PasswordAuthentication=no -i ~/.vagrant.d/insecure_private_key' -``` - -Execute from host machine using the `--target` option. - - drupal --target=drupalvm.test site:status - -or - - drupal @drupalvm.test site:status - -For more details, see [Drupal Console's documentation](https://docs.drupalconsole.com/en/alias/how-to-use-drupal-console-in-a-remote-installation.html) - -For a list of available role variables, see the [`geerlingguy.drupal-console` Ansible role's README](https://github.com/geerlingguy/ansible-role-drupal-console#readme). - -## Remote command execution using `vagrant-exec` - -You can use [`vagrant-exec`](https://github.com/p0deje/vagrant-exec) to execute commands remotely through Vagrant, and if you can't get Console to work with `--target`, you might want to try doing this (it's more convenient than logging into the VM just to run a Drupal VM command!). - -First, install the plugin: - - vagrant plugin install vagrant-exec - -Add the following to a `Vagrantfile.local` in your project (set `directory` to your drupal docroot): - -```ruby -if Vagrant.has_plugin?('vagrant-exec') - config.exec.commands '*', directory: '/var/www/drupal' -end -``` - -Now you can execute any Drupal Console command—even interactive ones!—from the host: - - vagrant exec bin/drupal generate:module diff --git a/docs/other/wordpress-other-applications.md b/docs/other/wordpress-other-applications.md index 5714db435..f59a489b0 100644 --- a/docs/other/wordpress-other-applications.md +++ b/docs/other/wordpress-other-applications.md @@ -34,7 +34,7 @@ drupal_build_composer_project: false drupal_install_site: false configure_drush_aliases: false -# Remove some Drupal extras such as `drupalconsole` and `drush` +# Remove some Drupal extras such as `drush` installed_extras: - adminer - mailhog diff --git a/mkdocs.yml b/mkdocs.yml index 1f2a3da0f..cbffd9d80 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -40,7 +40,6 @@ pages: - Installed extras: - 'adminer (Database UI)': 'extras/adminer.md' - 'blackfire (Profiling tool)': 'extras/blackfire.md' - - 'drupalconsole (Drupal CLI)': 'extras/drupal-console.md' - 'drush (Drupal CLI)': 'extras/drush.md' - 'elasticsearch (Search engine)': 'extras/elasticsearch.md' - 'java': 'extras/java.md' diff --git a/provisioning/playbook.yml b/provisioning/playbook.yml index f16a160f2..966f8bb83 100644 --- a/provisioning/playbook.yml +++ b/provisioning/playbook.yml @@ -50,7 +50,6 @@ - { role: geerlingguy.php-pgsql, when: drupal_db_backend == 'pgsql', tags: ['php', 'database'] } # Conditionally-installed roles. - - { role: geerlingguy.drupal-console, when: 'drupal_major_version > 7 and "drupalconsole" in installed_extras' } - { role: geerlingguy.drush, when: '"drush" in installed_extras' } - { role: geerlingguy.memcached, when: '"memcached" in installed_extras' } - { role: geerlingguy.php-memcached, when: '"memcached" in installed_extras', tags: ['php'] } diff --git a/provisioning/requirements.yml b/provisioning/requirements.yml index f5aea5596..8d75bc0a0 100644 --- a/provisioning/requirements.yml +++ b/provisioning/requirements.yml @@ -20,8 +20,6 @@ roles: version: 1.2.1 - name: geerlingguy.drupal version: 4.1.0 - - name: geerlingguy.drupal-console - version: 1.1.1 - name: geerlingguy.drush version: 3.1.2 - name: geerlingguy.elasticsearch diff --git a/provisioning/roles/geerlingguy.drupal-console/.gitignore b/provisioning/roles/geerlingguy.drupal-console/.gitignore deleted file mode 100644 index c9b2377e3..000000000 --- a/provisioning/roles/geerlingguy.drupal-console/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -*.retry -tests/test.sh diff --git a/provisioning/roles/geerlingguy.drupal-console/.travis.yml b/provisioning/roles/geerlingguy.drupal-console/.travis.yml deleted file mode 100644 index 38bb908c1..000000000 --- a/provisioning/roles/geerlingguy.drupal-console/.travis.yml +++ /dev/null @@ -1,28 +0,0 @@ ---- -services: docker - -env: - - distro: ubuntu1604 - playbook: test.yml - - distro: ubuntu1404 - playbook: test.yml - - distro: ubuntu1604 - playbook: test-self-update.yml - -script: - # Configure test script so we can run extra tests after playbook is run. - - export container_id=$(date +%s) - - export cleanup=false - - # Download test shim. - - wget -O ${PWD}/tests/test.sh https://gist.githubusercontent.com/geerlingguy/73ef1e5ee45d8694570f334be385e181/raw/ - - chmod +x ${PWD}/tests/test.sh - - # Run tests. - - ${PWD}/tests/test.sh - - # Ensure Drupal Console is installed and working. - - 'docker exec --tty ${container_id} env TERM=xterm drupal list || true' - -notifications: - webhooks: https://galaxy.ansible.com/api/v1/notifications/ diff --git a/provisioning/roles/geerlingguy.drupal-console/LICENSE b/provisioning/roles/geerlingguy.drupal-console/LICENSE deleted file mode 100644 index 4275cf3c1..000000000 --- a/provisioning/roles/geerlingguy.drupal-console/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2017 Jeff Geerling - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/provisioning/roles/geerlingguy.drupal-console/README.md b/provisioning/roles/geerlingguy.drupal-console/README.md deleted file mode 100644 index 0a46b09c7..000000000 --- a/provisioning/roles/geerlingguy.drupal-console/README.md +++ /dev/null @@ -1,45 +0,0 @@ -# Ansible Role: Drupal Console - -[![Build Status](https://travis-ci.org/geerlingguy/ansible-role-drupal-console.svg?branch=master)](https://travis-ci.org/geerlingguy/ansible-role-drupal-console) - -Installs [Drupal Console](http://drupalconsole.com/) on any Linux or UNIX system. - -## Requirements - -`php` (version 5.6+) should be installed and working. - -## Role Variables - -Available variables are listed below, along with default values (see `defaults/main.yml`): - - drupal_console_path: /usr/local/bin/drupal - -The path where Drupal Console will be installed and available to your system. Should be in your user's `$PATH` so you can use Drupal Console by entering `drupal` instead of the full path. - - drupal_console_keep_updated: false - -By default, this role not update Drupal Console when it is run again. If you'd like always update Drupal Console to the latest version when this role is run, switch this variable to `true`. - - drupal_console_config: ~/.console - -The path to the Drupal Console configuration file. - -## Dependencies - - - geerlingguy.php (Installs PHP). - -## Example Playbook - - - hosts: servers - roles: - - role: geerlingguy.drupal-console - -After the playbook runs, `drupal` will be placed in `/usr/local/bin/drupal` (this location is configurable), and will be accessible via normal system accounts. - -## License - -MIT / BSD - -## Author Information - -This role was created in 2015 by [Jeff Geerling](https://www.jeffgeerling.com/), author of [Ansible for DevOps](https://www.ansiblefordevops.com/). diff --git a/provisioning/roles/geerlingguy.drupal-console/defaults/main.yml b/provisioning/roles/geerlingguy.drupal-console/defaults/main.yml deleted file mode 100644 index 5885c7a4e..000000000 --- a/provisioning/roles/geerlingguy.drupal-console/defaults/main.yml +++ /dev/null @@ -1,4 +0,0 @@ ---- -drupal_console_path: /usr/local/bin/drupal -drupal_console_keep_updated: false -drupal_console_config: ~/.console diff --git a/provisioning/roles/geerlingguy.drupal-console/meta/main.yml b/provisioning/roles/geerlingguy.drupal-console/meta/main.yml deleted file mode 100644 index 9b13c630c..000000000 --- a/provisioning/roles/geerlingguy.drupal-console/meta/main.yml +++ /dev/null @@ -1,44 +0,0 @@ ---- -dependencies: - - geerlingguy.php - -galaxy_info: - author: geerlingguy - description: Drupal Console - company: "Midwestern Mac, LLC" - license: "license (BSD, MIT)" - min_ansible_version: 1.8 - platforms: - - name: EL - versions: - - all - - name: GenericUNIX - versions: - - all - - name: Fedora - versions: - - all - - name: opensuse - versions: - - all - - name: GenericBSD - versions: - - all - - name: FreeBSD - versions: - - all - - name: Ubuntu - versions: - - all - - name: SLES - versions: - - all - - name: GenericLinux - versions: - - all - - name: Debian - versions: - - all - galaxy_tags: - - packaging - - web diff --git a/provisioning/roles/geerlingguy.drupal-console/tasks/main.yml b/provisioning/roles/geerlingguy.drupal-console/tasks/main.yml deleted file mode 100644 index 0a413085d..000000000 --- a/provisioning/roles/geerlingguy.drupal-console/tasks/main.yml +++ /dev/null @@ -1,45 +0,0 @@ ---- -- name: Ensure pip is available for an extra dependency on Ubuntu 14.04. - package: - name: "{{ item }}" - state: present - with_items: - - python-pip - - python-openssl - - python-pyasn1 - when: - - ansible_distribution == 'Ubuntu' - - ansible_distribution_version == '14.04' - -- name: Upgrade setuptools on Ubuntu 14.04. - pip: - name: setuptools - state: latest - when: - - ansible_distribution == 'Ubuntu' - - ansible_distribution_version == '14.04' - -- name: Ensure ndg-httpsclient is available on Ubuntu 14.04. - pip: - name: ndg-httpsclient - state: present - when: - - ansible_distribution == 'Ubuntu' - - ansible_distribution_version == '14.04' - -- name: Install Drupal Console. - get_url: - url: https://drupalconsole.com/installer - dest: "{{ drupal_console_path }}" - -- name: Ensure Drupal Console is executable. - file: - path: "{{ drupal_console_path }}" - mode: 0755 - -- name: Update Drupal Console to latest version (if configured). - shell: > - php {{ drupal_console_path }} self-update - register: drupal_console_update - changed_when: "'console has been updated' in drupal_console_update.stdout" - when: drupal_console_keep_updated diff --git a/provisioning/roles/geerlingguy.drupal-console/tests/README.md b/provisioning/roles/geerlingguy.drupal-console/tests/README.md deleted file mode 100644 index 6fb211721..000000000 --- a/provisioning/roles/geerlingguy.drupal-console/tests/README.md +++ /dev/null @@ -1,11 +0,0 @@ -# Ansible Role tests - -To run the test playbook(s) in this directory: - - 1. Install and start Docker. - 1. Download the test shim (see .travis.yml file for the URL) into `tests/test.sh`: - - `wget -O tests/test.sh https://gist.githubusercontent.com/geerlingguy/73ef1e5ee45d8694570f334be385e181/raw/` - 1. Make the test shim executable: `chmod +x tests/test.sh`. - 1. Run (from the role root directory) `distro=[distro] playbook=[playbook] ./tests/test.sh` - -If you don't want the container to be automatically deleted after the test playbook is run, add the following environment variables: `cleanup=false container_id=$(date +%s)` diff --git a/provisioning/roles/geerlingguy.drupal-console/tests/requirements.yml b/provisioning/roles/geerlingguy.drupal-console/tests/requirements.yml deleted file mode 100644 index de297a054..000000000 --- a/provisioning/roles/geerlingguy.drupal-console/tests/requirements.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -- src: geerlingguy.php diff --git a/provisioning/roles/geerlingguy.drupal-console/tests/test-self-update.yml b/provisioning/roles/geerlingguy.drupal-console/tests/test-self-update.yml deleted file mode 100644 index 78b4fe2f7..000000000 --- a/provisioning/roles/geerlingguy.drupal-console/tests/test-self-update.yml +++ /dev/null @@ -1,16 +0,0 @@ ---- -- hosts: all - - vars: - php_enable_webserver: false - drupal_console_keep_updated: true - - pre_tasks: - - name: Update apt cache. - apt: update_cache=yes cache_valid_time=600 - when: ansible_os_family == 'Debian' - changed_when: false - - roles: - - geerlingguy.php - - role_under_test diff --git a/provisioning/roles/geerlingguy.drupal-console/tests/test.yml b/provisioning/roles/geerlingguy.drupal-console/tests/test.yml deleted file mode 100644 index b920c8d5b..000000000 --- a/provisioning/roles/geerlingguy.drupal-console/tests/test.yml +++ /dev/null @@ -1,19 +0,0 @@ ---- -- hosts: all - - vars: - php_enable_webserver: false - - pre_tasks: - - name: Update apt cache. - apt: update_cache=yes cache_valid_time=600 - when: ansible_os_family == 'Debian' - changed_when: false - - - name: Add repository for PHP 7.0 (Ubuntu). - apt_repository: repo='ppa:ondrej/php' - when: ansible_distribution == "Ubuntu" and ansible_distribution_version != "16.04" - - roles: - - geerlingguy.php - - role_under_test