28 lines
525 B
YAML
28 lines
525 B
YAML
---
|
|
- hosts: dransible
|
|
become: true
|
|
|
|
roles:
|
|
- geerlingguy.apache
|
|
- geerlingguy.mysql
|
|
- geerlingguy.php
|
|
- geerlingguy.php-mysql
|
|
- geerlingguy.composer
|
|
|
|
vars_files:
|
|
- vars/vault.yml
|
|
- vars/vars.yml
|
|
|
|
tasks:
|
|
- name: Create a database
|
|
mysql_db:
|
|
name: '{{ database_name }}'
|
|
state: present
|
|
|
|
- name: Add the database user
|
|
mysql_user:
|
|
name: '{{ database_user }}'
|
|
password: '{{ database_password }}'
|
|
priv: '*.*:ALL'
|
|
state: present
|