From 143376df8bc97a0bd394311a66075c2792e0a499 Mon Sep 17 00:00:00 2001 From: Andrew Klychkov Date: Fri, 23 Apr 2021 10:22:13 +0200 Subject: [PATCH 1/7] mysql: revert changes made in PR 116 --- plugins/module_utils/mysql.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/module_utils/mysql.py b/plugins/module_utils/mysql.py index 67e00331..5af9c202 100644 --- a/plugins/module_utils/mysql.py +++ b/plugins/module_utils/mysql.py @@ -79,7 +79,7 @@ def mysql_connect(module, login_user=None, login_password=None, config_file='', if login_user is not None: config['user'] = login_user if login_password is not None: - config['password'] = login_password + config['passwd'] = login_password if ssl_cert is not None: config['ssl']['cert'] = ssl_cert if ssl_key is not None: @@ -87,7 +87,7 @@ def mysql_connect(module, login_user=None, login_password=None, config_file='', if ssl_ca is not None: config['ssl']['ca'] = ssl_ca if db is not None: - config['database'] = db + config['db'] = db if connect_timeout is not None: config['connect_timeout'] = connect_timeout if check_hostname is not None: From 3e5ec52763d5a8685b44df781415467b7c3775ac Mon Sep 17 00:00:00 2001 From: Andrew Klychkov Date: Fri, 23 Apr 2021 10:27:22 +0200 Subject: [PATCH 2/7] Add changelog fragment --- changelogs/fragments/153-mysql_revert_connector_changes.yml | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 changelogs/fragments/153-mysql_revert_connector_changes.yml diff --git a/changelogs/fragments/153-mysql_revert_connector_changes.yml b/changelogs/fragments/153-mysql_revert_connector_changes.yml new file mode 100644 index 00000000..48c8b36b --- /dev/null +++ b/changelogs/fragments/153-mysql_revert_connector_changes.yml @@ -0,0 +1,2 @@ +bugfixes: +- mysql - revert changes of connector arguments made in pull request 116 causing the invalid keyword argument error (https://github.com/ansible-collections/community.mysql/pull/116). From 302d35d8c34d4119f41cdcdd4a14035b7a2e4206 Mon Sep 17 00:00:00 2001 From: Andrew Klychkov Date: Fri, 23 Apr 2021 11:16:12 +0200 Subject: [PATCH 3/7] Fix CI --- tests/integration/targets/setup_mysql/tasks/install.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/integration/targets/setup_mysql/tasks/install.yml b/tests/integration/targets/setup_mysql/tasks/install.yml index aacdddc3..c5b318ba 100644 --- a/tests/integration/targets/setup_mysql/tasks/install.yml +++ b/tests/integration/targets/setup_mysql/tasks/install.yml @@ -5,6 +5,11 @@ id: 4D1BB29D63D98E422B2113B19334A25F8507EFA5 state: present +- name: Install Python3-apt + package: + name: python3-apt + ignore_errors: yes + - name: "{{ role_name }} | install | add percona repositories" apt_repository: repo: "{{ item }}" From 85fc83c757f5d60b4863a59b0d9f7a6d5daa4074 Mon Sep 17 00:00:00 2001 From: Andrew Klychkov Date: Fri, 23 Apr 2021 11:33:39 +0200 Subject: [PATCH 4/7] Fix CI --- tests/integration/targets/setup_mysql/tasks/install.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/integration/targets/setup_mysql/tasks/install.yml b/tests/integration/targets/setup_mysql/tasks/install.yml index c5b318ba..c489ffbc 100644 --- a/tests/integration/targets/setup_mysql/tasks/install.yml +++ b/tests/integration/targets/setup_mysql/tasks/install.yml @@ -5,6 +5,10 @@ id: 4D1BB29D63D98E422B2113B19334A25F8507EFA5 state: present +- name: Change the default interpreter + shell: "update-alternatives --install /usr/bin/python python /usr/bin/python3 1" + ignore_errors: yes + - name: Install Python3-apt package: name: python3-apt From a09d841ad769bfda9e796d1dba67405883ec04c6 Mon Sep 17 00:00:00 2001 From: Andrew Klychkov Date: Fri, 23 Apr 2021 11:52:49 +0200 Subject: [PATCH 5/7] Fix CI --- tests/integration/targets/setup_mysql/tasks/install.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration/targets/setup_mysql/tasks/install.yml b/tests/integration/targets/setup_mysql/tasks/install.yml index c489ffbc..d7ab645a 100644 --- a/tests/integration/targets/setup_mysql/tasks/install.yml +++ b/tests/integration/targets/setup_mysql/tasks/install.yml @@ -6,7 +6,7 @@ state: present - name: Change the default interpreter - shell: "update-alternatives --install /usr/bin/python python /usr/bin/python3 1" + shell: "update-alternatives --install /usr/bin/python python /usr/bin/python3.6 1" ignore_errors: yes - name: Install Python3-apt From 6705bf496b11b0dd76987deab93b76cc626390c6 Mon Sep 17 00:00:00 2001 From: Andrew Klychkov Date: Fri, 23 Apr 2021 12:10:23 +0200 Subject: [PATCH 6/7] Update CI --- .github/workflows/ansible-test-plugins.yml | 2 +- tests/integration/targets/setup_mysql/tasks/install.yml | 9 --------- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/.github/workflows/ansible-test-plugins.yml b/.github/workflows/ansible-test-plugins.yml index 7e5c33d5..e024b9f3 100644 --- a/.github/workflows/ansible-test-plugins.yml +++ b/.github/workflows/ansible-test-plugins.yml @@ -63,7 +63,7 @@ jobs: - stable-2.11 - devel python: - - 3.6 + - 3.8 connector: - pymysql==0.7.10 - pymysql==0.9.3 diff --git a/tests/integration/targets/setup_mysql/tasks/install.yml b/tests/integration/targets/setup_mysql/tasks/install.yml index d7ab645a..aacdddc3 100644 --- a/tests/integration/targets/setup_mysql/tasks/install.yml +++ b/tests/integration/targets/setup_mysql/tasks/install.yml @@ -5,15 +5,6 @@ id: 4D1BB29D63D98E422B2113B19334A25F8507EFA5 state: present -- name: Change the default interpreter - shell: "update-alternatives --install /usr/bin/python python /usr/bin/python3.6 1" - ignore_errors: yes - -- name: Install Python3-apt - package: - name: python3-apt - ignore_errors: yes - - name: "{{ role_name }} | install | add percona repositories" apt_repository: repo: "{{ item }}" From 16e273b39b44ca43c7fb9d5dca2a0442f071debb Mon Sep 17 00:00:00 2001 From: Andrew Klychkov Date: Fri, 23 Apr 2021 12:20:50 +0200 Subject: [PATCH 7/7] Fix CI --- .github/workflows/ansible-test-plugins.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ansible-test-plugins.yml b/.github/workflows/ansible-test-plugins.yml index e024b9f3..da79c042 100644 --- a/.github/workflows/ansible-test-plugins.yml +++ b/.github/workflows/ansible-test-plugins.yml @@ -61,9 +61,9 @@ jobs: - stable-2.9 - stable-2.10 - stable-2.11 - - devel + #- devel python: - - 3.8 + - 3.6 connector: - pymysql==0.7.10 - pymysql==0.9.3