Oh fun, I get to be weird...

# dpkg --field duplicati.deb Version
> 2.0.1.73-1
>

and:

# dpkg --field duplicati.deb Version
> 2.0.1.73-1
>

But ansible still reinstalls the package when I run the playbook. 

I have tested this on more than one remote server, with the same results.

Of course, a 14.04 vagrant vm doesn't display this behavior. 

Could the package version get cached somewhere and Ansible is just reading 
the wrong version?

Any other ideas?

On Tuesday, January 9, 2018 at 11:09:51 AM UTC-8, Kai Stian Olstad wrote:
>
> On Tuesday, 9 January 2018 19.33.29 CET David Reagan wrote: 
> > Changing to force: no and update_cache: no did not make a difference. 
> > force: yes and update_cache: no also did not make a difference. 
> > 
> > It seems to me that, maybe, the apt module isn't able to see the version 
> of 
> > the .deb file is the same as the installed version. How does the apt 
> module 
> > check the versions? 
>
> "dpkg --field filename.deb Version", it's using the python apt module to 
> check what version is installed. 
>
>
> > Or does it just run apt and let apt deal with that? 
>
> apt command cannot install deb files so dpkg is used for that but the apt 
> module is checking the version and only run dpkg when it's needed (down- or 
> upgrade). 
>
> For me this work with Ansible 2.4.2, it only installs the deb when the 
> version in the file differ from what's installed. 
>
>
> -- 
> Kai Stian Olstad 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/0e1a8655-26bc-4710-ad9b-0ea0560b3b9e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to