Does apt module upgrade works with package pinned?

Hi,

I would like to know if ansible apt module upgrade works with package pinned.

So far my test shows even though a package had been marked as hold (https://help.ubuntu.com/community/PinningHowto), apt upgrade will keep upgrading the package. If i execute apt-get upgrade manually, normally it won’t upgrade the packages i set as hold.

Tested with upgrade=yes and upgrade=safe, seems like it have the same behaviour.

When you say upgrade and ignoring pin settings, are you referring to

apt: name=foo state=latest

or

apt: upgrade=yes

?

When you say upgrade and ignoring pin settings, are you referring to

apt: name=foo state=latest

or

apt: upgrade=yes

?

I’m referring to the later

apt: upgrade=yes

or

apt: upgrade=safe