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

PS-10287 Improve support for custom my.cnf #158

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

CyberLine
Copy link
Contributor

I adapted the Code from #140 and did a modification for resolving dependency on fresh installation.

Facter.add(:proxysql_mycnf_file_name) do
setcode do
if File.exist? '/root/.proxysql_mycnf_file_name'
Facter::Core::Execution.execute('cat /root/.proxysql_mycnf_file_name')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is cat the correct way to open this? We can also use pure ruby to read it in. Can we assume it's safe to cat the file and that it doesn't contain any sensitive data?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i just adopted the Open PR from March 2020 ...
The file contains the value of :mycnf_file_name to use it in ruby code instead of hard coded /root/.my.cnf
(For my usecase i have already a /root/.my.cnf for mysql and so i need another file storing Proxysql admin creds)

jadestorm pushed a commit to ncstate-daniel/puppet-proxysql that referenced this pull request Sep 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants