--- - name: setup MySQL server + Python dependencies apt: pkg={{ item }} state=present with_items: - mysql-server - python-mysqldb - name: setup MySQL databases for rookeries. mysql_db: name={{ rookeries_db.db_name }} state=present - name: add MySQL database users for rookeries. mysql_user: name={{ rookeries_db.username }} password={{ rookeries_db.password }} priv={{ rookeries_db.db_name }}:ALL