├── .github ├── FUNDING.yml └── stale.yml ├── .gitignore ├── .travis.yml ├── .yamllint ├── LICENSE ├── README.md ├── defaults └── main.yml ├── meta └── main.yml ├── molecule └── default │ ├── converge.yml │ ├── molecule.yml │ ├── playbook-self-update.yml │ └── requirements.yml └── tasks └── main.yml /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | --- 3 | github: geerlingguy 4 | patreon: geerlingguy 5 | -------------------------------------------------------------------------------- /.github/stale.yml: -------------------------------------------------------------------------------- 1 | # Configuration for probot-stale - https://github.com/probot/stale 2 | 3 | # Number of days of inactivity before an Issue or Pull Request becomes stale 4 | daysUntilStale: 90 5 | 6 | # Number of days of inactivity before an Issue or Pull Request with the stale label is closed. 7 | # Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale. 8 | daysUntilClose: 30 9 | 10 | # Only issues or pull requests with all of these labels are check if stale. Defaults to `[]` (disabled) 11 | onlyLabels: [] 12 | 13 | # Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable 14 | exemptLabels: 15 | - pinned 16 | - security 17 | - planned 18 | 19 | # Set to true to ignore issues in a project (defaults to false) 20 | exemptProjects: false 21 | 22 | # Set to true to ignore issues in a milestone (defaults to false) 23 | exemptMilestones: false 24 | 25 | # Set to true to ignore issues with an assignee (defaults to false) 26 | exemptAssignees: false 27 | 28 | # Label to use when marking as stale 29 | staleLabel: stale 30 | 31 | # Limit the number of actions per hour, from 1-30. Default is 30 32 | limitPerRun: 30 33 | 34 | pulls: 35 | markComment: |- 36 | This pull request has been marked 'stale' due to lack of recent activity. If there is no further activity, the PR will be closed in another 30 days. Thank you for your contribution! 37 | 38 | Please read [this blog post](https://www.jeffgeerling.com/blog/2020/enabling-stale-issue-bot-on-my-github-repositories) to see the reasons why I mark pull requests as stale. 39 | 40 | unmarkComment: >- 41 | This pull request is no longer marked for closure. 42 | 43 | closeComment: >- 44 | This pull request has been closed due to inactivity. If you feel this is in error, please reopen the pull request or file a new PR with the relevant details. 45 | 46 | issues: 47 | markComment: |- 48 | This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution! 49 | 50 | Please read [this blog post](https://www.jeffgeerling.com/blog/2020/enabling-stale-issue-bot-on-my-github-repositories) to see the reasons why I mark issues as stale. 51 | 52 | unmarkComment: >- 53 | This issue is no longer marked for closure. 54 | 55 | closeComment: >- 56 | This issue has been closed due to inactivity. If you feel this is in error, please reopen the issue or file a new issue with the relevant details. 57 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.retry 2 | */__pycache__ 3 | *.pyc 4 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | --- 2 | language: python 3 | services: docker 4 | 5 | env: 6 | global: 7 | - ROLE_NAME: drupal-console 8 | matrix: 9 | - MOLECULE_DISTRO: ubuntu1604 10 | - MOLECULE_DISTRO: ubuntu1604 11 | MOLECULE_PLAYBOOK: playbook-self-update.yml 12 | 13 | before_install: 14 | # Upgrade Docker to work with docker-py. 15 | - curl https://gist.githubusercontent.com/geerlingguy/ce883ad4aec6a5f1187ef93bd338511e/raw/36612d28981d92863f839c5aefe5b7dd7193d6c6/travis-ci-docker-upgrade.sh | sudo bash 16 | 17 | install: 18 | # Install test dependencies. 19 | - pip install molecule yamllint ansible-lint docker 20 | 21 | before_script: 22 | # Use actual Ansible Galaxy role name for the project directory. 23 | - cd ../ 24 | - mv ansible-role-$ROLE_NAME geerlingguy.$ROLE_NAME 25 | - cd geerlingguy.$ROLE_NAME 26 | 27 | script: 28 | # Run tests. 29 | - molecule test 30 | 31 | notifications: 32 | webhooks: https://galaxy.ansible.com/api/v1/notifications/ 33 | -------------------------------------------------------------------------------- /.yamllint: -------------------------------------------------------------------------------- 1 | --- 2 | extends: default 3 | 4 | rules: 5 | line-length: 6 | max: 120 7 | level: warning 8 | 9 | ignore: | 10 | .github/stale.yml 11 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2017 Jeff Geerling 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Ansible Role: Drupal Console 2 | 3 | > **DEPRECATED**: This role is deprecated. Please install Drupal Console into your Drupal project directly with `composer require drupal/console`, or use Drush instead. 4 | 5 | [![Build Status](https://travis-ci.org/geerlingguy/ansible-role-drupal-console.svg?branch=master)](https://travis-ci.org/geerlingguy/ansible-role-drupal-console) 6 | 7 | Installs [Drupal Console](http://drupalconsole.com/) on any Linux or UNIX system. 8 | 9 | ## Requirements 10 | 11 | `php` (version 5.6+) should be installed and working. 12 | 13 | ## Role Variables 14 | 15 | Available variables are listed below, along with default values (see `defaults/main.yml`): 16 | 17 | drupal_console_path: /usr/local/bin/drupal 18 | 19 | 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. 20 | 21 | drupal_console_keep_updated: false 22 | 23 | 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`. 24 | 25 | drupal_console_config: ~/.console 26 | 27 | The path to the Drupal Console configuration file. 28 | 29 | ## Dependencies 30 | 31 | - geerlingguy.php (Installs PHP). 32 | 33 | ## Example Playbook 34 | 35 | - hosts: servers 36 | roles: 37 | - role: geerlingguy.drupal-console 38 | 39 | 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. 40 | 41 | ## License 42 | 43 | MIT / BSD 44 | 45 | ## Author Information 46 | 47 | This role was created in 2015 by [Jeff Geerling](https://www.jeffgeerling.com/), author of [Ansible for DevOps](https://www.ansiblefordevops.com/). 48 | -------------------------------------------------------------------------------- /defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | drupal_console_path: /usr/local/bin/drupal 3 | drupal_console_keep_updated: false 4 | drupal_console_config: ~/.console 5 | -------------------------------------------------------------------------------- /meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | dependencies: 3 | - geerlingguy.php 4 | 5 | galaxy_info: 6 | # See: https://github.com/ansible/galaxy/issues/2393 7 | # role_name: drupal-console 8 | author: geerlingguy 9 | description: Drupal Console 10 | company: "Midwestern Mac, LLC" 11 | license: "license (BSD, MIT)" 12 | min_ansible_version: 2.4 13 | platforms: 14 | - name: EL 15 | versions: 16 | - all 17 | - name: GenericUNIX 18 | versions: 19 | - all 20 | - name: Fedora 21 | versions: 22 | - all 23 | - name: opensuse 24 | versions: 25 | - all 26 | - name: GenericBSD 27 | versions: 28 | - all 29 | - name: FreeBSD 30 | versions: 31 | - all 32 | - name: Ubuntu 33 | versions: 34 | - all 35 | - name: SLES 36 | versions: 37 | - all 38 | - name: GenericLinux 39 | versions: 40 | - all 41 | - name: Debian 42 | versions: 43 | - all 44 | galaxy_tags: 45 | - packaging 46 | - web 47 | - drupal 48 | - cli 49 | - symfony 50 | - console 51 | -------------------------------------------------------------------------------- /molecule/default/converge.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Converge 3 | hosts: all 4 | become: true 5 | 6 | vars: 7 | php_enable_webserver: false 8 | 9 | pre_tasks: 10 | - name: Update apt cache. 11 | apt: update_cache=yes cache_valid_time=600 12 | when: ansible_os_family == 'Debian' 13 | changed_when: false 14 | 15 | - name: Add repository for PHP 7.0 (Ubuntu). 16 | apt_repository: repo='ppa:ondrej/php' 17 | when: ansible_distribution == "Ubuntu" and ansible_distribution_version != "16.04" 18 | 19 | roles: 20 | - role: geerlingguy.php 21 | - role: geerlingguy.drupal-console 22 | -------------------------------------------------------------------------------- /molecule/default/molecule.yml: -------------------------------------------------------------------------------- 1 | --- 2 | dependency: 3 | name: galaxy 4 | driver: 5 | name: docker 6 | lint: | 7 | set -e 8 | yamllint . 9 | ansible-lint 10 | platforms: 11 | - name: instance 12 | image: "geerlingguy/docker-${MOLECULE_DISTRO:-centos7}-ansible:latest" 13 | command: ${MOLECULE_DOCKER_COMMAND:-""} 14 | volumes: 15 | - /sys/fs/cgroup:/sys/fs/cgroup:ro 16 | privileged: true 17 | pre_build_image: true 18 | provisioner: 19 | name: ansible 20 | playbooks: 21 | converge: ${MOLECULE_PLAYBOOK:-converge.yml} 22 | -------------------------------------------------------------------------------- /molecule/default/playbook-self-update.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Converge 3 | hosts: all 4 | become: true 5 | 6 | vars: 7 | php_enable_webserver: false 8 | drupal_console_keep_updated: true 9 | 10 | pre_tasks: 11 | - name: Update apt cache. 12 | apt: update_cache=yes cache_valid_time=600 13 | when: ansible_os_family == 'Debian' 14 | changed_when: false 15 | 16 | roles: 17 | - role: geerlingguy.php 18 | - role: geerlingguy.drupal-console 19 | -------------------------------------------------------------------------------- /molecule/default/requirements.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - src: geerlingguy.php 3 | -------------------------------------------------------------------------------- /tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Ensure pip is available for an extra dependency on Ubuntu 14.04. 3 | package: 4 | name: "{{ item }}" 5 | state: present 6 | with_items: 7 | - python-pip 8 | - python-openssl 9 | - python-pyasn1 10 | when: 11 | - ansible_distribution == 'Ubuntu' 12 | - ansible_distribution_version == '14.04' 13 | 14 | - name: Upgrade setuptools on Ubuntu 14.04. 15 | pip: 16 | name: setuptools 17 | state: latest 18 | when: 19 | - ansible_distribution == 'Ubuntu' 20 | - ansible_distribution_version == '14.04' 21 | tags: ['skip_ansible_lint'] 22 | 23 | - name: Ensure ndg-httpsclient is available on Ubuntu 14.04. 24 | pip: 25 | name: ndg-httpsclient 26 | state: present 27 | when: 28 | - ansible_distribution == 'Ubuntu' 29 | - ansible_distribution_version == '14.04' 30 | 31 | - name: Install Drupal Console. 32 | get_url: 33 | url: https://drupalconsole.com/installer 34 | dest: "{{ drupal_console_path }}" 35 | 36 | - name: Ensure Drupal Console is executable. 37 | file: 38 | path: "{{ drupal_console_path }}" 39 | mode: 0755 40 | 41 | - name: Update Drupal Console to latest version (if configured). 42 | command: php {{ drupal_console_path }} self-update 43 | register: drupal_console_update 44 | changed_when: "'console has been updated' in drupal_console_update.stdout" 45 | when: drupal_console_keep_updated 46 | --------------------------------------------------------------------------------