Move db details into a file

This commit is contained in:
Oliver Davies 2019-01-22 20:11:15 +00:00
parent d1251ca92c
commit fe1640c5b8
2 changed files with 7 additions and 3 deletions

View file

@ -11,16 +11,17 @@
vars_files:
- vars/main.yml
- ../vars/main.yml
tasks:
- name: Create a database
mysql_db:
name: drupal
name: '{{ app_db_name }}'
state: present
- name: Add the database user
mysql_user:
name: drupal
password: drupal
name: '{{ app_db_user }}'
password: '{{ app_db_password }}'
priv: '*.*:ALL'
state: present

3
ansible/vars/main.yml Normal file
View file

@ -0,0 +1,3 @@
app_db_name: drupal
app_db_user: drupal
app_db_password: drupal