Skip to content

Commit e8b5f00

Browse files
authored
Update playbook.yml
changed to Ubuntu 2410 fixed drupal to version 13 and php to version 8.3 changed mysql to community.mysql.mysql_db and community.mysql.mysql_user fixed working dir for composer in 'Set file ownership'
1 parent 86e1bf8 commit e8b5f00

File tree

1 file changed

+29
-23
lines changed

1 file changed

+29
-23
lines changed

drupal/provisioning/playbook.yml

Lines changed: 29 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
pre_tasks:
99
- name: Update apt cache if needed.
10-
apt: update_cache=yes cache_valid_time=3600
10+
apt: update_cache=yes cache_valid_time=10
1111

1212
handlers:
1313
- name: restart apache
@@ -21,8 +21,6 @@
2121
- python3-apt
2222
- python3-pycurl
2323

24-
- name: Add ondrej repository for later versions of PHP.
25-
apt_repository: repo='ppa:ondrej/php' update_cache=yes
2624

2725
- name: "Install Apache, MySQL, PHP, and other dependencies."
2826
apt:
@@ -34,25 +32,22 @@
3432
- unzip
3533
- sendmail
3634
- apache2
37-
- php8.2-common
38-
- php8.2-cli
39-
- php8.2-dev
40-
- php8.2-gd
41-
- php8.2-curl
42-
- php8.2-opcache
43-
- php8.2-xml
44-
- php8.2-mbstring
45-
- php8.2-pdo
46-
- php8.2-mysql
47-
- php8.2-apcu
35+
- php8.3
36+
- php8.3-cli
37+
- php8.3-dev
38+
- php8.3-gd
39+
- php8.3-curl
40+
- php8.3-opcache
41+
- php8.3-xml
42+
- php8.3-mbstring
43+
- php8.3-pdo
44+
- php8.3-mysql
45+
- php8.3-apcu
4846
- libpcre3-dev
49-
- libapache2-mod-php8.2
47+
- libapache2-mod-php8.3
5048
- python3-mysqldb
5149
- mysql-server
5250

53-
- name: Disable the firewall (since this is for local dev only).
54-
service: name=ufw state=stopped
55-
5651
- name: "Start Apache, MySQL, and PHP."
5752
service: "name={{ item }} state=started enabled=yes"
5853
with_items:
@@ -86,21 +81,24 @@
8681

8782
- name: Adjust OpCache memory setting.
8883
lineinfile:
89-
dest: "/etc/php/8.2/apache2/conf.d/10-opcache.ini"
84+
dest: "/etc/php/8.3/apache2/conf.d/10-opcache.ini"
9085
regexp: "^opcache.memory_consumption"
9186
line: "opcache.memory_consumption = 96"
9287
state: present
9388
notify: restart apache
9489

9590
- name: Create a MySQL database for Drupal.
96-
mysql_db: "db={{ domain }} state=present"
91+
community.mysql.mysql_db:
92+
name: "{{ domain }}"
93+
state: present
9794

9895
- name: Create a MySQL user for Drupal.
99-
mysql_user:
96+
community.mysql.mysql_user:
10097
name: "{{ domain }}"
10198
password: "1234"
10299
priv: "{{ domain }}.*:ALL"
103100
host: localhost
101+
column_case_sensitive: true
104102
state: present
105103

106104
- name: Download Composer installer.
@@ -127,6 +125,14 @@
127125
owner: www-data
128126
group: www-data
129127

128+
- name: Set file ownership
129+
file:
130+
path: /var/www
131+
owner: www-data
132+
group: www-data
133+
mode: "0774"
134+
recurse: yes
135+
130136
- name: Check if Drupal project already exists.
131137
stat:
132138
path: "{{ drupal_core_path }}/composer.json"
@@ -144,14 +150,14 @@
144150
- name: Add drush to the Drupal site with Composer.
145151
composer:
146152
command: require
147-
arguments: drush/drush:11.*
153+
arguments: drush/drush:13.* -W
148154
working_dir: "{{ drupal_core_path }}"
149155
become_user: www-data
150156
when: not drupal_composer_json.stat.exists
151157

152158
- name: Install Drupal.
153159
command: >
154-
vendor/bin/drush si -y --site-name="{{ drupal_site_name }}"
160+
"{{ drupal_core_path }}/vendor/bin/drush" si -y --site-name="{{ drupal_site_name }}"
155161
--account-name=admin
156162
--account-pass=admin
157163
--db-url=mysql://{{ domain }}:1234@localhost/{{ domain }}

0 commit comments

Comments
 (0)