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

handle destination files that are symlinks #1

Closed
wants to merge 1 commit into from
Closed

handle destination files that are symlinks #1

wants to merge 1 commit into from

Conversation

nrser
Copy link

@nrser nrser commented Apr 13, 2015

the library was replacing the symlink location with the new content instead of replacing the symlink's target file.

the library was replacing the symlink location with the new content instead of replacing the symlink's target file.
@yaegashi
Copy link
Owner

Confirmed, your fix seems ok. But could you add a testing playbook for it as well?

Add the following files and dirs:

  • tests/test-the-feature.yml - A playbook to test "the feature."
  • tests/fixtures/test-the-feature/... - Put fixtures to be tested. Symlinks should be safely managed by git.
  • tests/expected/test-the-feature/... - Put expected results after running playbook.

Run bash run.sh in tests dir. It copies fixtures dir to testing dir, then for each playbook (*.yml) it runs ansible-playbook twice and checks difference between testing and expected.

@nrser
Copy link
Author

nrser commented Apr 19, 2015

sorry, i'd like to add tests for it, but i don't know if/when i'll get the time. i made the fix in my fork and wanted to make it available for anyone else that hit the same problem. it's an extremely strait-forward change. i understand if you don't want to include it without tests, but hopefully this will at least show up in search results for people experiencing the same issue.

yaegashi added a commit that referenced this pull request Apr 19, 2015
@yaegashi
Copy link
Owner

Released v0.2, added "follow" option in blockinfile like other official modules in Ansible 1.8.

Please try adding "follow=yes" to blockinfile invocations in your playbooks.

@yaegashi yaegashi closed this Apr 19, 2015
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.

None yet

2 participants