NBCUTechnology / pubstack

⛔️ [DEPRECATED] Publisher's DevStack
MIT License
8 stars 8 forks source link

Move Database creation outside of mysql role #150

Closed ericduran closed 7 years ago

ericduran commented 9 years ago

Right now we have:

- name: create site database
  mysql_db: name={{ item.shortname }} state=present collation=utf8_general_ci
  with_items: sites
  when: sites is defined

- name: create database user
  mysql_user: name={{ item.shortname }} password= priv={{ item.shortname }}.*:ALL host=% state=present
  with_items: sites
  when: sites is defined

This should be in the drupal role. This came up when running the percona stuff on the CI boxes I don't do the drupal role but this still ran, which is fine just probably shouldn't be there.

conortm commented 9 years ago

Agreed. Furthermore, what if we separate out the database into its own element of the site's config. That way, for sites that don't need a db (i.e. a patternlab install), we just leave it out. Thoughts?

ericduran commented 9 years ago

@conortm even better.

scottrigby commented 9 years ago

yeah good idea. I like separating db creation into the drupal role. Making db creation a config could be good, but it just saves an additional DB at the expense of making the config more complicated (which we didn't want)…

cweagans commented 9 years ago

Homestead solves this by having database creation outside of the provisioning scripts, which I'm rather fond of, as it only requires a vagrant reload, rather than a vagrant provision. It would move us in the direction of being able to package a base box, too.

rabellamy commented 7 years ago

See #194