Compare commits

..

3 commits

Author SHA1 Message Date
bronsen
74e978886c [playbook,mysql] fix database URI
it has a "double slash" but only one colon
2025-03-03 22:09:48 +01:00
bronsen
b29daca8a3 [playbook,drupal] install actually installable version of drupal and drush 2025-03-03 22:09:04 +01:00
bronsen
d6b902e204 [playbook] install (php-)composer from debian 2025-03-03 22:05:03 +01:00

View file

@ -51,6 +51,7 @@
- libapache2-mod-php8.2
- python3-mysqldb
- default-mysql-server
- composer
- name: Install the firewall
ansible.builtin.apt:
@ -119,21 +120,6 @@
host: localhost
state: present
- name: Download Composer installer.
ansible.builtin.get_url:
url: https://getcomposer.org/installer
dest: /tmp/composer-installer.php
mode: "0755"
- name: Run Composer installer.
ansible.builtin.command: >
php composer-installer.php
chdir=/tmp
creates=/usr/local/bin/composer
- name: Mov Composer into globally-accessible location.
ansible.builtin.command: >
mv /tmp/composer.phar /usr/local/bin/composer
creates=/usr/local/bin/composer
- name: Ensure Drupal directory exists.
ansible.builtin.file:
path: "{{ drupal_core_path }}"
@ -148,7 +134,7 @@
- name: Create Drupal project.
community.general.composer:
command: create-project
arguments: drupal/recommended-project:^9 "{{ drupal_core_path }}"
arguments: drupal/recommended-project:^10 "{{ drupal_core_path }}"
working_dir: "{{ drupal_core_path }}"
no_dev: true
become_user: www-data
@ -165,7 +151,7 @@
- name: Add drush to the Drupal site with composer.
community.general.composer:
command: require
arguments: "drush/drush:^11"
arguments: "drush/drush"
working_dir: "{{ drupal_core_path }}"
become_user: www-data
when: not drupal_composer_json.stat.exists
@ -175,7 +161,7 @@
vendor/bin/drush si -y --site-name="{{ drupal_site_name }}"
--account-name=admin
--account-pass=admin
--db-url=mysql:://{{ domain }}:1234@localhost/{{ domain }}
--db-url=mysql://{{ domain }}:1234@localhost/{{ domain }}
--root={{ drupal_core_path }}/web
chdir={{ drupal_core_path }}
creates={{ drupal_core_path }}/web/sites/default/settings.php