Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix and update for the PHP version #601

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 35 additions & 16 deletions drupal/provisioning/playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,19 @@
- unzip
- sendmail
- apache2
- php8.2-common
- php8.2-cli
- php8.2-dev
- php8.2-gd
- php8.2-curl
- php8.2-opcache
- php8.2-xml
- php8.2-mbstring
- php8.2-pdo
- php8.2-mysql
- php8.2-apcu
- php8.3-common
- php8.3-cli
- php8.3-dev
- php8.3-gd
- php8.3-curl
- php8.3-opcache
- php8.3-xml
- php8.3-mbstring
- php8.3-pdo
- php8.3-mysql
- php8.3-apcu
- libpcre3-dev
- libapache2-mod-php8.2
- libapache2-mod-php8.3
- python3-mysqldb
- mysql-server

Expand Down Expand Up @@ -86,9 +86,9 @@

- name: Adjust OpCache memory setting.
lineinfile:
dest: "/etc/php/8.2/apache2/conf.d/10-opcache.ini"
dest: "/etc/php/8.3/apache2/conf.d/10-opcache.ini"
regexp: "^opcache.memory_consumption"
line: "opcache.memory_consumption = 96"
line: "opcache.memory_consumption = 128"
state: present
notify: restart apache

Expand Down Expand Up @@ -127,6 +127,13 @@
owner: www-data
group: www-data

- name: Ensure home dir has correct owner.
file:
path: "{{ wwwdata_home_path }}"
state: directory
owner: www-data
group: www-data

- name: Check if Drupal project already exists.
stat:
path: "{{ drupal_core_path }}/composer.json"
Expand All @@ -141,13 +148,25 @@
become_user: www-data
when: not drupal_composer_json.stat.exists

- name: Check if Drush already exists.
stat:
path: "{{ drupal_core_path }}/vendor/bin/drush"
register: drush_binary

- name: Install dependencies using composer.
composer:
command: install
working_dir: "{{ drupal_core_path }}"
become_user: www-data
when: not drupal_composer_json.stat.exists

- name: Add drush to the Drupal site with Composer.
composer:
command: require
arguments: drush/drush:11.*
arguments: drush/drush:13.*
working_dir: "{{ drupal_core_path }}"
become_user: www-data
when: not drupal_composer_json.stat.exists
when: not drush_binary.stat.exists

- name: Install Drupal.
command: >
Expand Down
1 change: 1 addition & 0 deletions drupal/provisioning/vars.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
# The path where Drupal will be downloaded and installed.
drupal_core_path: "/var/www/drupal"
wwwdata_home_path: "/var/www"

# The resulting domain will be [domain].test (with .test appended).
domain: "drupal"
Expand Down
Loading