--- - yum: name={{ item }} state=installed with_items: - mariadb-server - template: src=custom.cnf dest=/etc/my.cnf.d/custom.cnf notify: restart mariadb - service: name=mariadb enabled=yes state=started