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

ansible_playbook resource is recreated every time if using replayable=true #81

Closed
santimar opened this issue Feb 8, 2024 · 2 comments
Closed

Comments

@santimar
Copy link

santimar commented Feb 8, 2024

I can't fully grasp the logic behind redeployable = true at the moment, that just recreates the resource every time.

I was expecting that on the second terraform apply, the playbook would run in check-mode and only if ansible reports that changes needs to be made, the ansible_playbook resource would be recreated.

At the moment though, the ansible_playbook is always recreated whether changes needs to be made or not.

This will partially defeat Terraform goal, since under normal circumstances if no change is needed, no resource should be modified.
Also, it produce noise on Terraform logs, making harder to read other resources changes.

Is there a reason why this approach is not followed?

@ralgar
Copy link

ralgar commented Feb 9, 2024

This is a duplicate of #77. I wholeheartedly agree though.

@santimar
Copy link
Author

santimar commented Feb 9, 2024

Yes, I missed the other issue.
Closing since it's duplicated

@santimar santimar closed this as completed Feb 9, 2024
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

No branches or pull requests

2 participants