Need help with error: msg: parameters are mutually exclusive: ['package', 'upgrade', 'deb']

I’m using the following task to install a few utilities:

`- name: install utilities
apt: name={{ item.pkg }} state=present upgrade=full
with_items:

  • pkg: ‘htop’
  • pkg: ‘mytop’
  • pkg: ‘iotop’
  • pkg: ‘pv’`

`When executing in check mode, I get the following error:
failed: [192.168.68.136] => (item={‘pkg’: ‘pv’}) => {“failed”: true, “item”: {“pkg”: “pv”}}

msg: parameters are mutually exclusive: [‘package’, ‘upgrade’, ‘deb’]`

What am I doing wrong?

what you want is:

apt: name={{ item.pkg }} state=latest

upgrade is not for single packages but for upgrading all packages.