Commit 80a009db authored by Christoph Haas's avatar Christoph Haas

Added workaround for broken MySQL socket auth with PyMysql

parent 0a9658be
......@@ -39,7 +39,7 @@ Vagrant.configure(2) do |config|
# the path on the guest to mount the folder. And the optional third
# argument is a set of non-required options.
# config.vm.synced_folder "../data", "/vagrant_data"
#config.vm.synced_folder "ansible", "/root"
#config.vm.synced_folder "ansible", "/vagrant"
# Provider-specific configuration so you can fine-tune various
# backing providers for Vagrant. These expose provider-specific options.
......@@ -73,6 +73,7 @@ Vagrant.configure(2) do |config|
config.vm.provision "ansible" do |ansible|
ansible.playbook = "ansible/ispmail.yml"
#ansible.playbook = "ispmail.yml"
ansible.become = true
#ansible.become_user = 'root'
ansible.compatibility_mode = '2.0'
......@@ -97,4 +98,3 @@ Vagrant.configure(2) do |config|
# Submission
config.vm.network "forwarded_port", guest: 587, host: 10587
end
---
- name: Installing required Python mysqldb module for Ansible to manage databases
# apt: name=python-mysqldb
apt: name=python-pymysql
- name: Set root user password
become: true
# If .my.cnf already exists, this will cause an mysql-root-password update.
# - name: Set root user password
# become: true
# # If .my.cnf already exists, this will cause an mysql-root-password update.
# mysql_user:
# name: root
# password: "{{ ispmail_mysql_root_password}}"
# login_unix_socket: /var/run/mysqld/mysqld.sock
# check_implicit_admin: true
- name: Set a new root password
mysql_user:
name: root
password: "{{ ispmail_mysql_root_password}}"
check_implicit_admin: yes
user: root
password: "{{ ispmail_mysql_root_password }}"
login_unix_socket: /var/run/mysqld/mysqld.sock
check_implicit_admin: true
host: "{{ item }}"
with_items:
- localhost
- 127.0.0.1
- name: Create .my.cnf
template:
......
[client]
user=root
password={{ispmail_mysql_root_password}}
socket=/var/run/mysqld/mysqld.sock
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment