Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for plugin config in "additional_parameters" #9

Open
colinleefish opened this issue Apr 11, 2019 · 5 comments
Open

Support for plugin config in "additional_parameters" #9

colinleefish opened this issue Apr 11, 2019 · 5 comments
Assignees
Labels
enhancement New feature or request

Comments

@colinleefish
Copy link

colinleefish commented Apr 11, 2019

SUMMARY

Currently everything under "additional_parameters" section will be added to /etc/my.cnf as parameters before database initialization. However, if we add plugin-specific parameters (e.g. "validate_password_policy", the initialization process will fail.

ISSUE TYPE
  • Feature Idea
COMPONENT NAME
ANSIBLE VERSION
ansible 2.7.10
  config file = None
  configured module search path = ['/Users/colinleefish/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /Users/colinleefish/.pyenv/versions/3.6.8/envs/ansible_py3/lib/python3.6/site-packages/ansible
  executable location = /Users/colinleefish/.pyenv/versions/ansible_py3/bin/ansible
  python version = 3.6.8 (default, Apr  5 2019, 16:44:44) [GCC 4.2.1 Compatible Apple LLVM 10.0.1 (clang-1001.0.46.3)]
CONFIGURATION

HOST_KEY_CHECKING(env: ANSIBLE_HOST_KEY_CHECKING) = False

OS / ENVIRONMENT
  • CentOS 7.6
  • MySQL 5.7
STEPS TO REPRODUCE
---
- hosts: mysql
  roles:
  - role: lean_delivery.mysql
    mysql_daemon: "mysqld"
    mysql_version: "5.7"
    mysql_root_password: "a_stupid_password"
    additional_parameters:
    - name: character-set-server
      value: "utf8mb4"
    - name: collation-server
      value: "utf8mb4_unicode_ci"
    - name: validate_password_policy
      value: "LOW"
EXPECTED RESULTS

MySQL up and running

ACTUAL RESULTS
`fatal: [172.28.128.9]: FAILED! => {"changed": false, "msg": "Unable to start service mysqld: Job for mysqld.service failed because the control process exited with error code. See \"systemctl status mysqld.service\" and \"journalctl -xe\" for details.\n"}`
@colinleefish
Copy link
Author

if we remove...

    - name: validate_password_policy
      value: "LOW"

then the installation will succeed.

@tgadiev
Copy link
Contributor

tgadiev commented Apr 11, 2019

@colinleefish so, what is expected to be changed? Ansible does not know which MySQL parameter is related to which DB feature. It just controls the state of configuration.

@colinleefish
Copy link
Author

How about another section like "additional_parameters_after_init" or something? While the original one is just what it is now, parameters here are added after everything is set and MySQL is fully operational. Without it, we may have to use post_tasks.

By the way, this role you guys made is awesome. It solved that root password problem what geerlingguy haven't.

@tgadiev
Copy link
Contributor

tgadiev commented Apr 11, 2019

@colinleefish I don't have an idea how to make the change you propose. But you can make a new pull request with your changes and we'll try to review and merge it very fast.

@tgadiev tgadiev self-assigned this Apr 11, 2019
@tgadiev tgadiev added the enhancement New feature or request label Apr 11, 2019
@colinleefish
Copy link
Author

No problem. I'll see what I can do. Thanks man!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants