maritza05
3/14/2018 - 3:14 AM

YAML to only change when the apt upgrade really installed packages

command: "apt-get updgrade -y"
register: apt_upgrade
changed_when: "'0 upgraded, 0 newly installed' not in apt_upgrade.stdout"