---

- name: "mediawiki database"
  mysql_db:
    name: "{{mediawiki_db_name}}"
    state: present

- name: "mediawiki user+privileges"
  mysql_user:
    name:     "{{mediawiki_db_user}}"
    password: "{{mediawiki_db_password}}"
    priv:     "{{mediawiki_db_name}}.*:ALL"
    host:     "{{item}}"
    state:    present
  with_items: "{{groups.apache}}"
