You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
70 lines
1.6 KiB
70 lines
1.6 KiB
- name: Shopware Dependencies
|
|
package:
|
|
name:
|
|
- unzip
|
|
- nginx
|
|
- php7.4-fpm
|
|
- php7.4-mysql
|
|
- php7.4-json
|
|
- php7.4-curl
|
|
- php7.4-gd
|
|
- php7.4-xml
|
|
- php7.4-zip
|
|
- php7.4-opcache
|
|
- php7.4-mbstring
|
|
- php7.4-intl
|
|
- php7.4-cli
|
|
- mariadb-server
|
|
- python3-pymysql
|
|
state: latest
|
|
|
|
- name: Copy my.cnf
|
|
copy:
|
|
src: ../my.cnf
|
|
dest: /etc/mysql/my.cnf
|
|
|
|
- name: update mariadb root user
|
|
mysql_user:
|
|
login_unix_socket: /var/run/mysqld/mysqld.sock
|
|
login_user: "{{shopware_root_username}}"
|
|
login_password: "{{shopware_root_pass}}"
|
|
name: "{{shopware_root_username}}"
|
|
password: "{{shopware_root_pass}}"
|
|
check_implicit_admin: yes
|
|
state: present
|
|
|
|
- name: Restart service httpd, in all cases
|
|
ansible.builtin.service:
|
|
name: mariadb
|
|
state: restarted
|
|
|
|
- name: Make sure service is started and enabled
|
|
systemd:
|
|
name: mariadb
|
|
state: started
|
|
enabled: yes
|
|
|
|
- name: Remove the SQL test database
|
|
community.mysql.mysql_db:
|
|
db: "test"
|
|
state: absent
|
|
config_file: /etc/mysql/my.cnf
|
|
|
|
- name: Create Database
|
|
become: yes
|
|
community.mysql.mysql_db:
|
|
name: shopware
|
|
state: present
|
|
config_file: /etc/mysql/my.cnf
|
|
|
|
- name: Create user with password, all database privileges and 'WITH GRANT OPTION' shopware database
|
|
become: yes
|
|
community.mysql.mysql_user:
|
|
login_user: "{{shopware_root_username}}"
|
|
login_password: "{{shopware_root_pass}}"
|
|
state: present
|
|
name: "{{shopware_db_username}}"
|
|
password: "{{shopware_db_pass}}"
|
|
priv:
|
|
'shopware.*': 'ALL,GRANT'
|
|
|