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

Module is not idempotent #28

Open
snesbittsea opened this issue Dec 11, 2018 · 2 comments
Open

Module is not idempotent #28

snesbittsea opened this issue Dec 11, 2018 · 2 comments
Assignees

Comments

@snesbittsea
Copy link

Heya!

Not sure this is a bug or a misunderstanding on my part.

The role is not idempotent - the Update ansible_local facts block always reports changed.

Also, if the purpose here is to reload inventory, I think there may be another option using the meta module with the refresh_inventory setting.

@m4rcu5nl
Copy link
Owner

Technically not a bug. I think we can call it laziness. That block runs a script that generates the file /etc/ansible/facts.d/zerotier.fact on target hosts and I did not give it a proper changed_when condition.

I'm reworking that block to not generate a static file and update that each play but rather use an executable python script for /etc/ansible/facts.d/zerotier.fact that returns up to date JSON data on request. That will eliminate the need for the update and reload tasks altogether.

Thanks for bringing the meta module to my attention again. Haven't had a need for it in quite a while and I was not aware of some of it's newer features yet.

@JakobLichterfeld
Copy link

JakobLichterfeld commented Sep 9, 2023

As the PR #39 was never merged and the base repo is deleted, this still persists. No impotence

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants