Skip to content

Fixed ansible_managed comment in .cnf configs #343

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

Merged
merged 1 commit into from
Aug 26, 2019
Merged

Fixed ansible_managed comment in .cnf configs #343

merged 1 commit into from
Aug 26, 2019

Conversation

aniro
Copy link
Contributor

@aniro aniro commented Aug 8, 2019

In case ansible_managed is a multiline string, role produces malformed configs.
ansible.cfg:

ansible_managed =
    This file is managed by ansible.
    Don't make changes here - they will be overwritten.

resultant config:

$ head /etc/my.cnf
#
This file is managed by ansible.
Don't make changes here - they will be overwritten.
...

with fix applied:

$ head /etc/my.cnf
#
#
# This file is managed by ansible.
# Don't make changes here - they will be overwritten.
#

* Update my.cnf.j2
* Update root-my.cnf.j2
* Update user-my.cnf.j2
@geerlingguy geerlingguy merged commit 88313b0 into geerlingguy:master Aug 26, 2019
@geerlingguy
Copy link
Owner

Thanks, makes sense!

kietnguyen pushed a commit to kietnguyen/ansible-role-mysql that referenced this pull request Apr 9, 2020
Fixed ansible_managed comment in .cnf configs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants