--- - block: # Python 3 bindings for Yum are not present on RHEL 7.X images - name: Install MySQL packages command: yum -y install mariadb-server firewalld - name: Ensure firewalld is running service: name: firewalld state: started enabled: yes # Python 3 bindings for firewalld are not present on RHEL 7.X images - name: Open Firewall for MySQL use shell: | firewall-cmd --permanent --zone=public --add-service=mysql firewall-cmd --reload - name: Ensure MySQL is running at boot service: name: mariadb enabled: yes state: started - name: Setup up SQL commands template: src: files/prime.sql dest: /tmp/prime.sql mode: 400 when: mysql_root_password is defined - name: Setup root account shell: mysql