ansible / terraform-provider-ansible

community terraform provider for ansible
https://registry.terraform.io/providers/ansible/ansible/latest
GNU General Public License v3.0
195 stars 43 forks source link

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

Closed santimar closed 7 months ago

santimar commented 7 months ago

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 commented 7 months ago

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

santimar commented 7 months ago

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