cached code? modified code is not used

24 views
Skip to first unread message

Adrian Sevcenco

unread,
Feb 2, 2022, 11:32:35 AM2/2/22
to Ansible Project
Hi! I have a weird situation and i'm not sure if this should be reported as a bug:
I installed with galaxy a collection which i modified quite a lot. (a collection that add some facts). The really weird thing is that somehow the old version of the code is used
and i still have the old output.
Does anyone have any idea about this?
Thank you!
Adrian

Brian Coca

unread,
Feb 2, 2022, 12:02:33 PM2/2/22
to Ansible Project
No code is cached between Ansible runs, but you CAN have 2 instances
of the same collection installed, but only the first one loaded will
be used, I suspect this is your issue.

--
----------
Brian Coca

Adrian Sevcenco

unread,
Feb 2, 2022, 1:02:50 PM2/2/22
to ansible...@googlegroups.com

On 02.02.2022 19:01, Brian Coca wrote:
> No code is cached between Ansible runs, but you CAN have 2 instances
> of the same collection installed, but only the first one loaded will
> be used, I suspect this is your issue.

I found the problem: this was about a facts plugin that i was working on,
and i had redis-based persistent cache and high enough ttl.
So, when running the facts gathering play, the code actually was not working,
and ansible would just report back the cached facts giving me the wrong impression.

so, with --flush-cache i solved the problem and i can be certain that fresh facts are
gathered each time.

Thank you!
Adrian
Reply all
Reply to author
Forward
0 new messages